Whamcloud - gitweb
fs/lustre-release.git
5 years agoLU-3222 ofd: use of ofd_XXX helpers 80/8780/5
Emoly Liu [Wed, 21 May 2014 14:48:32 +0000 (10:48 -0400)]
LU-3222 ofd: use of ofd_XXX helpers

Replace explicit use of some obd fields by ofd helpers.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I83bf64f0f41eac834b47c216d02f9cac8d505207
Reviewed-on: http://review.whamcloud.com/8780
Tested-by: Jenkins
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-5116 ptlrpc: race at req processing 71/10471/2
Alexander.Boyko [Wed, 28 May 2014 17:52:13 +0000 (21:52 +0400)]
LU-5116 ptlrpc: race at req processing

Race between ptlrpc_resend_req() and ptlrpc_check_set().
1 thread do ptlrpc_check_set()->after_reply()
2 thread do ptlrpc_resend_req()
The result is request with rq_resend = 1 and MSG_REPLY flag.
When this request will came to server it will cause client eviction.
The patch skip ptlrpc_resend_req logic if rq_replied is set,
and clear rq_resend flag at reply_in_callback() when client got
reply.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1888
Change-Id: If47b9a1f559ab16e4b416332ada7c73a8758d46c
Reviewed-on: http://review.whamcloud.com/10471
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5090 build: restore enable-mpitest option 84/10384/4
James Simmons [Wed, 21 May 2014 14:37:21 +0000 (10:37 -0400)]
LU-5090 build: restore enable-mpitest option

Originally the enable-mpitests configure option was deeply
embedded in the liblustre configuration test. With the
removal of liblibustre this option got accidentally removed.
This patch restores this option.

Change-Id: I92ab1d3f187f579dca4bb6825a5bf1e80dbbee06
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10384
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5113 osd: add striped dir feature flag to LMA 63/10463/2
wang di [Tue, 27 May 2014 21:14:25 +0000 (14:14 -0700)]
LU-5113 osd: add striped dir feature flag to LMA

Add striped directory feature flag(LMAI_STRIPED) to LMA, so
once MDS is downgraded, the striped directory will be accessed
by old lustre(< 2.6) on MDT.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I763217e3554dc4d68ee2f72d53c0e119fff6cbef
Reviewed-on: http://review.whamcloud.com/10463
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4932 doc: desgin doc for LFSCK 33/10033/5
Richard Henwood [Mon, 21 Apr 2014 15:40:15 +0000 (16:40 +0100)]
LU-4932 doc: desgin doc for LFSCK

LFSCK design documentation has previously been recorded in an wiki
external to the souce code. This commit adds a first draft of the
design highlights of the LFSCK feature. A new directory has been
created to house this and other future design documents modelled
after the Linux Kernel 'Documentation' directory.

This document includes an introduction, quick usage and features.
In addition there are sections that cover the two phase design of
LFSCK as well as a overview of the file system traversal methods
that design have been implemented. Finally, a further reading
section is included as well as a glossary of Lustre specific
terms.

Change-Id: I598261efd7fc4ac71a32a301b8afe8c60b592ace
Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-on: http://review.whamcloud.com/10033
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4345 osp: store valid bits in setattr record 23/10223/5
Niu Yawei [Tue, 6 May 2014 05:23:12 +0000 (01:23 -0400)]
LU-4345 osp: store valid bits in setattr record

We'd store LA_UID/LA_GID bit along with the UID/GID in the setattr
llog record, otherwise, osp could set a random uid/gid to the OST
object.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I17de21071127325ade8dea6f8618b622fec1768d
Reviewed-on: http://review.whamcloud.com/10223
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
5 years agoLU-4929 llite: use the correct mode for striped directory 28/10028/8
wang di [Fri, 18 Apr 2014 21:33:59 +0000 (14:33 -0700)]
LU-4929 llite: use the correct mode for striped directory

Create striped directory with correct mode, which should be
handling same as mkdir.

Add -m option to setdirstripe so the user can create stripedir
with specified mode.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4d7d186d4c820cfbdddd0aac9012e7e5e2454278
Reviewed-on: http://review.whamcloud.com/10028
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-4098 lmv: Match MDT where the FID locates first 19/8019/8
wang di [Fri, 18 Oct 2013 07:00:16 +0000 (00:00 -0700)]
LU-4098 lmv: Match MDT where the FID locates first

With DNE every object can have two locks in different namespaces:
lookup lock in space of MDT storing direntry and update/open lock
in space of MDT storing inode. In lmv_find_cbdata/lmv_lock_lock,
it should try the MDT that the FID maps to first, since this can
be easily found, and only try others if that fails.

In the error handler of lmv_add_targets, it should check whether
ld_tgt_count is being increased before ld_tgt_count is being -1.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Idf90ff97421102da97febb0aebaff3f702ff5df7
Reviewed-on: http://review.whamcloud.com/8019
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
5 years agoLU-4573 tests: check all MDTs for open files 07/10107/3
Andreas Dilger [Tue, 27 May 2014 12:13:18 +0000 (20:13 +0800)]
LU-4573 tests: check all MDTs for open files

sanityn.sh test_76 verifying mdt.*.exports.*.open_files content
did not check all of the MDTs. It was broken by commit 370de927fc5,
which created all directories striped across all MDTs by default.

There is actually no need to special-case striped or remote
directories in this test, and it should be possible to just check
for open files on all MDTs, and this also simplifies the test.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I2b7b434052946c8d84bffef1fc7358cc29b00b75
Reviewed-on: http://review.whamcloud.com/10107
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
5 years agoLU-4675 lfsck: new pattern flag for partially repaired file 42/10042/19
Fan Yong [Mon, 21 Apr 2014 13:59:00 +0000 (21:59 +0800)]
LU-4675 lfsck: new pattern flag for partially repaired file

When the layout LFSCK repairs orphan OST-object, if the parent
MDT-object was lost, then it will re-create the MDT-object and
regenerate the LOV EA and fill the target LOV EA slot with the
orphan information, and fill other slots with zero (LOV hole);
if related LOV EA slot is invalid or hole, then it will refill
the target LOV EA slot; if the target slot exceeds current LOV
EA tail, then extend the LOV EA, and fill the gaps as zero.

Some of the LOV EA holes may cannot be re-filled finally because
of lost some OST-objects. And even if they can be re-filled, but
there are still some possible race accessings from client before
the re-filling. If the client access the LOV EA with hole(s), it
may cause some strange behaviour, such as trigger LBUG()/LASSERT()
on the client.

So we will make the client to be aware of the LOV EA is incomplete.
We introduce a new LOV EA pattern flag LOV_PATTERN_F_HOLE for that:
any time when the LFSCK repairs the LOV EA with hole(s), the LOV EA
will be marked as LOV_PATTERN_F_HOLE; when all the holes in the LOV
EA are refilled, the LOV_PATTERN_F_HOLE will be dropped.

For a new client, it recongizes the pattern flag LOV_PATTERN_F_HOLE,
then it can permit/forbid some opertions on the file with LOV holes:

1) Normal read/write the file with LOV EA hole is permitted, but the
   application will get EIO error when read data from the dummy slot
   or write data to the dummy slot.

2) The users can dump the recovered data via some common read tools,
   such as "dd conv=sync,noerror".

3) Append data to the file which has LOV EA hole will get EIO failure.

4) Other operations will skip the LOV EA hole(s), and will not get
   failures, such as {s,g}etattr, {s,g}getxattr, stat, chown/chgrp,
   chmod, touch, unlink, and so on.

For an old client, since it will not recognize the new pattern flag
LOV_PATTERN_F_HOLE. So the LOV EA with hole will be dicarded with
failure, but it will not cause the client to be crashed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic4a7fd08b229752cc155606515b6c9ddd380213e
Reviewed-on: http://review.whamcloud.com/10042
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5068 mdt: check default LMV EA when set reply EA size 38/10338/2
wang di [Thu, 15 May 2014 09:25:14 +0000 (02:25 -0700)]
LU-5068 mdt: check default LMV EA when set reply EA size

MDT should also check default LMV EA size when setting reply EA
size, otherwise the following xattr get will not be able to hold
default LMV EA in its reply buffer.

Add test cases to verify default stripe count.

Minor cleanup for the output of default LMV EA.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I2f94d6e87ba05720e5e4aa694dce3246d6a27664
Reviewed-on: http://review.whamcloud.com/10338
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5091 build: Support alternate locations of libzfs.so 01/10401/5
Nathaniel Clark [Wed, 21 May 2014 18:08:30 +0000 (14:08 -0400)]
LU-5091 build: Support alternate locations of libzfs.so

Due to the change for with-zfs-devel (LU-3497), also add support to
search for libzfs.so along with the alternate locations supplied with
the header files.
Also need to unpack zfs{,-devel}.  The zfs RPM is needed because it
has the actual libraries in it and the zfs-devel RPM only has un-
versioned symlinks to the libraries in the zfs RPM.
This will all change one day when we have a libzfs RPM per
https://github.com/zfsonlinux/zfs/issues/2329 and it looks like it
could be one day soon: https://github.com/zfsonlinux/zfs/pull/2341.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ic78bd0eb88d8ab0f2456b8cf684bb8b9c0c0833a
Reviewed-on: http://review.whamcloud.com/10401
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-216 ldiskfs: use proper arguments for ldiskfs_free_blocks 20/1720/4
Andreas Dilger [Thu, 20 Feb 2014 22:00:08 +0000 (14:00 -0800)]
LU-216 ldiskfs: use proper arguments for ldiskfs_free_blocks

In ldiskfs_ext_new_extent_cb(), the extent length argument
is confusingly converted from le16 using cpu_to_le16() instead
of le16_to_cpu().  While this is functionally correct, it is
semantically incorrect and can confuse static code analysis.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8b3a684677c66d96fe4828fa771fc309c21755b8
Reviewed-on: http://review.whamcloud.com/1720
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-5094 Fetch SLES11SP3 build artifacts automatically 96/10396/13
Brian J. Murrell [Tue, 20 May 2014 23:40:27 +0000 (19:40 -0400)]
LU-5094 Fetch SLES11SP3 build artifacts automatically

If the user has an account at nu.novell.com for getting SLES packages,
they must configure that account info in the standard .netrc file for
wget/curl to use when trying to get packages from nu.novell.com.

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ic3cbfc78e0a813d7ac5051bc4a4a358caac0d5a7
Reviewed-on: http://review.whamcloud.com/10396
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5088 kernel: kernel update [SLES11 SP3 3.0.101-0.29] 91/10391/2
Bob Glossman [Tue, 20 May 2014 20:30:01 +0000 (13:30 -0700)]
LU-5088 kernel: kernel update [SLES11 SP3 3.0.101-0.29]

update target and config files for new version

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8b3ef29db6f5ae87ed4c681ce9d96e811d5db641
Reviewed-on: http://review.whamcloud.com/10391
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4937 osc: get rid of old checksum initial value 54/10354/2
Bobi Jam [Tue, 13 May 2014 11:59:08 +0000 (19:59 +0800)]
LU-4937 osc: get rid of old checksum initial value

Old code residue assumes initial checksum value as ~0, and relies on
that to check whether OST server has calculated bulk data checksum.
That is not the case anymore.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I99779eaf02d22b470978448ad3f17b35f0e9a475
Reviewed-on: http://review.whamcloud.com/10354
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-3319 procfs: Move NRS TBF proc handling to seq_files 84/9384/5
James Simmons [Wed, 21 May 2014 14:27:03 +0000 (10:27 -0400)]
LU-3319 procfs: Move NRS TBF proc handling to seq_files

With newer kernels moving their proc file system handling
to seq_files this patch migrates the proc handling for NRS
TBF to this new approach.

Change-Id: I121755b611296bf7b9527de65d0e6cf8c4980151
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9384
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3319 procfs: move osp proc handling to seq_files 36/7936/17
James Simmons [Thu, 24 Apr 2014 16:04:57 +0000 (12:04 -0400)]
LU-3319 procfs: move osp proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the osp
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id8f77d72fd35755f1b7b1c17fcf27e0731bd5ac1
Reviewed-on: http://review.whamcloud.com/7936
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4913 mgc: mgc import reconnect race 67/9967/6
Andriy Skulysh [Thu, 15 May 2014 12:29:12 +0000 (15:29 +0300)]
LU-4913 mgc: mgc import reconnect race

mgc import can be reconnected by pinger or
ptlrpc_reconnect_import().
ptlrpc_invalidate_import() isn't protected against
alteration of imp_invalid state. Import can be
reconnected by pinger which makes imp_invalid
equal to false. Thus LASSERT(imp->imp_invalid) fails
in ptlrpc_invalidate_import().

It is safe to call ptlrpc_invalidate_import() when
import is deactivated, but ptlrpc_reconnect_import() doesn't
deactivate it.
Let's use only pinger when available to reconnect import

Xyratex-bug-id: MRP-1746
Change-Id: I2feb45c5f3e96da30dd5639d5824068f8a126c7d
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9967
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4843 mdt: disallow old clients access striped dir 56/9956/11
wang di [Fri, 18 Apr 2014 08:31:17 +0000 (01:31 -0700)]
LU-4843 mdt: disallow old clients access striped dir

1. When old clients access striped directory, it should
return -ENOTSUPP.

2. After we send create remote directory to the MDT where
child is reside, we need check whether the parent is
resided on MDT0.

3. add hash_type description.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I20c0b04c7e1d9a0cab4241dc39d0648f5631f2f4
Reviewed-on: http://review.whamcloud.com/9956
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoRevert "LU-4933 osc: Automatically tune the max_dirty_mb" 02/10402/2
Andreas Dilger [Wed, 21 May 2014 18:18:01 +0000 (18:18 +0000)]
Revert "LU-4933 osc: Automatically tune the max_dirty_mb"

This causes frequent test failures in conf-sanity.sh
test_76a() due to changing max_dirty_mb automatically.

This reverts commit 5303c139e3cef8ed09b85cf828afbbe24ea0d7db.

Change-Id: I013d75ac85010262419a57575552bf55eff9fcdd
Reviewed-on: http://review.whamcloud.com/10402
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4925 lmv: validate lock with correct stripe FID 26/10026/20
wang di [Fri, 18 Apr 2014 19:28:45 +0000 (12:28 -0700)]
LU-4925 lmv: validate lock with correct stripe FID

In ll_lookup_it_finish, we need use the real parent(stripe)
FID to validate the parent UPDATE lock.

Add test81 in sanityn to verify the case.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Iba07f9e17103867ad7f3d78a5adcc3c9857999d6
Reviewed-on: http://review.whamcloud.com/10026
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4603 lmv: a few fixes about readdir of striped dir. 91/9191/29
wang di [Mon, 31 Mar 2014 14:45:46 +0000 (07:45 -0700)]
LU-4603 lmv: a few fixes about readdir of striped dir.

The offset of dir should be set to EOF as soon as
ll_dir_read() has nothing to read. Otherwise, "ls"
on NFS client will return -ELOOP.

And ll_dir_entry_start() should be able to start reading
from the beginning of the offset. Otherwise, some files
might be missing when "ls" on NFS client.

Skip . and .. for slave stripe.

If user buffer is full in ll_dir_read, remember
the last unsuccessful entry in op_hash_offset, so in next
read, it will locate entry by >= hash_offset,  instead
of >.

It will use op_same_hash_offset to remember entry offset among
the same hash entries, so mdc_read_entry will tell which entry
the caller needs.

Signed-off-by: Di Wang <di.wang@intel.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I93f94836ce59f523794581301f3bc3c491c956a5
Reviewed-on: http://review.whamcloud.com/9191
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4991 test: check files in sanity 56s 60/10360/2
Wei Liu [Sat, 17 May 2014 04:45:18 +0000 (21:45 -0700)]
LU-4991 test: check files in sanity 56s

In sanity 56s, run lfs getstripe -R to check
files in case of failure.

Change-Id: I52a55aae4e669c4b6af0bea869d75cc2cfff85c3
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/10360
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
5 years agoLU-4606 utils: Mount uses so for backing fstype 93/10193/9
Nathaniel Clark [Thu, 1 May 2014 21:13:45 +0000 (17:13 -0400)]
LU-4606 utils: Mount uses so for backing fstype

Make mount/mkfs/tunefs functionality a per backing FSTYPE shared
object that is loadable, and seperately buildable and installable
in the appropriate lustre-osd-FSTYPE rpm.

For ZFS this allows the shared object to be directly linked to libzfs
and thus remove the hardcoding of a libzfs.so version in the lustre
source. This also has the benefit of making lustre-osd-zfs explicitly
requires libzfs (which it needs to do mount/mkfs operations).

Adjust build system to allow building of loadable module.  Including
requiering libtool as part of the build.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I8fc0f41161dc08405c1f951f12e675f364ff62c3
Reviewed-on: http://review.whamcloud.com/10193
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5065 utils: uninclude lustre_idl.h from lfs 36/10336/2
John L. Hammond [Thu, 15 May 2014 12:33:38 +0000 (07:33 -0500)]
LU-5065 utils: uninclude lustre_idl.h from lfs

Move the definition of OBD_OCD_VERSION() and similar macros from
lustre_idl.h to lustre_ver.h (via lustre_ver.h.in). These macros are
primarily used in comparisons to LUSTRE_VERSION_CODE which is defined
in lustre_ver.h and so should be defined there as well. Move a few
definitions (related to FIDs, quota and striping) from lustre_idl.h to
lustre_user.h. Add some preprocessor gunk to the end of lfs.c to
ensure that lustre_idl.h has not been included indirectly or
otherwise.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0923ff823ddaa1fd6bc5493a434470543d27f273
Reviewed-on: http://review.whamcloud.com/10336
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-4993 llite: Support 3.14 kernel changes to bio api 37/10337/2
James Simmons [Thu, 15 May 2014 16:04:03 +0000 (12:04 -0400)]
LU-4993 llite: Support 3.14 kernel changes to bio api

In the 3.14 kernel code base several data fields in
struct bio were moved into a new structure called
bvec_iter. This changed impacted the lustre loop device.
This patch brings support of these changes to the loop
device lustre uses.

Change-Id: I7cc9565bbf56e87e4465a76b7b5b959b063c3971
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10337
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5034 llite: Change readdir BRW metrics 75/10275/2
Jinshan Xiong [Fri, 9 May 2014 00:08:14 +0000 (17:08 -0700)]
LU-5034 llite: Change readdir BRW metrics

To simplify the code, change the metrics from bytes to pages.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If458cb64ba5de14ed709f6fe03db956935201566
Reviewed-on: http://review.whamcloud.com/10275
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3963 libcfs: move mgs, osd-ldiskfs, osp, quota to linux list api 47/10247/4
James Simmons [Fri, 9 May 2014 16:46:16 +0000 (12:46 -0400)]
LU-3963 libcfs: move mgs, osd-ldiskfs, osp, quota to linux list api

First part of the move of several of the server components
over to the linux list api.

Change-Id: Ib14d7c295f98decdca415e0904fe4fb710b83696
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10247
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4974 lod: add prefix to struct lod_pool_iterator 45/10245/4
Andreas Dilger [Wed, 7 May 2014 06:51:47 +0000 (00:51 -0600)]
LU-4974 lod: add prefix to struct lod_pool_iterator

Add "lpi_" prefix to all fields in struct lod_pool_iterator (formerly
just "pool_iterator") so that the fields are easier to identify,
instead of having to grep for common names.

Fix up some CERROR() messages to be CDEBUG(), since they can be
printed under normal usage and are not very critical.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5d271eec836622401a59d30edd045e220e500c1e
Reviewed-on: http://review.whamcloud.com/10245
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4961 build: remove libsysio and liblustre autoconf tests 01/10201/2
John L. Hammond [Fri, 2 May 2014 20:50:23 +0000 (15:50 -0500)]
LU-4961 build: remove libsysio and liblustre autoconf tests

Remove the libsysio and liblustre tests from config/lustre-build.m4,
lnet/autoconf/lustre-lnet.m4, and lustre/autoconf/lustre-core.m4,
leaving a temporary AM_CONDITIONAL(LIBLUSTRE, false) in their
place. Remove related bits from lustre-spec.in and debian/rules.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9483bc9114fa0682b84e6a9014123e5838f1c1a7
Reviewed-on: http://review.whamcloud.com/10201
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4569 hsm: Prevent copytool from importing existing file. 85/10185/3
Henri Doreau [Thu, 1 May 2014 09:57:34 +0000 (11:57 +0200)]
LU-4569 hsm: Prevent copytool from importing existing file.

Requesting import of an already existing FID can lead to data
corruption since both inodes in lustre would refer to the same
file in the backend.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I38bab1c890ff84b22f8816597f6d0b367aba4b38
Reviewed-on: http://review.whamcloud.com/10185
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-2675 fid: remove liblustre includes 69/10169/2
John L. Hammond [Wed, 30 Apr 2014 20:40:02 +0000 (15:40 -0500)]
LU-2675 fid: remove liblustre includes

In lustre/fid/ remove includes for liblustre builds.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I609f8ad09ac4ea59fd48b5a7cb1d29c96d0359c9
Reviewed-on: http://review.whamcloud.com/10169
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3953 build: look for kconfig.h in $LINUX 59/10159/3
Jeff Mahoney [Wed, 7 May 2014 13:20:54 +0000 (09:20 -0400)]
LU-3953 build: look for kconfig.h in $LINUX

On SLES systems, the kernel source and objects are not in the same
directory. kconfig.h is in the source tree, not the object tree.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9c382a319181ff2d9958821a40d4eef6877f5867
Reviewed-on: http://review.whamcloud.com/10159
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4933 osc: Automatically tune the max_dirty_mb 34/10034/3
Li Xi [Mon, 21 Apr 2014 14:20:27 +0000 (22:20 +0800)]
LU-4933 osc: Automatically tune the max_dirty_mb

When RPC size or the max RPCs in flight is increased, the actual
limit might be max_dirty_mb value. This patch automatically set
that max_dirty_mb value at connection time and when the related
values are tuned manually by proc file system.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I95e3e32294a96c4022bcefe392d375583f879b2e
Reviewed-on: http://review.whamcloud.com/10034
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4904 test: write_append_truncate failed with divide error 48/9948/4
Andriy Skulysh [Sun, 4 May 2014 11:46:22 +0000 (14:46 +0300)]
LU-4904 test: write_append_truncate failed with divide error

fix trunc_size calculation in case of append_size == 1
Don't allow to specify write_max and append_max < 2.

Change-Id: I2a9ded4b10ef90a9e02b1b0f1229c87177f046d4
Xyratex-bug-id: MRP-1779
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9948
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3319 procfs: move mdt/mds proc handling to seq_files 36/8036/19
James Simmons [Fri, 9 May 2014 20:30:46 +0000 (16:30 -0400)]
LU-3319 procfs: move mdt/mds proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the mdt/mds
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Icbafdcd2c2fe3959a51dda3f9c715b0ff8d95742
Reviewed-on: http://review.whamcloud.com/8036
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
5 years agoLU-3319 procfs: move lod proc handling to seq_files 10/8010/13
James Simmons [Wed, 26 Mar 2014 23:57:44 +0000 (19:57 -0400)]
LU-3319 procfs: move lod proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the lod
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iaa0f617fcd430e91f12afbc0faf6906fd275a7a5
Reviewed-on: http://review.whamcloud.com/8010
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-1330 obdclass: splits server-side procfs handling 77/2677/16
Liu Xuezhao [Mon, 5 May 2014 13:16:36 +0000 (09:16 -0400)]
LU-1330 obdclass: splits server-side procfs handling

Moves some server-side procfs routines to lprocfs_status_server.c.
Only compiles lprocfs_jobstats.c for server.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I32d5feda324bf76386a176e8bd78d74e59643f43
Reviewed-on: http://review.whamcloud.com/2677
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-2059 mgs: don't fail on missing params log 11/10311/4
Mikhail Pershin [Tue, 13 May 2014 14:34:03 +0000 (18:34 +0400)]
LU-2059 mgs: don't fail on missing params log

The mgc_process_cfg_log() fails if 'params' log is not
accessinble and has no local copy. In fact that log is
optional and may be just empty.

Patch allows 'params' log to be empty and checks also for
'params' log in other places to avoid wrong error messages.
There was also deprecated code in mgs_write_log_direct_all()
which creates lustre-params log which is not used by anyone now.
Third change is removal of exceptions in conf-sanity.sh and
insanity.sh related to LU-2059

The only exception is insanity test_1 which is still failed due
to other reason.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I1ad024a87b0a10665f9669fa8ff7cca2d07a09fe
Reviewed-on: http://review.whamcloud.com/10311
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
5 years agoLU-4883 lmv: disable sub-stripe access from .lustre/fid 60/10060/17
wang di [Sun, 11 May 2014 17:53:27 +0000 (10:53 -0700)]
LU-4883 lmv: disable sub-stripe access from .lustre/fid

1. Disable sub-stripe access from .lustre/fid.

2. A few fixes for fid2patch with striped directory.

3. Add sanity 162b to test such cases.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic9372f456d452fbee4a3b05849026422264a00f6
Reviewed-on: http://review.whamcloud.com/10060
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4981 test: Fix IO redirect in sanity 133g 81/10181/4
wang di [Wed, 30 Apr 2014 20:22:20 +0000 (13:22 -0700)]
LU-4981 test: Fix IO redirect in sanity 133g

Redirect error message of badarea_io to /dev/null in
133g.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If75628a6502511684886ffc2f1eb9711b59991de
Reviewed-on: http://review.whamcloud.com/10181
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5018 libcfs: don't depend on configure for lustre_user.h 58/10258/5
Andreas Dilger [Fri, 9 May 2014 04:38:58 +0000 (22:38 -0600)]
LU-5018 libcfs: don't depend on configure for lustre_user.h

Don't depend on configure to detect the presence of <linux/types.h>
in order to define the __u8, __u16, __u32, and __u64 types.  Instead,
just define these types directly if <linux/types.h> is not included
already.

The <linux/types.h> header is available on Linux systems with GCC
installed, which is required to build Lustre anyway.  On non-Linux
systems they should create an appropriate <linux/types.h> compat
header in the include path.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ida0915fe1b5829f3378e459c782844cf9df060e6
Reviewed-on: http://review.whamcloud.com/10258
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoNew tag 2.5.59 2.5.59 v2_5_59 v2_5_59_0
Oleg Drokin [Thu, 15 May 2014 16:30:06 +0000 (12:30 -0400)]
New tag 2.5.59

Change-Id: Ifcb48b768cec2216939ce7ee70b1339b71f62358

5 years agoLU-4998 lustre: unpackage several headers 15/10215/5
John L. Hammond [Tue, 6 May 2014 17:30:02 +0000 (12:30 -0500)]
LU-4998 lustre: unpackage several headers

Remove lustre_idl.h, libiam.h and lustre_lfsck_user.h from the list of
packaged headers. Move conf-sanity 74a (checking that Lustre client
api program can compile and link) to sanity 400a. Add sanity 400b to
check that the headers installed in /usr/include/lustre/ (with the
exception liblustreapi.h) can be compiled without warning.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0e99e3e0d18907488f2f8c94e33c58990262ee8a
Reviewed-on: http://review.whamcloud.com/10215
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
5 years agoLU-2099 osd: clear iobuf up on I/O completion 05/10305/3
Alex Zhuravlev [Tue, 13 May 2014 06:33:03 +0000 (10:33 +0400)]
LU-2099 osd: clear iobuf up on I/O completion

it was a bad idea to clear iobuf on buffer release because the
same buffers can be used few times in case of transient ENOSPC.

Change-Id: Ic1d2ddaa0794f2f6f7d1ba71620e06b4ea7a99d2
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/10305
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4977 llite: Fix the deadlock in balance_dirty_pages() 49/10149/3
Jinshan Xiong [Tue, 29 Apr 2014 04:52:54 +0000 (21:52 -0700)]
LU-4977 llite: Fix the deadlock in balance_dirty_pages()

If the page is already dirtied in ll_write_end() and kernel tries
to call balance_dirty_pages() to write back dirty pages in the same
thread, this is deadlock case if the page is already held by clio.

This can also fix the issue of LU-4873.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iae7f6bd8956e5fc134568d776c9aa3a6b68b1ec5
Reviewed-on: http://review.whamcloud.com/10149
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5048 ldiskfs: SLES ext4-mballoc-extra-checks patch fix 94/10294/2
Bruno Faccini [Mon, 12 May 2014 14:50:54 +0000 (16:50 +0200)]
LU-5048 ldiskfs: SLES ext4-mballoc-extra-checks patch fix

Original SLES patch version, from LU-1812, was missing a latest hunk.
This caused OSTs to be put in read-only mode due to wrong
inconsistencies detected.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I9eb948a7ffbc6dbd11598d11ba94f51902e1e71e
Reviewed-on: http://review.whamcloud.com/10294
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-4713 tests: fix fhandle syscall test progarm 89/10189/3
Bob Glossman [Thu, 1 May 2014 15:51:51 +0000 (08:51 -0700)]
LU-4713 tests: fix fhandle syscall test progarm

Replace the incorrect local definitions in the fhandle test program
with more correct and current ones from SLES #include files.
Local defintions are only used in the case where the fhandle syscall
feature is present in the kernel, but support isn't present in glibc.
For now that particular config is only seen in SLES11SP3,
so the internal and local definitions must match the ones
from that distribution.

Test-Parameters: clientdistro=sles11sp3 testlist=sanity envdefinitions=ONLY=237
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie2106325ecc2b2d2e6aeaba1cc3f8b995f503ba8
Reviewed-on: http://review.whamcloud.com/10189
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4832 ptlrpc: fix incorrect name string in nrs_tbf 41/10241/3
Bob Glossman [Tue, 6 May 2014 23:16:32 +0000 (16:16 -0700)]
LU-4832 ptlrpc: fix incorrect name string in nrs_tbf

Mismatched entry name strings between lproc entry creation
and lproc entry removal led to noisy warnings a umount time.
This fix corrects the code to use "nrs_tbf_rule" for both calls.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I806b87d4571fb307d8199628e00261162f0fa089
Reviewed-on: http://review.whamcloud.com/10241
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-2675 obd: decruft md_enqueue() and md_intent_lock() 05/10205/3
John L. Hammond [Fri, 28 Mar 2014 23:38:37 +0000 (18:38 -0500)]
LU-2675 obd: decruft md_enqueue() and md_intent_lock()

Remove the lmm and lmmsize parameters from both functions, storing
that data in md_op_data when needed. Remove the unused lookup_flags
parameter from md_intent_lock(), and the unused reqp parameter from
md_enqueue(). Add a union ldlm_policy_data * parameter to
md_enqueue(). Remove the unused function lmv_enqueue_remote().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia914318a7c7cbeb59fe86d4a169559cd86f3ad57
Reviewed-on: http://review.whamcloud.com/10205
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4985 kernel: Store kthread_run result in task_struct ptr 66/10266/3
Ryan Haasken [Thu, 8 May 2014 14:18:36 +0000 (09:18 -0500)]
LU-4985 kernel: Store kthread_run result in task_struct ptr

The fix for LU-3498 changed most invocations of kthread_run to store
the result in a variable of task_struct pointer type and check whether
kthread_run returned an error using IS_ERR.  This change updates the
remaining calls to kthread_run to do this as well for consistency.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I18edab018080ec51e9979164234e5bcd02a04f88
Reviewed-on: http://review.whamcloud.com/10266
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
5 years agoLU-4629 utils: fix array overflow 35/10135/3
Dmitry Eremin [Mon, 28 Apr 2014 19:57:36 +0000 (23:57 +0400)]
LU-4629 utils: fix array overflow

Array 'argv' of size 512 may use index value(s) 512.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I808b6f52f0e8b548978290dd08f1f5fc3ce929a1
Reviewed-on: http://review.whamcloud.com/10135
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4916 lwp: don't add connection for missed LWP 72/10272/2
Mikhail Pershin [Thu, 8 May 2014 18:29:24 +0000 (22:29 +0400)]
LU-4916 lwp: don't add connection for missed LWP

The LWP isn't needed for some MDT-MDT connections,
e.g. for MDT0-MDT1, but lustre_lwp_add_conn() is called
for any 'add mdc' marker and cause error.

Patch add LWP connection only where it is needed.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I930559a14a37ee0de27cea93113a3608e7ddf9cc
Reviewed-on: http://review.whamcloud.com/10272
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-5014 osd-ldiskfs: vfs_unlink api changed 35/10235/2
Bob Glossman [Tue, 6 May 2014 17:34:11 +0000 (10:34 -0700)]
LU-5014 osd-ldiskfs: vfs_unlink api changed

In newer kernels the vfs_unlink api changed to take
more arguments.  This patch creates a wrapper to let us adapt
to the different versions of vfs_unlink in old and new kernels.
As vfs_unlink is only used in server code
this only impacts server builds of lustre.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3aa9a305530f74ee010fa5173527a37e048a9ef8
Reviewed-on: http://review.whamcloud.com/10235
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4953 lprocfs: fix missing target_obds on multiple mounts 92/10192/3
James Simmons [Mon, 5 May 2014 16:30:19 +0000 (12:30 -0400)]
LU-4953 lprocfs: fix missing target_obds on multiple mounts

In the case of multiple mountes the target_obds only showed
up for the first mount. The reason for this was that we were
using procsym in obd_type to hold the pointer to the
proc_dir_entry for target_obds. But obd_type is shared across
all lmv/lov object instances. Instead we need to cache the
proc_dir_entry in the private data structure; lov_obd and
lmv_obd; for each type of obd device impacted. Later these
handles will be used for cleanup when the module unloads.

Change-Id: Idf7a78f9ca662af78c217bb1142409b9b0322192
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10192
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4987 lustre: Remove static declaration in anonymous union 76/10176/2
Christopher J. Morrone [Wed, 30 Apr 2014 21:20:27 +0000 (14:20 -0700)]
LU-4987 lustre: Remove static declaration in anonymous union

It is not permitted in C++ to have a static declaration inside
of an anonymous union.  Before "LUSTRE_ANONYMOUS_UNION_NAME"
was added to the code in commit b40f6327bb19b6, the g++ compiler
most likely complained with an error like this:

  error: ‘struct ost_id::<anonymous union>::ostid’ invalid; an
  anonymous union can only have non-static data members [-fpermissive]

The fix from b40f6327bb19b6 conditionally eliminated the anonymous
union when a C++ compiler is being used.  That means that the API
varies depending on your choice of compiler, which is not at all
desirable.

The better fix is to address the static data member that the error
complained about.  This patch changes the code to use an unnamed
struct in place of "struct ostid" inside of the anonymous union.
That name declaration was completely unnecessary anyway, since it
was not used anywhere else.

Change-Id: I59f8341f5f9833d8a144cf2feaa178cb76e643dc
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10176
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-4924 llite: Only kill SGID/SUID bits 53/10153/3
Nathaniel Clark [Tue, 29 Apr 2014 20:24:59 +0000 (16:24 -0400)]
LU-4924 llite: Only kill SGID/SUID bits

Check that attr mode is valid before using it when determining if to
clear SGID and SUID bits in ll_setattr.
Add regression test.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic452590a6fb59010f1ee6b8b0b790557a2540d8c
Reviewed-on: http://review.whamcloud.com/10153
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4877 mdt: tolerate zero md_packed in mdt_fix_reply 16/10116/2
Mikhail Pershin [Sun, 27 Apr 2014 07:08:31 +0000 (11:08 +0400)]
LU-4877 mdt: tolerate zero md_packed in mdt_fix_reply

The assertion for md_packed value is not really needed there,
if it is zero then buffer is not packed in reply and is not
needed, it is enough just unmark big buffer usage.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I4db92ce2ef492069db4dbd4d07c0d69770130fad
Reviewed-on: http://review.whamcloud.com/10116
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4420 fld: retry fld rpc even for ESHUTDOWN 85/10285/2
wang di [Wed, 7 May 2014 22:16:55 +0000 (15:16 -0700)]
LU-4420 fld: retry fld rpc even for ESHUTDOWN

when LWP is being evicted, because it is not replayable,
the request might return ESHUTDOWN or EWOULDBLOCK, instead
of failed, which might cause application failure, fld
client will retry RPC, until the connection is being setup
again or the LWP is being closed.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Iea0480a9ceae455834768e18545796f26f3cef0b
Reviewed-on: http://review.whamcloud.com/10285
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
5 years agoLU-5035 tests: add striped dir recovery test 77/10277/2
wang di [Thu, 8 May 2014 21:53:59 +0000 (14:53 -0700)]
LU-5035 tests: add striped dir recovery test

Add striped dir recovery test to replay-single and
recovery-small.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0301e0b6f16683f2fe7890e0a02e5128eb0d4a50
Reviewed-on: http://review.whamcloud.com/10277
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
5 years agoRevert "LU-2600 osd-zfs: batched object accounting" 71/10271/3
Oleg Drokin [Thu, 8 May 2014 17:54:47 +0000 (17:54 +0000)]
Revert "LU-2600 osd-zfs: batched object accounting"

This is causing lu-4968

This reverts commit 72accbebccb6a542b327e45e9a0903b2951d4bd5.

Change-Id: I039787943f84babcb5dadd1c75b12b0e8fa0e1f0
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/10271
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5025 kernel: kernel update [RHEL6.5 2.6.32-431.17.1.el6] 82/10282/2
Bob Glossman [Wed, 7 May 2014 19:21:35 +0000 (12:21 -0700)]
LU-5025 kernel: kernel update [RHEL6.5 2.6.32-431.17.1.el6]

update RHEL6.5 kernel to 2.6.32-431.17.1.el6

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0dee02ddca3accadc81aa2c5114caa67ec8ae1b0
Reviewed-on: http://review.whamcloud.com/10282
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4690 osp: some cleanup for patch 9511 61/10261/2
wang di [Wed, 7 May 2014 20:23:11 +0000 (13:23 -0700)]
LU-4690 osp: some cleanup for patch 9511

cleanup patch 9511 according to the review

1. fix endian problem in osd-zfs and osp.
2. Few tab and typo fixes.
3. move mti_big_lmm_used back to mdt_stripe_get,
set it in mdt_big_xattr_get is a bit risky.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I85982bf198dddc9e0442e392f3da25cca46dfe03
Reviewed-on: http://review.whamcloud.com/10261
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-1778 llite: fix inconsistencies of root squash feature 00/5700/19
Gregoire Pichon [Thu, 13 Feb 2014 15:33:34 +0000 (16:33 +0100)]
LU-1778 llite: fix inconsistencies of root squash feature

Root squash exhibits inconsistent behaviour on a client when
enabled. If a file is not cached on the client, then root will get
a permission denied error when accessing the file. When
the file has recently been accessed by a regular user and is
still in cache, root will be able to access the file without error
because the permission check is only done by the client that
isn't aware of root squash.

While the only real security benefit from root squash is to deny
clients access to files owned by root itself, it also makes sense
to treat file access on the client in a consistent manner
regardless of whether the file is in cache or not.

This patch adds root squash settings to llite so that client is able
to apply root squashing when it is relevant.

Configuration of MDT root squash settings will automatically be
applied to llite config log as well.

Update cfs_str2num_check() routine by removing any modification
of the specified string parameter. Since string can come from ls_str
field of a lstr structure, this avoids inconsistent ls_len field.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Ie52d04424d0937af9fed777a4e4912c90405c19b
Reviewed-on: http://review.whamcloud.com/5700
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4528 llog: don't write llog in 3-steps 08/10108/10
Mikhail Pershin [Fri, 25 Apr 2014 19:01:51 +0000 (23:01 +0400)]
LU-4528 llog: don't write llog in 3-steps

The llog record my be written by passing just buffer
and writting its header and tail separately. If any write fails
then that cause partially written buffer and corrupted llog. There is
special undo procedure to clean things up after that but that demands
twice more credits for normal operations and for undo case which
is critical in case of wide striping.

Such 3-steps write can be avoided by preparing correct llog record
before calling llog_write().

Patch does the following:
- remove all cases with passing separate buffer for llog_write(),
llog_add(), llog_cat_add() and change API according with that.
- special allocation case for lustre_cfg if it is going to be written
to the llog, it allocates llog header/tail and initialize it.
- uniform error checks after lustre_cfg_new() call to check for NULL
result always instead of ERR_PTR()
- remove 3-steps write in llog_osd code completely
- write llog padding record in single step too
- remove duplicated code from llog_cat_new_log(). Previously it
assigned the next index for the record, changed bitmap and called
llog_write with new index, so that was considered as 'modification'
of record but not append. Meanwhile the llog_osd_write_rec() does
the same intenally for append request. Now llog_cat_new_log() just
calls llog_write() with -1 index (append), avoiding all header
changes outside that call.
- remove numcookie parameter from llog_write_rec() because it is
always 1 anyway
- remove cookie parameter from llog_write() because it is not used,
note, the cookie remains as parameter of llog_write_rec() for llog
catalog purposes.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ibf231021ece9d7cb8a3c4288e12077e11f691661
Reviewed-on: http://review.whamcloud.com/10108
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4609 ofd: auto resume LFSCK after the recovery 10/10010/10
Fan Yong [Sat, 5 Apr 2014 02:29:33 +0000 (10:29 +0800)]
LU-4609 ofd: auto resume LFSCK after the recovery

To prevent the LFSCK to recreate some objects which should be done
via some replayable RPCs, we will postpone the LFSCK auto assuming
after the server restart until the recovery finished.

Such serialization also avoid some race between LFSCK and recovery
to misguide the LFSCK to regard the system as inconsistent.

Another fix is that:
During the OST recovery, the client write RPC may create the missed
OST-object which will cause the real last_id to be greater than the
last_id value stored in the LAST_ID file temporarily. Normally, the
LAST_ID file will be synced between MDT and OST during the recovery,
but we should not assume that the MDT-OST recovery will succeed. If
it failed, then subsequent LFSCK on the OST may regard such LAST_ID
file as crashed, then it will mark the OST as read-only and rebuild
the LAST_ID files.

To avoid such case, before the write RPC to create the lost object,
it needs to update the LAST_ID file firstly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I963f3c1b70c7cad0c943f2485417d2e783768bf1
Reviewed-on: http://review.whamcloud.com/10010
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4972 lfsck: skip .lustre and children for namespace check 43/10143/3
Fan Yong [Sat, 5 Apr 2014 02:28:00 +0000 (10:28 +0800)]
LU-4972 lfsck: skip .lustre and children for namespace check

The sub-directories/files under .lustre are either for partial
repaired objects (such as .lustre/lost+found/) or for special
non-real objects (such as .lustre/obf). It is unnecessary to
do namespace LFSCK for them.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I39e8382c226b2ee19a41e6f47af38a5367f3bdd8
Reviewed-on: http://review.whamcloud.com/10143
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
5 years agoLU-4955 lfsck: reset param when the LFSCK is reset 91/10091/9
Fan Yong [Sat, 5 Apr 2014 02:26:00 +0000 (10:26 +0800)]
LU-4955 lfsck: reset param when the LFSCK is reset

If "--reset" or "-r" is specified when start the LFSCK manually,
then all non-specified parameters will be set as default values.

If the former LFSCK instance completed, then when re-trigger the
LFSCK, it will restart from the beginning, and all non-specified
parameters will be set as default values.

Change the "window" option in lfsck_start to "window_size".

Update the lctl manpage for LFSCK.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5b1d7dd2507ab2f50e152f5a839bf9544a9dc255
Reviewed-on: http://review.whamcloud.com/10091
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
5 years agoLU-4725 mdt: child-parent lock ordering in rename 38/9538/7
Hongchao Zhang [Sat, 5 Apr 2014 04:41:03 +0000 (12:41 +0800)]
LU-4725 mdt: child-parent lock ordering in rename

change rename so that it always has parent-child lock ordering,
otherwise it may deadlock with other operations.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Change-Id: If676da82ca50a20a4bb3aadef0f81c9c5ed3cbcb
Xyratex-bug-id: MRP-1700
Reviewed-on: http://review.whamcloud.com/9538
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4923 lfsck: detailed statistics for namespace LFSCK 30/10030/7
Fan Yong [Sat, 5 Apr 2014 01:37:07 +0000 (09:37 +0800)]
LU-4923 lfsck: detailed statistics for namespace LFSCK

Some enhancement for namespace LFSCK:

1) For the MDT device upgraded from Lustre-1.x and still not enable
   the 'dirdata' feature, then send warning message when mount.

2) More detailed statistics for how many FID-in-dirent entries have
   been repaired and how many linkEA entries have been repaired.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I6a2468b1b8ac4dee91d5d3a26872214391fd3e3b
Reviewed-on: http://review.whamcloud.com/10030
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4987 lustre: Remove duplicate stdio.h include 75/10175/2
Christopher J. Morrone [Wed, 30 Apr 2014 18:59:49 +0000 (11:59 -0700)]
LU-4987 lustre: Remove duplicate stdio.h include

Remove a stray duplicate includ of stdio.h.

Change-Id: I5a40127e9a9f2c9281d1510aea2af1a7a07349b1
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10175
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-4992 llite: validate names 98/10198/4
John L. Hammond [Fri, 2 May 2014 15:18:39 +0000 (10:18 -0500)]
LU-4992 llite: validate names

In ll_prep_md_op_data() validate names according to the same formula
used in mdd_name_check(). Add mdc_pack_name() to validate the name
actually packed in the request.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib56951ab7be7196c79b94dc1848757b4bdf30ce6
Reviewed-on: http://review.whamcloud.com/10198
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-5005 utils: handle ROOT path correctly 11/10211/5
Niu Yawei [Mon, 5 May 2014 03:41:42 +0000 (23:41 -0400)]
LU-5005 utils: handle ROOT path correctly

MDT replies path '\0' to the request of fid2path on ROOT,
client utils should handle it properly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ic7064866b0e8ef33fc0a17e273a120d6d6dae4fe
Reviewed-on: http://review.whamcloud.com/10211
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4961 lustre: remove liblustre.h and obd.h from userspace 94/10194/4
John L. Hammond [Thu, 1 May 2014 21:26:41 +0000 (16:26 -0500)]
LU-4961 lustre: remove liblustre.h and obd.h from userspace

In lustre/tests/ and lustre/utils/ replace inclusion of liblustre.h
and obd.h with libcfs/libcfs.h and lustre/lustre_idl.h. In obd.h raise
a preprocessod error if being compiled in userspace. Replace the
contents of liblustre.h with a single preprocessor error moving what
few functions were still in use to their files of use.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I778b3207ce561d8adef6f7ecbbc899654c23b9d6
Reviewed-on: http://review.whamcloud.com/10194
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
5 years agoLU-5010 llite: disable readahead optimization 20/10220/2
Jinshan Xiong [Mon, 5 May 2014 22:09:43 +0000 (15:09 -0700)]
LU-5010 llite: disable readahead optimization

There exists a race between readahead lock matching and lock
cancellation, where it's difficult to discard pages from radix
tree if readahead process keeps adding pages.

This issue is introduced in patch http://review.whamcloud.com/8523
here I'm going to disable it. The optimization will be added
back in later patch.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ifa729bfc4404ac287d4af3a88ead4790218817f8
Reviewed-on: http://review.whamcloud.com/10220
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4206 tests: cancel data lock before ELC test 50/10250/4
wang di [Wed, 7 May 2014 10:24:33 +0000 (03:24 -0700)]
LU-4206 tests: cancel data lock before ELC test

Since 2,4, MDT will send unlink request to the OST, and OST
will destroy the object and revoke the data lock in the client
cache, i.e. client will not do ELC for data lock during the
rename and unlink. So cancel the data lock before couting
lock block callback counting.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ib216d068e71dce8236f26cb62188fff6d090042a
Reviewed-on: http://review.whamcloud.com/10250
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4690 lod: separate master object with master stripe 11/9511/37
wang di [Thu, 3 Apr 2014 13:09:24 +0000 (06:09 -0700)]
LU-4690 lod: separate master object with master stripe

Separate master stripe with master object, so
1. stripeEA only exists on master object.
2. sub-stripe object will be inserted into master object
as sub-directory, and it can get the master object by "..".

By this, it will remove those specilities for stripe0 in
LMV and LOD. And also simplify LFSCK, i.e. consistency check
would be easier.

And also after this separation, LOD will know whether iterating
the whole stripe or single stripe eaisly, i.e. for master_object,
it will iterate the whole stripes, for sub_stripe, it will only
iterate the single stripe.

This patch also fixes a few things in osp orphan iteration, to
make it work with remote dir entry iteration.

When then master object becomes an orphan, we should
mark all of its sub-stripes as dead object as well,
otherwise client might still be able to create files
under these stripes.

A few fixes for striped directory layout lock:

1. stripe 0 should be locked as EX, same as other stripes.
2. Acquire the layout for directory, when it is being unliked.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6212fb97a2360664b48e0a75424a89c857da2043
Reviewed-on: http://review.whamcloud.com/9511
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-5017 mdd: Do not miss flags when do "lfs mv" 40/10240/2
wang di [Tue, 6 May 2014 13:30:22 +0000 (06:30 -0700)]
LU-5017 mdd: Do not miss flags when do "lfs mv"

la_flags is missing in obdo_from_la and la_from_obdo, so
flags can not be set correctly during migration.

Add test cases in sanity 230b.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ia2665f3362323337e55618614964ead4f2c740a2
Reviewed-on: http://review.whamcloud.com/10240
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3963 client: move llite,lov,target,obdecho to linux list api 44/9944/3
James Simmons [Tue, 22 Apr 2014 18:16:34 +0000 (14:16 -0400)]
LU-3963 client: move llite,lov,target,obdecho to linux list api

Move several of the client components over to the linux
list api.

Change-Id: I8fff62e7c8c3c2f9bf48b0074e574b83770442c3
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9944
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3963 libcfs: convert link list to linux api fld,mdc,osc,mgc 04/9904/5
James Simmons [Thu, 24 Apr 2014 16:30:36 +0000 (12:30 -0400)]
LU-3963 libcfs: convert link list to linux api fld,mdc,osc,mgc

Convert part of the lustre client code over to the linux
list api. This covers the fld,mdc,osc,mgc layers.

Change-Id: I5a2d5de144e77eb85701dd942ad143cb99d8ea69
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9904
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-3963 libcfs: convert LNET layer to linux list api 69/9369/9
James Simmons [Thu, 24 Apr 2014 16:43:58 +0000 (12:43 -0400)]
LU-3963 libcfs: convert LNET layer to linux list api

This patch converts all cfs_list primitives to the linux api
for the LNET layer.

Change-Id: Id790b87d253db759edb921f4828f04b11bbe6fe9
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9369
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
5 years agoLU-5002 flock: accept EDEADLK in sanityn test_74 08/10208/2
John L. Hammond [Sun, 4 May 2014 21:05:58 +0000 (16:05 -0500)]
LU-5002 flock: accept EDEADLK in sanityn test_74

In flocks_test.c t4() acquiring the second flock may legitimately fail
and return -EDEADLK. Handle this and ensure that errors encountered by
the child process are returned by the parent.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I55172add1412377b1c7125efa4177702d8bf1834
Reviewed-on: http://review.whamcloud.com/10208
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4578 ptlrpc: Early replies need to honor at_max 00/9100/7
Chris Horn [Mon, 3 Feb 2014 21:24:01 +0000 (15:24 -0600)]
LU-4578 ptlrpc: Early replies need to honor at_max

When determining whether an early reply can be sent the server will
calculate the new deadline based on an offset from the request
arrival time. However, when actually setting the new deadline
the server offsets the current time. This can result in deadlines
being extended more than at_max seconds past the request arrival
time. Instead, the server should offset the arrival time when updating
its request timeout.

When a client receives an early reply it doesn't know the server side
arrival time so we use the original sent time as an approximation.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I1b7b04bd20ea5d471ab3777f987e89add744b813
Reviewed-on: http://review.whamcloud.com/9100
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4629 ptlrpc: fix NULL pointer dereference of {exp,imp}_obd 62/10062/6
Dmitry Eremin [Wed, 23 Apr 2014 08:01:25 +0000 (12:01 +0400)]
LU-4629 ptlrpc: fix NULL pointer dereference of {exp,imp}_obd

Pointer 'obd' checked for NULL at line 694 may be dereferenced at
line 813.

Pointer 'req->rq_export->exp_obd' checked for NULL at line 1155
may be dereferenced at line 1164. Also there is one similar error
on line 1170.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I4e0d40bb634415a3f7f1a38f66139b89b9f97772
Reviewed-on: http://review.whamcloud.com/10062
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-2675 llapi: find_param cleanup part I 03/10103/2
John L. Hammond [Fri, 25 Apr 2014 17:05:43 +0000 (12:05 -0500)]
LU-2675 llapi: find_param cleanup part I

Add fp_ prefixes to several (dev,type,{u,g}id,{a,c,m}time,...,depth)
members of struct find_param. Remove the unused print_fmt
member. Remove the llapi internal arrays llapi_dir_filetype_table[]
and llapi_filetype_dir_table[] replacing their uses with IFTODT() and
DTTOIF().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0c24d8075493b814f3d3824f48b64d4b088928c5
Reviewed-on: http://review.whamcloud.com/10103
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4864 tests: cleanup shared files in sanity-hsm 73/10073/4
Minh Diep [Thu, 24 Apr 2014 02:28:35 +0000 (19:28 -0700)]
LU-4864 tests: cleanup shared files in sanity-hsm

Test creates shared files need to remove them completely

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ib949326f18ddd3a508fd8605e16f3cafb5a9ee4d
Reviewed-on: http://review.whamcloud.com/10073
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4629 osc: remove constant checks 48/9348/5
Dmitry Eremin [Fri, 21 Feb 2014 16:01:28 +0000 (20:01 +0400)]
LU-4629 osc: remove constant checks

Comparison of unsigned value against 0 is always true or false

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ib03cd9e401d006cce5a8a2f49220458941d2ef19
Reviewed-on: http://review.whamcloud.com/9348
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4795 obd: Remove server_{get,put}_mount_2() functions 49/9749/7
Swapnil Pimpale [Fri, 21 Mar 2014 19:26:36 +0000 (15:26 -0400)]
LU-4795 obd: Remove server_{get,put}_mount_2() functions

This patch fixes server_put_mount() to call server_deregister_mount()
only if the caller is never going to need the mount again. The only
caller of server_get_mount_2(), lustre_find_lwp_by_index(), is
changed to now call server_get_mount() and server_put_mount()
without calling server_deregister_mount().

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I37fd00bd477f946ac1bd8375da4899c2a1fe9e22
Reviewed-on: http://review.whamcloud.com/9749
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
5 years agoLU-4830 tests: only deactivate MDTs of Lustre FSNAME 43/9843/4
Bruno Faccini [Fri, 28 Mar 2014 15:15:25 +0000 (16:15 +0100)]
LU-4830 tests: only deactivate MDTs of Lustre FSNAME

Problem has been discovered using a very specific copytool Lustre
root/archive usage. All MDCs, including archive one, were
deactivated.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I359e001e001b931e0a8ed773e0d476ffc3ea44db
Reviewed-on: http://review.whamcloud.com/9843
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4681 utils: Fix error message when using hostname 48/9848/4
Bobbie Lind [Fri, 28 Mar 2014 21:30:48 +0000 (15:30 -0600)]
LU-4681 utils: Fix error message when using hostname

When running llmount.sh for setting up and testing a filesystem
if the system does not have an accurate line in /etc/hosts the build
fails with a cryptic error message.

This patch adds a little more information to the error message
directing the admin to fix the /etc/hosts error.

Signed-off-by: Bobbie Lind <bobbie.j.lind@intel.com>
Change-Id: I426c1f05d2ab5dedc56bd587072882cf78c1bd43
Reviewed-on: http://review.whamcloud.com/9848
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4934 tests: Account for slow ZFS in sanity-lfsck/9a-b 40/10140/2
Nathaniel Clark [Mon, 28 Apr 2014 22:14:06 +0000 (18:14 -0400)]
LU-4934 tests: Account for slow ZFS in sanity-lfsck/9a-b

Allow lfsck speed to be too slow with ZFS due to it's performance
issues.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id39d9468327a02b648ba2c8b4b131250946a04b1
Reviewed-on: http://review.whamcloud.com/10140
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4849 lfs: Avoid double closedir() on err from cb_mv_init() 05/9905/2
Swapnil Pimpale [Mon, 7 Apr 2014 17:19:09 +0000 (13:19 -0400)]
LU-4849 lfs: Avoid double closedir() on err from cb_mv_init()

In cb_mv_init(), set *dirp to NULL if the parent cannot be opened.
This will avoid a double free when closedir() is called a second
time on the way out of llapi_semantic_traverse()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I115137f01cd4e370f4ef766028ad9269e85ed10a
Reviewed-on: http://review.whamcloud.com/9905
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-4952 osd: wrong paramters for dmu_tx_hold_write 79/10079/2
Liang Zhen [Thu, 24 Apr 2014 12:19:53 +0000 (20:19 +0800)]
LU-4952 osd: wrong paramters for dmu_tx_hold_write

osd_declare_write_commit may pass wrong parameters to
dmu_tx_hold_write when there are multiple IO fragments.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Ic7bd5ce1f42e7777c1a07eb4b9d19f8477da66a0
Reviewed-on: http://review.whamcloud.com/10079
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
5 years agoLU-4951 scripts: report modules changes in dkms RPM config 90/10090/2
Bruno Faccini [Thu, 24 Apr 2014 22:17:38 +0000 (00:17 +0200)]
LU-4951 scripts: report modules changes in dkms RPM config

lvfs.ko and nodemap.ko have been respectively removed and added
from/to distro, so this needs to be accordingly reported into
the script that generates DKMS RPM configuration statically.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I917f79b134fb1d6be48b89c10faf531697fe1a9c
Reviewed-on: http://review.whamcloud.com/10090
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
5 years agoLU-3953 build: fix AC_LANG_SOURCE autoconf warnings 58/10158/2
Jeff Mahoney [Wed, 30 Apr 2014 02:58:52 +0000 (22:58 -0400)]
LU-3953 build: fix AC_LANG_SOURCE autoconf warnings

This fixes several places where the autoconf rules generate the
following warning:

configure.ac:23: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE
call detected in body

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: Ib6a54310853b1e9aa34155e8bec9aae410278f25
Reviewed-on: http://review.whamcloud.com/10158
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4629 lov: fix sscanf format specification 91/9391/4
Dmitry Eremin [Tue, 25 Feb 2014 21:06:20 +0000 (01:06 +0400)]
LU-4629 lov: fix sscanf format specification

sscanf format specification '%d' expects type 'int *' for 'd',
but parameter 3 has a different type '__u32*'

Length of format string "o%.5d" is 11 but array 'oname' of size 10.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I132ba4c4865cc12f831638edddb8d41e5fa2d273
Reviewed-on: http://review.whamcloud.com/9391
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
5 years agoLU-4817 osd: fix some leXX_to_cpu() usage issues 25/9825/4
John L. Hammond [Thu, 27 Mar 2014 19:15:26 +0000 (14:15 -0500)]
LU-4817 osd: fix some leXX_to_cpu() usage issues

In osd fix some endianness conversion issues, like applying
le16_to_cpu() to an integer literal and calling le64_to_cpu() with a
32-bit value.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5c4b9b0c6f5695e1c34f8deac25f8a0c5d547e23
Reviewed-on: http://review.whamcloud.com/9825
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4676 hsm: Fix return value error of ct_run() 12/9412/3
Li Xi [Thu, 27 Feb 2014 07:58:18 +0000 (15:58 +0800)]
LU-4676 hsm: Fix return value error of ct_run()

ct_run() returns 0 after find out that fs_name is invalid.
lhsmtool_posix will exists with 0 after that error happens.
That might mislead scripts calling lhsmtool_posix.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: If167b38ffee0faff9d8eeb603c55b4972ba322d8
Reviewed-on: http://review.whamcloud.com/9412
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
5 years agoLU-4930 llite: add error handler in inode prepare phase 70/10170/6
wang di [Wed, 30 Apr 2014 12:09:13 +0000 (05:09 -0700)]
LU-4930 llite: add error handler in inode prepare phase

Add error handler during inode inialization, so inode will
become bad inode if something bad happens during inode prepare
phase, otherwise the striped directory will not get its layout
and being mis-regarded as normal directory.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I1a08a18f28d4eec1ab7dc7e13fa39585ff65deeb
Reviewed-on: http://review.whamcloud.com/10170
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>