Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-2923 ptlrpc: Stop suppressing pings when IR is unavailable
Li Wei [Sun, 31 Mar 2013 06:48:30 +0000 (14:48 +0800)]
LU-2923 ptlrpc: Stop suppressing pings when IR is unavailable

Currently, IR does not notify LWPs and MDT-MDT OSPs of target
recoveries.  This patch removes OBD_CONNECT_PINGLESS from LWP and
MDT-MDT OSP connect requests.

Although an MGC does not know if IR is administratively disabled on
the MGS or if a particular target is mounted with "noir", it can
detect MGSs that do not support IR at all and MGSs that are
unreachable.  This patch stops suppressing pings under those two
cases.

As a cleanup requested by the reviewers, this patch also replaces the
plain OBD_CONNECT_PINGLESS checks with OCD_HAS_FLAG(..., PINGLESS)
macros.

Change-Id: I993b46c8f33413793d9cf2fa1a73b3635996a206
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5900
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3059 dt: shrink dt_object by 8 bytes on x86_64
John L. Hammond [Fri, 29 Mar 2013 16:28:11 +0000 (11:28 -0500)]
LU-3059 dt: shrink dt_object by 8 bytes on x86_64

Merge struct dt_lock_operations (containing only do_object_lock) into
dt_object_operations.  The DT types that use these two structures do
not have enough variation in their methods to justify separate
structures and it removes an 8 byte pointer member from struct
dt_object.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4372ba23f0f7691ac86e391772a6a6157311cfda
Reviewed-on: http://review.whamcloud.com/5892
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1812 osd-ldiskfs: oti_obj_dentry needs d_sb set
James Simmons [Mon, 8 Apr 2013 11:25:49 +0000 (07:25 -0400)]
LU-1812 osd-ldiskfs: oti_obj_dentry needs d_sb set

Commit 431547b3 (v2.6.33) changed the generic xattr handlers to
use dentry->d_sb rather than dentry->d_inode->i_sb.

This patch ensures it's set before calling the xattr ops, which filter
through the generic xattr handlers.

Really, since any call into the kernel using a dentry can deref d_sb,
it should be set so we'll set it for fsync as well.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I0ce38970cd839a220f852f96632b473011adbdc6
Reviewed-on: http://review.whamcloud.com/5120
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3050 quota: amend sync write checking from 1.8 client
Niu Yawei [Wed, 3 Apr 2013 12:04:21 +0000 (08:04 -0400)]
LU-3050 quota: amend sync write checking from 1.8 client

The 1.8 client sync write doesn't carry OBD_BRW_SYNC flag, to
interoperate with 1.8 client, the checking for sync write on OST
should be amended accordingly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I4179c4878d295dae625f5631b6b02f3b4dd32cb6
Reviewed-on: http://review.whamcloud.com/5928
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2991 osd: Overflow of transaction credits counters
Bruno Faccini [Sun, 7 Apr 2013 17:39:07 +0000 (19:39 +0200)]
LU-2991 osd: Overflow of transaction credits counters

Switching size of transaction credits counters from uchar to
ushort to avoid possible overflow scenarios, like when
wide-striping.
Also allow OSD_TRACK_DECLARES to be undefined without
compile-time errors for unsatisfied-externals/unused vars.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I2588cf11741ca4e3ee80b795a7d4318f9ed4fd3d
Reviewed-on: http://review.whamcloud.com/5830
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2473 ldiskfs: Add ldiskfs support for RHEL 6.4
Christopher J. Morrone [Sat, 16 Mar 2013 09:13:48 +0000 (02:13 -0700)]
LU-2473 ldiskfs: Add ldiskfs support for RHEL 6.4

Add an ldiskfs kernel patch series to support the RHEL 6.4 kernel.

The ldiskfs series selection macro (LB_LDISKFS_SERIES) is fixed up
to use the AS_VERSION_COMPARE, which allows us to check if the kernel
version is greater than or equal to a specific number, rather than
just a simple pattern match.

Change-Id: I894ace2d98e3d5c7481230794e9edf984bce7aee
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3098 mdt: continue on LFSCK start error in mdt_prepare()
John L. Hammond [Wed, 3 Apr 2013 15:09:15 +0000 (10:09 -0500)]
LU-3098 mdt: continue on LFSCK start error in mdt_prepare()

In mdt_prepare() do not allow failure of the OBD_IOC_START_LFSCK
ioctl() to prevent mount from succeeding on slave MDTs.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie3ab2e61037739e3324f6ec28e5f73be861b58f5
Reviewed-on: http://review.whamcloud.com/5931
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3059 lod: shrink lod_object to 128 bytes
John L. Hammond [Thu, 28 Mar 2013 22:05:00 +0000 (17:05 -0500)]
LU-3059 lod: shrink lod_object to 128 bytes

By packing ldo_stripes_allocated into the bitfield containing
ldo_striping_cached and ldo_def_striping_set we reduce the size of
struct lod_object from 136 to 128 bytes on x86_64.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If419560f9187a98fcb034cd9fcd5c854ff467cec
Reviewed-on: http://review.whamcloud.com/5878
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3053 tests: replay-ost-single/6 wait for delete longer
Nathaniel Clark [Thu, 28 Mar 2013 19:14:01 +0000 (15:14 -0400)]
LU-3053 tests: replay-ost-single/6 wait for delete longer

Add similar code from test 7 to test 6 to wait for delete thread and
add variable wait for kbytesfree to settle down.

Test-Parameters: testlist=replay-ost-single mdtfilesystemtype=zfs  mdsfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I89c1270ac5196ca43c17f3a5bd722c0555960065
Reviewed-on: http://review.whamcloud.com/5875
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3047 tests: typo in s-q
Niu Yawei [Thu, 28 Mar 2013 06:59:37 +0000 (02:59 -0400)]
LU-3047 tests: typo in s-q

In s-q, '$LFS rmdir' should be replaced with 'rmdir'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ic828e3b2ab7204bfbf0815062a57cc42dc0e2c0b
Reviewed-on: http://review.whamcloud.com/5865
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-3017 tests: sanityn: remove all previous test run data
Nathaniel Clark [Fri, 22 Mar 2013 13:12:58 +0000 (09:12 -0400)]
LU-3017 tests: sanityn: remove all previous test run data

Ensure all previous data from sanityn is removed.  Test 3 would fail
if it's previous data was still present in the filesystem.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If4aba05e0d78b49ab5e799dea83aa5815f43f20e
Reviewed-on: http://review.whamcloud.com/5810
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2523 racer: don't clobber DURATION
John L. Hammond [Sat, 16 Mar 2013 15:15:22 +0000 (10:15 -0500)]
LU-2523 racer: don't clobber DURATION

Don't clobber racer's DURATION if SLOW is not set to no.

Test-Parameters: envdefinitions=SLOW=yes \
 testlist=racer,racer,racer,racer,racer,racer

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I86c7f54e3fb7a06388d7083001a80b91d09ac27d
Reviewed-on: http://review.whamcloud.com/5741
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
11 years agoLU-2736 mdd: remote dir rename under the same directory.
wangdi [Wed, 8 Jan 2014 16:20:54 +0000 (08:20 -0800)]
LU-2736 mdd: remote dir rename under the same directory.

For "mv src_p/src_c tgt_p/tgt_c", src_c are remote directory,
if src_p and tgt_p are the same directory, and tgt_c does not exist,
this should be allowed, because all the modification will happen on
the single MDT where the parent is.

Test-Parameters: mdscount=2 mdtcount=2
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ie7945933199648aadb9dfe68f00acf32a12c824f
Reviewed-on: http://review.whamcloud.com/5294
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-3026 llite: setattr to override permission check for owner
Jinshan Xiong [Wed, 3 Apr 2013 07:12:00 +0000 (00:12 -0700)]
LU-3026 llite: setattr to override permission check for owner

Otherwise, iozone creates no permission file and will fail at
mdd_permission check.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If9f97aeebe0ff12b535dd3b4ce131eb8079c1b51
Reviewed-on: http://review.whamcloud.com/5924
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2677 obdfilter: add LMA for all OST objects
Mikhail Pershin [Mon, 25 Mar 2013 17:04:51 +0000 (21:04 +0400)]
LU-2677 obdfilter: add LMA for all OST objects

- add LMA to all OST objects so OSD may work with all object
  uniformly
- remove ff_seq and ff_obj from filter_fid because LMA contains
  lma_self_fid already
- change tools to handle these changes

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I699470ef73684aa05d4375da864cda35e4d5541e
Reviewed-on: http://review.whamcloud.com/5838
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.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>
11 years agoLU-3065 osd: move delete agent inode before delete entry
wangdi [Mon, 13 Jan 2014 10:19:42 +0000 (02:19 -0800)]
LU-3065 osd: move delete agent inode before delete entry

Move deleting agent inode before deleting entry, so it will
not access the ino in bh after it has been freed.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ia750a0d2399717466d3e65865e5290ada60a7cb0
Reviewed-on: http://review.whamcloud.com/5884
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.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>
11 years agoLU-2008 utils: make label method work with mmp enabled target
Jian Yu [Wed, 3 Apr 2013 08:46:49 +0000 (16:46 +0800)]
LU-2008 utils: make label method work with mmp enabled target

Commit cfef795 introduced label methods for ldiskfs and zfs to
make mount utility update the label after the first successful
mount. However, if the MMP feature was enabled on an ldiskfs
target before mounting, running mount utility on the target
will fail at ldiskfs_label_lustre() because MMP will prevent
e2label from setting the label.

This patch fixes the above issue by using "tune2fs -f -L" to force
setting the label instead of using e2label in ldiskfs_label_lustre().

Test-Parameters: envdefinitions=SLOW=yes \
clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=mmp

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I6af753d1d841da6493402c153a695eb07ee7ce5b
Reviewed-on: http://review.whamcloud.com/5867
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3083 lmv: swap layout & DNE
jcl [Mon, 1 Apr 2013 22:42:01 +0000 (00:42 +0200)]
LU-3083 lmv: swap layout & DNE

If DNE is on, swap layout RPC must be send to the right MDT
and not always to MDT0

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If57ef688c7628bb15a06e1ba6905d3154a204c8d
Reviewed-on: http://review.whamcloud.com/5912
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-2907 build: Infiniband HW kernel modules of OFA builds not started
frank [Thu, 7 Mar 2013 10:37:41 +0000 (02:37 -0800)]
LU-2907 build: Infiniband HW kernel modules of OFA builds not started

Nodes installed with rhel6 and ofa (external OFED) builds fail during
the node provisioning phase due to missing connectivity to the
Infiniband fabric. Reason is the fact that the HW kernel modules
mlx4_core, mlx4_en, mlx4_ib are not loaded (modprobe'd) during the
system boot phase.

For rhel5 an installation conflict of the startup script
'/etc/init.d/openibd' provided by the OFED kernel-ib RPM and a
distribution RPM (openibd) prohibited the installation of the
kernel-ib RPM. As a workaround the removal of the code sections
inside the SPEC file associated with the kernel-ib that provide the
packaging and configuration of the startup-script had been
implemented. This was accomplished when applying the ed script
'01-play-nice-with-RHEL5.ed' to the kernel-ib SPEC file.

The packaging structure of rhel6 has changed. The RPM opnenibd no
longer exist, therefore the startup of the HW kernel modules will
be missing for rhel6 and the symptom of missing connectivity
occurs.

The patch fixes the problem by searching (via regular expression) for
the canonical (distribution) target name within the name of ed
script and only apply the changes if the cananoical target matches
the ed script name.

ED scripts use a naming convention where the descriptive
name is followed by a ':' separated list of canonical target names.

eg.

<descriptive-name>:<canonical-target-1>:<canonical-target-N>.ed

The string 'canonical-target' has to follow the convention used
for varialble CANONICAL_TARGET in script lbuild.

The original ed file for rhel5 has been updated to a meaningful
name that complies with this new format.

Signed-off-by: frank <Frank.Heckes@intel.com>
Change-Id: Ib25071e08553d28764e02ce50756deb91f757ed0
Reviewed-on: http://review.whamcloud.com/5630
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3057 llite: swap layout fixes - hang at sanity 56x and 56w
Jinshan Xiong [Tue, 2 Apr 2013 23:26:43 +0000 (16:26 -0700)]
LU-3057 llite: swap layout fixes - hang at sanity 56x and 56w

Two issues will be fixed in this patch:
1. in ll_swap_layouts, ll_setattr() should be called with inode mutex
   held.
2. stripes should be reloaded after layout is swapped on the MDT.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ibdb30c78bf8642886afc7343544d7db3bcbe6726
Reviewed-on: http://review.whamcloud.com/5874
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3039 lfsck: misc patch for LFSCK 1.5 debts (1)
Fan Yong [Mon, 25 Feb 2013 14:19:26 +0000 (22:19 +0800)]
LU-3039 lfsck: misc patch for LFSCK 1.5 debts (1)

1) Handle backup and restore case: add FID-in-dirent by re-insert
   the name entry with proper ldiskfs PDO lock processed.

2) Fix some deadlock cases between LFSCK engine thread and OI scrub
   thread: one may fall into wait without waking up the other.

3) lfsck performance test for the cases: lfsck with load, lfsck
   during create, backup/restore, simulate upgrade from 1.8.

4) Other cleanup.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck,lfsck-performance

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ib539291c604d807475cacfdd56d910e9e86d6ac7
Reviewed-on: http://review.whamcloud.com/5764
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2843 llog: restore the size of llog for -ENOSPC
Hongchao Zhang [Fri, 29 Mar 2013 10:36:55 +0000 (18:36 +0800)]
LU-2843 llog: restore the size of llog for -ENOSPC

the llog is NOT aware its valid size, and if there is some invalid
space in the tail of the llog file, which could be caused if the
free space in the last block(512 bytes) of the llog file can't hold
the next record but it failed to get an extra block for -ENOSPC,
then it will mistake the data written partially for normal llog data!

Change-Id: Ie2619843b538cbb64ae21f9f2a12ff85a5a3e8b4
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/5604
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1812 fsfilt: ext_pblock renamed to ext4_ext_pblock
James Simmons [Sun, 31 Mar 2013 13:29:12 +0000 (09:29 -0400)]
LU-1812 fsfilt: ext_pblock renamed to ext4_ext_pblock

For kernels 2.6.35 and above ext_pblock was renamed to
ext4_ext_pblock. With no more RHEL5 kernel support for
ldiskfs we also clean up more macros.

see kernel commit bf89d16f6ef5389f1b9d8046e838ec87b9b3f8b9
for pblock change.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I3ce7f27f6fd6826380e6f2f54b2d50d09d36f78a
Reviewed-on: http://review.whamcloud.com/5001
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1812 fsfilt: ext4_free_blocks() has changed slightly
James Simmons [Thu, 28 Mar 2013 17:52:54 +0000 (13:52 -0400)]
LU-1812 fsfilt: ext4_free_blocks() has changed slightly

ext4_free_blocks() now takes a buffer_head and explicit flags instead
of just metadata.  Test the presence of the buffer_head argument to
determine which ext4_free_blocks() is available.

see kernel commit e6362609b6c71c5b802026be9cf263bbdd67a50e

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I925df73a054613469866ec025ae412ead0ce9e56
Reviewed-on: http://review.whamcloud.com/4991
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1199 build: Cleanup ldiskfs kernel config defines
James Simmons [Sun, 31 Mar 2013 13:12:34 +0000 (09:12 -0400)]
LU-1199 build: Cleanup ldiskfs kernel config defines

Make it more clear what the purpose of the "CONFIG_LDISKFS_*"
defines are with a comment, and separate them from options
that do not necessarily originate in the kernel source. All of
these options are needed for ldiskfs and some are needed by
osd-ldiskfs in the lustre file system. To handle these shared
options a extra autoconf header file is create containing only
the values of interest to osd-ldiskfs.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8e71b6cf471c4317b20fdce14d66f8b2883a226e
Reviewed-on: http://review.whamcloud.com/5675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3043 build: init local variable that breaks sles11sp2 build
Bob Glossman [Wed, 27 Mar 2013 14:38:04 +0000 (07:38 -0700)]
LU-3043 build: init local variable that breaks sles11sp2 build

Fix a recently introduced build breakage by initing a local variable
in new code.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3c9c1a864e2b529b6a6e2578d0bfbfe2c920688c
Reviewed-on: http://review.whamcloud.com/5854
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
11 years agoLU-3012 ubuntu: fix client module build
Robert Read [Fri, 22 Mar 2013 02:56:00 +0000 (19:56 -0700)]
LU-3012 ubuntu: fix client module build

Add --disable-servers to confgiure command when
building the client modules.

Signed-off-by: Robert Read <robert.read@intel.com>
Change-Id: Ie29bf9336c476dd0b8b04b4601d409c4bc7f90f1
Reviewed-on: http://review.whamcloud.com/5804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2988 mgs: Fix two "lctl replace_nids" resource leaks
Li Wei [Tue, 19 Mar 2013 10:26:27 +0000 (18:26 +0800)]
LU-2988 mgs: Fix two "lctl replace_nids" resource leaks

When conf-sanity 66 was run on a single machine, it failed to remove
some Lustre kernel modules in the cleanup phase:

  Modules still loaded:
  ldiskfs/ldiskfs/ldiskfs.o lustre/mdd/mdd.o lustre/mgs/mgs.o
  lustre/quota/lquota.o lustre/mgc/mgc.o lustre/fid/fid.o
  lustre/fld/fld.o lustre/ptlrpc/ptlrpc.o lustre/obdclass/obdclass.o
  lustre/lvfs/lvfs.o lnet/klnds/socklnd/ksocklnd.o lnet/lnet/lnet.o
  libcfs/libcfs/libcfs.o

Some simple experiments quickly narrowed down the bad guy to the first
"lctl replace_nids" command.  In mgs_iocontrol(), the
OBD_IOC_REPLACE_NIDS case does not destroy the lu_env, which
references several Lustre kernel modules via the keys.  This patch
fixes the leak by replacing "RETURN(rc)" with "break".

Local testing revealed another issue, however, after the first issue
was fixed.  unload_modules() complained about a memory leak after
removing all modules:

  LustreError: 14530:0:(class_obd.c:701:cleanup_obdclass()) obd_memory
  max: 28770011, leaked: 18446744073709551608

The leaked number is clearly suspicious.  It turned out that
mgs_replace_nids_log() frees more memory, with regard to accounting,
than it allocates.  This patch also fixes the fake leak.

To prevent regressions, this patch adds error checking to the
cleanup() call in conf-sanity 66.

Change-Id: Ia3b1531b558a2a12947ff9a783b383962ae5da78
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5765
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2467 ptlrpc: Fix an unideal symbol export
Li Wei [Tue, 5 Feb 2013 07:30:40 +0000 (15:30 +0800)]
LU-2467 ptlrpc: Fix an unideal symbol export

The "suppress_pings" symbol is a little bit too short to export.  This
patch exports a function, ptlrpc_pinger_suppress_pings(), instead.

Change-Id: Ifdcf5d2459baa7ae2709572a2fd4d02b72e440df
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5270
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3011 ubuntu: Fix build failures on Ubuntu 12.04
Robert Read [Fri, 22 Mar 2013 18:32:13 +0000 (11:32 -0700)]
LU-3011 ubuntu: Fix build failures on Ubuntu 12.04

Fix "set-but-unused" warning by using the variable,
and move -lreadline to end of link command line.

Signed-off-by: Robert Read <robert.read.@intel.com>
Change-Id: I676e319ed81dbb6ba41d039e7b075b02d5122b48
Reviewed-on: http://review.whamcloud.com/5803
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1330 obdclass: split client-server mount routines
Liu Xuezhao [Mon, 17 Dec 2012 15:31:26 +0000 (23:31 +0800)]
LU-1330 obdclass: split client-server mount routines

Move server side mount routines to obd_mount_server.c.  Const correct
several server_name2xxx type functions.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8abdb6fdd0411f2e75f6fb6ee4ff8502e50ef213
Reviewed-on: http://review.whamcloud.com/2672
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-398 ptlrpc: NRS framework follow-up patch
Nikitas Angelinas [Fri, 1 Feb 2013 10:58:58 +0000 (10:58 +0000)]
LU-398 ptlrpc: NRS framework follow-up patch

This patch addresses some outstanding issues that had been raised
by reviewers of the "Add the NRS framework and FIFO policy" patch,
and include some other improvements, e.g. it reworks the API
slightly in order to optimize some frequently-used operations,
does not uanncessarily policies in liblustre and client-only
kernel builds, and makes sure we hold module references when
required, for policies registering from other modules.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I9306d43e2aef20aa64d6870a56ae99859ce40cd5
Oracle-bug-id: b=13634
Xyratex-bug-id: MRP-73
Reviewed-on: http://review.whamcloud.com/5274
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2442 kernel: protect i_dquot with i_lock
Lai Siyao [Wed, 9 Jan 2013 07:57:47 +0000 (15:57 +0800)]
LU-2442 kernel: protect i_dquot with i_lock

Remove dqptr_sem (but kept in struct quota_info to keep kernel ABI
unchanged), and the functionality of this lock is implemented by
other locks:
* i_dquot is protected by i_lock, however only this pointer, the
  content of this struct is by dq_data_lock.
* Q_GETFMT is now protected with dqonoff_mutex instead of dqptr_sem.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I6be343fb7e431bb3b0ce68066a36f621ebdd9df5
Reviewed-on: http://review.whamcloud.com/5010
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2189 tests: ensure sync stability before sanityn/36
Nathaniel Clark [Thu, 14 Mar 2013 18:41:28 +0000 (14:41 -0400)]
LU-2189 tests: ensure sync stability before sanityn/36

Encourage data to be fully sync'd before getting new measurements.

Test-Parameters: testlist=sanityn  mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I42be5714b59cd4c22c65d7524f2b71ec0a07dfa4
Reviewed-on: http://review.whamcloud.com/5722
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2790 ldlm: handle lvbo_init failure in ldlm_resource_get
Fan Yong [Tue, 19 Feb 2013 00:42:58 +0000 (08:42 +0800)]
LU-2790 ldlm: handle lvbo_init failure in ldlm_resource_get

Under some special cases, such as RAM pressure, lvbo_init()
may be failed, then the caller - ldlm_resource_get() should
handle the failure to prevent subsequent operations to use
non-exist resource.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I0eabbf5daaaba9aa163a45f24b6b621477ec4d32
Reviewed-on: http://review.whamcloud.com/5699
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3068 build: fix 'incorrect expression' errors
Sebastien Buisson [Fri, 29 Mar 2013 13:30:48 +0000 (14:30 +0100)]
LU-3068 build: fix 'incorrect expression' errors

Fix 'program hangs' defects found by Coverity version 6.5.1:
Array compared against 0 (NO_EFFECT)
Comparing an array to null is not useful.
Copy-paste error (COPY_PASTE_ERROR)
This line looks like a copy-paste error.
Self assignment (NO_EFFECT)
Assignment operation has no effect.
Side effect in assertion (ASSERT_SIDE_EFFECT)
Assignment has a side effect. This code will work differently in a
non-debug build. You might have intended to use a comparison instead.
Wrong sizeof argument (SIZEOF_MISMATCH)
Passing argument is suspicious.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Icf6ea9632da6159beca0fd9fd3ff9bb57effc305
Reviewed-on: http://review.whamcloud.com/5887
Tested-by: Hudson
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3066 llite: fix crash in fdatasync(directory)
Dmitry Eremin [Fri, 29 Mar 2013 11:22:21 +0000 (15:22 +0400)]
LU-3066 llite: fix crash in fdatasync(directory)

kernel NULL pointer dereference for fdatasync(directory)

fd = open("/mnt/lustre", O_RDONLY|O_NONBLOCK|O_DIRECTORY);
fdatasync(fd);
close(fd);

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ib14b25d1694131e1a65373654008b7f337ce959e
Reviewed-on: http://review.whamcloud.com/5886
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3035 clio: improper LASSERT in ll_file_io_generic()
Niu Yawei [Thu, 28 Mar 2013 03:20:57 +0000 (23:20 -0400)]
LU-3035 clio: improper LASSERT in ll_file_io_generic()

This LASSERT was introduced from the fix of LU-2910, and
which is incorrect, since the crw_count could be changed
in lov_io_rw_iter_init() even if no any read/write done.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ib2cee88f0a7f75f8fb63330912aa053fb5b9393e
Reviewed-on: http://review.whamcloud.com/5864
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2909 osc: flush until no dirty in osc_enter_cache()
Niu Yawei [Fri, 15 Mar 2013 07:48:43 +0000 (03:48 -0400)]
LU-2909 osc: flush until no dirty in osc_enter_cache()

In osc_enter_cache(), when there is high contention on grant, the
returned grant could be consumed by other process immediately, then
we should repeat flush until get enough grant or no dirty to be
flushed. Otherwise, mmap writer could easily get -EDQUOT on the
osc_enter_cache() and result in SIGBUS at the end.

Because we now changed to async flush in osc_enter_cache(), the
wakeup condition is changed accordingly.

This patch also temporarily disabled osc lru shrinker in
osc_io_unplug() to avoid the potential stack overrun problem.
See LU-2859.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I0c7c90ffe27dab6ded7ad07ed78017acb8665d59
Reviewed-on: http://review.whamcloud.com/5732
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2388 statahead: race in do_sa_entry_fini()
Lai Siyao [Tue, 26 Mar 2013 08:12:11 +0000 (16:12 +0800)]
LU-2388 statahead: race in do_sa_entry_fini()

Two fixes:
* When iterating sa_entry list in do_sa_entry_fini(), there is
  no lock, as may cause one entry put twice. To fix this, all
  entries are put in one list, and only 'scanner' will drop
  entry from this list.
* sa_entry may be linked to sai_sent_entries, but not hashed
  yet, if ll_sa_entry_fini() is called at this moment, this
  sa_entry may be unhashed.

Also include minor cleanup:
* rename do_sai_entry_fini() to do_sa_entry_fini().
* rename do_sai_entry_to_stated() to do_sa_entry_to_stated().
* rename do_statahead_interpret() to ll_post_statahead() to
  distinguish from ll_statahead_interpret().
* ll_post_statahead() always post handle statahead from received
  list to simplify logic.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3d0911d0bd3b940c9650473099604646408200c4
Reviewed-on: http://review.whamcloud.com/5842
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1199 build: Relocate missed lbuild-fc18
Christopher J. Morrone [Thu, 28 Mar 2013 17:29:25 +0000 (10:29 -0700)]
LU-1199 build: Relocate missed lbuild-fc18

lbuild-fc18 was missed in the move of the other lbuild files
to contrib/lbuild.  This relocates that file as well.

Change-Id: I2775f1e0aa4c7d17d2e1d8a114f2bea3702fec68
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5872
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3024 test: use facet name in init_param_vars
John L. Hammond [Mon, 25 Mar 2013 16:15:18 +0000 (11:15 -0500)]
LU-3024 test: use facet name in init_param_vars

When configuring jobstats init_parm_vars should call
set_conf_param_and_check with the facet name (client) rather then the
hostname.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I00b99ec3172d3e108fb6dd6d94825badf81e84df
Reviewed-on: http://review.whamcloud.com/5835
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2826 tests: Re-enable sanity/18
Nathaniel Clark [Thu, 14 Mar 2013 18:28:32 +0000 (14:28 -0400)]
LU-2826 tests: Re-enable sanity/18

Due to ZFS work in LU-2449, sanity/18 should now work correctly.

Test-Parameters: mdtfilesystemtype=zfs mdsfilesystemtype=zfs  ostfilesystemtype=zfs testlist=sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I5d9d986b00a36a2b5f30ef9b4ff3d52779070498
Reviewed-on: http://review.whamcloud.com/5720
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2900 llite: Null deref in ll_fsync:mkdir on NFSmounted Lus
Patrick Farrell [Mon, 18 Mar 2013 16:09:46 +0000 (11:09 -0500)]
LU-2900 llite: Null deref in ll_fsync:mkdir on NFSmounted Lus

When a Lustre file system is mounted via NFS and a mkdir
operation is attempted, a null pointer dereference occurs
in ll_fsync.

With 2.x, Lustre added support for different VFS fsync APIs
that do not include a dentry parameter.

To make the logic the same in all cases, the old ll_fsync
interface was changed to pull the inode from f_dentry
in the *file parameter.

In some cases when using the old ll_fsync interface, the
caller does not set the f_dentry part of the *file parameter
resulting in a NULL dereference. The fix to this is to
restore the old logic in those cases: when a dentry
parameter is provided, get the inode from that parameter
rather than the file parameter.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I93ecf04e23121c76e571383d74e2fc902565614e
Reviewed-on: http://review.whamcloud.com/5585
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3038 mgs: clear mti in the end of marker
wangdi [Tue, 26 Mar 2013 19:56:43 +0000 (12:56 -0700)]
LU-3038 mgs: clear mti in the end of marker

The target information should be cleared when it met
the end marker of each mdc/osc, otherwise, the information
left over in mti will be brought into the config log of
next target, even worse some target might be identfied
wrongly as failover pair.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I67838914825caf0a9b4da8bc3cdfbb779a6eadd4
Reviewed-on: http://review.whamcloud.com/5851
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2995 osd: Delete the ref of remote parent in del ..
wangdi [Mon, 6 Jan 2014 01:44:54 +0000 (17:44 -0800)]
LU-2995 osd: Delete the ref of remote parent in del ..

Try to delete remote dir from REMOTE PARENT during delete ..,
because the object might not be destroyed if it is being
opened by someone else, instead it will be inserted to the
ORPHAN dir, so if it does not delete the {.., REMOTE_PARENT},
it will be two parents for this remote dir.

Add remote object FID into op_data->op_fid3, so the stale check
will not fail during remote open.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6bbac9174869ae02f385ac52740bb2046f0f1bab
Reviewed-on: http://review.whamcloud.com/5791
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2926 ldiskfs: crash in is_bad_inode() on SLES11 SP2
James Simmons [Wed, 20 Mar 2013 13:16:03 +0000 (09:16 -0400)]
LU-2926 ldiskfs: crash in is_bad_inode() on SLES11 SP2

Fix error handling in ldiskfs_xattr_inode_iget
for SLES11 SP2 platform

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I05568cac5f4cc8a12cfd95034a99b06541289673
Reviewed-on: http://review.whamcloud.com/5709
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1199 build: Clean out the build directory
Christopher J. Morrone [Tue, 26 Mar 2013 16:31:22 +0000 (09:31 -0700)]
LU-1199 build: Clean out the build directory

Clean up the build directory.  Move in the direction of reserving
"build/" for the special-purpose Makefile that lives there.
Eventually we could rewrite the autoconf tests to eliminate that
Makfile, and the build directory could disappear altogether (after
finding homes for anything else that is left).

The autoconf m4 file move into a top level "config" directory.

Most other things that have moved are put in the new "contrib"
top-level directory.  For instance, "contrib/lbuild" contains
all of the lbuild-related files, and "contrib/git-hooks" contains
the git hooks for lustre developers.

Most of the moved files were unchanged, however the lbuild scripts
needed some tweaking to deal with the new location.

Because of the way that Intel's build farm and git hooks expect to
find certain files in fixed locations I have had to leave a few
symlinks in place that point to the new locations.

Change-Id: I04dc529d4f4060b892e1e4eaa8613bbc3337c414
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5035
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2682 fid: cleanup direct _id and _seq access
wangdi [Fri, 20 Dec 2013 17:33:40 +0000 (09:33 -0800)]
LU-2682 fid: cleanup direct _id and _seq access

Access/copying the individual _id and _seq fields should be
replaced with the _oi field, and compatibility macros for
accessing the individual fields should be removed.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: Iedce5cfb308c1b6de6aa24872b8c71e7b616b67c
Reviewed-on: http://review.whamcloud.com/5601
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2970 lov: wait for active IOs before deleting the object
Jinshan Xiong [Thu, 21 Mar 2013 19:00:55 +0000 (12:00 -0700)]
LU-2970 lov: wait for active IOs before deleting the object

lov_layout_operations::llo_delete will be called when the file's
layout is going to change or file is being taken out of cache so we
must make sure there is no active IOs on this object.

For layout change case, it's lov_layout_change()'s responsibility to
make sure there is no active IOs before entering into llo_delete.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id56a66548f9f05555e6d112355d2a71da5ab4705
Reviewed-on: http://review.whamcloud.com/5812
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1187 osd: add remote entry insert for ZFS DNE.
wangdi [Sat, 4 Jan 2014 17:00:23 +0000 (09:00 -0800)]
LU-1187 osd: add remote entry insert for ZFS DNE.

Add remote entry insert in osd_index_insert for DNE on ZFS.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: I4c2337e69e4c4c4754b8ff7995dd69318f3d674d
Reviewed-on: http://review.whamcloud.com/4933
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
11 years agoLU-2783 ofd: Implement OBD_IOC_GET_OBJ_VERSION
Li Wei [Tue, 19 Feb 2013 02:13:02 +0000 (10:13 +0800)]
LU-2783 ofd: Implement OBD_IOC_GET_OBJ_VERSION

This patch implements OBD_IOC_GET_OBJ_VERSION for ofd, so that tests
can use "lctl getobjversion" on OST objects.  jt_get_obj_version() now
takes ID and group pairs, as well as FIDs, for OST objects.  Although
the code are for testing purposes only, dereferencing an ioc_inlbuf
without checking its size is still unacceptable.  Hence,
mdt_ioc_version_get() is changed to check sizes first.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: If259aeca281dcb3f4ee4dc719719f722cf72cad4
Reviewed-on: http://review.whamcloud.com/5467
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3025 hsm-llapi: bad type cast in llapi_hsm_copytool_fini()
jcl [Tue, 12 Feb 2013 09:25:32 +0000 (10:25 +0100)]
LU-3025 hsm-llapi: bad type cast in llapi_hsm_copytool_fini()

Correct a wrong type cast in llapi_hsm_copytool_fini()

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Iebe4a36178afdfad8b99140efd6b3afc8b9eb942
Reviewed-on: http://review.whamcloud.com/5837
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2646 osd: add special flag for agent inode.
wangdi [Sun, 22 Dec 2013 11:13:21 +0000 (03:13 -0800)]
LU-2646 osd: add special flag for agent inode.

1. Add special flag into the LMA of agent inode of remote entry,
so lfsck check can skip this inode.

2. Assign a local FID for Agent dir, so lfsck can skip this agent
dir as well.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ifc50fbc531a4306a76d5263dd6135c613d7a2a30
Reviewed-on: http://review.whamcloud.com/5625
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3009 tests: failure on conf-sanity test_17
Bob Glossman [Fri, 22 Mar 2013 23:33:56 +0000 (16:33 -0700)]
LU-3009 tests: failure on conf-sanity test_17

Test 17 is failing due to the failure of the debugfs command
in this subtest.  The command fails because MGSDEV is undefined.
Using an alternative that is available in the current test framework.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I93407dd3c349d91a2ea4690b70dd67c68d65582c
Reviewed-on: http://review.whamcloud.com/5816
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3002 tests: Fix an OST index issue in replay-single
Li Wei [Thu, 21 Mar 2013 07:55:16 +0000 (15:55 +0800)]
LU-3002 tests: Fix an OST index issue in replay-single

When run with 16 OSTs, replay-single 90 happened to pick ost14 as
ostfail and complained:

  lfs find does not report the affected lustre-OST000d_UUID for fd

The "d" in "fd" is a hexadecimal OST index, taken from
"lustre-OST000d_UUID".  Because the actual file names use decimal OST
indices, the test failed to match the file "f13" with "fd".  Moreover,
the test assumes the OST index is a single-digit number, which may not
be case with more than 15 OSTs.  This patch changes the test to simply
calculate the index from the facet name.

Test-Parameters: ostcount=32 testlist=replay-single envdefinitions=ONLY=90
Change-Id: I0c95d28f83c41cabf4ed8e5ed618897d6000da3b
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5796
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-3003 tests: Do "lctl conf_param" on mds1 in t32_test()
Li Wei [Mon, 25 Mar 2013 05:59:25 +0000 (13:59 +0800)]
LU-3003 tests: Do "lctl conf_param" on mds1 in t32_test()

With DNE, conf-sanity 32c inovkes "lctl conf_param" on mds2's host,
which may not be where the MGS is running, causing errors like:

  CMD: c05 /usr/sbin/lctl conf_param
  t32fs-MDT0001.mdc.max_rpcs_in_flight=9
  c05: No device found for name MGS: Invalid argument
  c05: This command must be run on the MGS.
  c05: error: conf_param: No such device
   conf-sanity test_32c: @@@@@@ FAIL: Setting MDT1
  "max_rpcs_in_flight"

This patch changes these "lctl conf_param" commands to set the same
parameters but on mds1's host, which always hosts the MGS.

Change-Id: Ibdca2802eaf33db504ed2b41a356d7a18be33f10
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5829
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1897 test: replay-single test_70b dbench not found
Keith Mannthey [Wed, 20 Mar 2013 23:10:51 +0000 (16:10 -0700)]
LU-1897 test: replay-single test_70b dbench not found

dbench is taking too long to start. It was observed
that a 12 seconds sleep was not long enough to start
dbench on all clients.

I added a loop to rally all clients before starting
the testing and improved the error messages.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I7b0fce4c39c003c4db23686b295fb5e45a6f8a92
Reviewed-on: http://review.whamcloud.com/5761
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2556 osp: count requests in osp_sync_interpret() only
Alex Zhuravlev [Mon, 18 Feb 2013 06:04:07 +0000 (10:04 +0400)]
LU-2556 osp: count requests in osp_sync_interpret() only

as it's called by ptlrpc always, so any counting in
osp_sync_request_commit_cb() is extra and wrong.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ib67ba11d2c382b1ff9cd19522ce9e15b57ebca94
Reviewed-on: http://review.whamcloud.com/5453
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-1330 obdclass: splits server-side object stack from client
Liu Xuezhao [Fri, 22 Mar 2013 15:07:59 +0000 (10:07 -0500)]
LU-1330 obdclass: splits server-side object stack from client

1. removes client-side dependencies of server object stack:
md_object.h/md_local_object.c, and dt_object.h/dt_object.c.
2. removes client-side dependencies of lustre_idmap.h/idmap.c
3. splits some server-side acl handlings

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie3a3cd998ef7b2d7d1090673a7c2d8f1152ca976
Reviewed-on: http://review.whamcloud.com/2676
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
11 years agoLU-2951 mdt: Increase bc_req_max_size for MDS_REQUEST_PORTAL
Li Wei [Wed, 13 Mar 2013 15:11:34 +0000 (23:11 +0800)]
LU-2951 mdt: Increase bc_req_max_size for MDS_REQUEST_PORTAL

Large EA tests triggered error messages like this on MDSs:

  10:38:21:LNetError: 3022:0:(lib-ptl.c:190:lnet_try_match_md())
  Matching packet from 12345-10.10.17.9@tcp, match 1429230968490588
  length 65928 too big: 117674 left, 49386 allowed

These were the REINT_SETXATTR requests carrying large EA values.  They
were dropped because the MDSs did not expect request buffers larger
than 49386 bytes.  This patch increases bc_req_max_size (and
bc_rep_max_size) for MDS_REQUEST_PORTAL (and MDS_REPLY_PORTAL) to
accommodate REINT_SETXATTR requests (and MDS_GETXATTR replies) with
255-byte names and 65536-byte values (or 65536-byte lists of EA
names).

Change-Id: Ifdcda6d3e91aa6115e5cafd5abd6c89b15485020
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5703
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2445 utils: lfs migrate support
jcl [Wed, 6 Mar 2013 21:40:42 +0000 (22:40 +0100)]
LU-2445 utils: lfs migrate support

Add a new command migrate to lfs utility.
migrate takes sames args as setstripe and a --block option
It:
- create a volatile file based on new stripe information
- copy file data to this volatile file
- swap the 2 layouts
- if --block is set, take the grouplock to block other access
  during copy

So after migrate the file is restriped (mtime, atime are not
changed).
lfs_migrate is also updated to use the new call and
keeps the rsync mode as a fallback.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I96bafb0be9bc273295c4c900c65b4028864fcbaa
Reviewed-on: http://review.whamcloud.com/5620
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-2895 osp: return proper error in osp_precreate_reserve
Niu Yawei [Tue, 12 Mar 2013 09:41:18 +0000 (05:41 -0400)]
LU-2895 osp: return proper error in osp_precreate_reserve

Make sure the osp_precreate_reserve() always return proper error
when reserving object failed.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9d16135091ebe5ef1243416a15722c4859026e46
Reviewed-on: http://review.whamcloud.com/5683
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2960 lmv: typo fix for output of "lfs mdts"
wangdi [Thu, 2 Jan 2014 09:10:05 +0000 (01:10 -0800)]
LU-2960 lmv: typo fix for output of "lfs mdts"

Using ltd_idx(in lmv_tgt_descs) directly for the output of
lctl get_params lustre.lmv.*-clilmv-*.target_obd.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6a4ff4b82e4d413baf1f36f85764d3c11cd82435
Reviewed-on: http://review.whamcloud.com/5782
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2756 ost: buffer utilization rate of OST rqbd
Liang Zhen [Thu, 7 Mar 2013 07:24:39 +0000 (15:24 +0800)]
LU-2756 ost: buffer utilization rate of OST rqbd

This patch covered a couple of things:
- different request buffer size for different OST services
  only requests on OST_IO_PORTAL need large buffers

- add extra 46K to OST_IO_BUFSIZE (buffer size is increased to 64K)
  size of OST_IO_MAXREQSIZE is about 18K, if OST_IO_BUFSIZE is only
  a little bigger than OST_IO_MAXREQSIZE, then each rqbd can only fit
  in 2-3 request even there are 18K bytes left in this rqbd, memory
  utilization rate is low. Extra bytes can make buffer utilization
  rate increase to 72%. Also, it can avoid version compatibility
  issue in the future if we want to increase request size again.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Iaf8b45520b000dd5219a4af2ec3f5b2ea7f53134
Reviewed-on: http://review.whamcloud.com/5626
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-2927 mdt: Not return -EREMOTE for open lock.
wangdi [Sat, 28 Dec 2013 04:10:57 +0000 (20:10 -0800)]
LU-2927 mdt: Not return -EREMOTE for open lock.

Instead of returning -EREMOTE for open_lock, it will check
the open lock by the DISP_OPEN_LOCK, otherwise it will cause
transno being wrongly set to 0.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4f3bccea87872ca191b0b6c2142e8897be3d731a
Reviewed-on: http://review.whamcloud.com/5694
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2920 autoconf: delete unused LB_LINUX_MODPOST
Minh Diep [Wed, 6 Mar 2013 18:21:31 +0000 (10:21 -0800)]
LU-2920 autoconf: delete unused LB_LINUX_MODPOST

LB_LINUX_MODPOST does not seem to be used anywhere.

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ibec2002ae8b74b9c6f1f6df82a35d44bd00916dc
Reviewed-on: http://review.whamcloud.com/5615
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoNew tag 2.3.63 2.3.63 v2_3_63 v2_3_63_0
Oleg Drokin [Fri, 22 Mar 2013 18:54:19 +0000 (14:54 -0400)]
New tag 2.3.63

Change-Id: I02e9d699d3a7c5dc4253ad24dee0b10651cb4ba7
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2398 osc: ignore layout for osc_lru_shrink()
Jinshan Xiong [Thu, 14 Mar 2013 22:34:57 +0000 (15:34 -0700)]
LU-2398 osc: ignore layout for osc_lru_shrink()

osc_lru_shrink() doesn't need to check verify layout change
because layout can't be destroyed if a page already exists.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I034c15cbecfaf1491d7d7fcb992b74e3d94d9fa5
Reviewed-on: http://review.whamcloud.com/4701
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2955 tests: make replay-ost-single/8b SLOW for ZFS
Nathaniel Clark [Tue, 19 Mar 2013 14:35:55 +0000 (10:35 -0400)]
LU-2955 tests: make replay-ost-single/8b SLOW for ZFS

This test runs dd with osync, which is currently a VERY slow
operation, so mark it slow until LU-2887 is addressed.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I3f55278490bd3c2e3bce8a2de58828a3a716b2fe
Reviewed-on: http://review.whamcloud.com/5767
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2405 tests: account for inter-op testing sanity/17g
Nathaniel Clark [Mon, 18 Mar 2013 18:17:31 +0000 (14:17 -0400)]
LU-2405 tests: account for inter-op testing sanity/17g

Account for where patch hasn't been applied and skip known broken
servers.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I1dd354c36c38e2569ce0cfaf57d4cd35a65117ff
Reviewed-on: http://review.whamcloud.com/5754
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2813 hsm: Add user credential information to copy tool RPC
jcl [Thu, 14 Feb 2013 17:18:49 +0000 (18:18 +0100)]
LU-2813 hsm: Add user credential information to copy tool RPC

Add MDT_BODY data to the RPC used for coytool, so the
coordinator can make some check based on the user

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ia45aacfdc78411f7c202bafb6bd6411f686606a6
Reviewed-on: http://review.whamcloud.com/5436
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2783 include: Fix a conditional indentation
Li Wei [Tue, 19 Feb 2013 02:07:03 +0000 (10:07 +0800)]
LU-2783 include: Fix a conditional indentation

Just an indentation fix to make the conditional expression in
fid_is_sane() easier to read.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I1112d7d43c29f032c79277c6434d4c02e96e49bd
Reviewed-on: http://review.whamcloud.com/5466
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2743 mgs: Add a missing rc reset
Li Wei [Thu, 14 Mar 2013 15:02:12 +0000 (23:02 +0800)]
LU-2743 mgs: Add a missing rc reset

Current mgs_write_log_target() does not reset rc when EALREADY is
found.  This may cause the positive errno to leak to upper layers and
eventually to wire.  This patch adds the missing rc reset.

Change-Id: I0ba8a0decdb9583224a5de02f630742ae94fff39
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5730
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2743 llite: Fix a negative hpk_errval assignment
Li Wei [Thu, 14 Mar 2013 14:52:35 +0000 (22:52 +0800)]
LU-2743 llite: Fix a negative hpk_errval assignment

The hpk_errval field should store positve errnos.  This patch fixes a
place where errnos are assigned to hpk_errval as negative numbers.

Change-Id: I77b1f9e6a19a64aedcdcc5fe38b08babb810a472
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5729
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2929 build: fix unused/uninitilized virables error
James Simmons [Tue, 12 Mar 2013 18:32:19 +0000 (14:32 -0400)]
LU-2929 build: fix unused/uninitilized virables error

As reported by gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2).

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I05aeb88dbd00b6b005ddde543a527339a9d66ce0
Reviewed-on: http://review.whamcloud.com/5656
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
11 years agoLU-2335 lnet: remove unnecessary libcfs include
Peng Tao [Thu, 15 Nov 2012 09:13:02 +0000 (17:13 +0800)]
LU-2335 lnet: remove unnecessary libcfs include

libcfs_pack/unpack.h are only needed for WINNT.
Only include them when necessary.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibe6230d37534fd087c2afe6166d10259fd59c076
Reviewed-on: http://review.whamcloud.com/4647
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
11 years agoLU-2675 cleanup: remove unused recov_thread.c and llog code
John L. Hammond [Thu, 28 Feb 2013 09:14:30 +0000 (03:14 -0600)]
LU-2675 cleanup: remove unused recov_thread.c and llog code

Remove recov_thread.c and the following exported functions:
  llog_cat_process_thread
  llog_obd_origin_add
  llog_catalog_list
  llog_receptor_accept
  llog_origin_connect
  llog_handle_connect
  llog_obd_repl_cancel
  llog_obd_repl_sync
  llog_obd_repl_connect
  llog_get_cat_list
  llog_put_cat_list
  llog_recov_thread_start
  llog_recov_thread_stop

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I620c641646294fcf697f1e2d4d1f389d71bb3ddd
Reviewed-on: http://review.whamcloud.com/5190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
11 years agoLU-2396 ofd: Remove unmaintained brw_stats
John L. Hammond [Thu, 28 Feb 2013 04:01:43 +0000 (22:01 -0600)]
LU-2396 ofd: Remove unmaintained brw_stats

Remove unused nid_brw_stats member from struct nid_stat and the files
/proc/fs/lustre/obdfilter/*/{brw_stats,exports/*/brw_stats}.  If the
corresponding osd has a brw_stats proc entry then add a symlink from
the ofd proc dir.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I79a10816c612f67b80172d679b875ca94157b5f4
Reviewed-on: http://review.whamcloud.com/4689
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
11 years agoLU-2961 build: Fix commit-msg to love new files
Li Wei [Thu, 14 Mar 2013 07:54:16 +0000 (15:54 +0800)]
LU-2961 build: Fix commit-msg to love new files

It is annoying to receive errors like this when the changes being
committed include new files:

  $ git commit -asv --amend
  line 65: diff --git a/lustre/include/lustre_errno.h
  b/lustre/include/lustre_errno.h
  new file mode 100644
  error: commit message invalid signoff section line
  line 66: index 0000000..89b8d1b
  error: commit message invalid signoff section line
  line 67: --- /dev/null
  error: commit message invalid signoff section line
  ...

This patch adds the "new file mode" pattern to commit-msg.  Hopefully,
this is enough.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I39c985d51afb04184322a8fc725bcef3938bf419
Reviewed-on: http://review.whamcloud.com/5712
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1434 llog: remove unused llog_create_rec struct
Andreas Dilger [Fri, 6 Jan 2012 23:03:13 +0000 (16:03 -0700)]
LU-1434 llog: remove unused llog_create_rec struct

Remove the unused llog_create_rec and llog_orphan_rec definitions
from wireshark.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I21c1215b627fb972d8da89a7ff1965848027cab0
Reviewed-on: http://review.whamcloud.com/2877
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-812 ldiskfs: super_operations->dirty_inode now takes a flag
James Simmons [Tue, 5 Mar 2013 12:50:54 +0000 (07:50 -0500)]
LU-812 ldiskfs: super_operations->dirty_inode now takes a flag

Currently this flag is unused by ext4, so just pass in 0.  This change
happened in kernel commit aa38572954ade525817fe88c54faebf85e5a61c0.
Apparently the flag is used to tell the difference between timestamp
updates and anything else.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I24536546256f5f043c1f53e15220b0c956be343f
Reviewed-on: http://review.whamcloud.com/4966
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-1994 kernel: fix reference counting with l_dentry_open
Jeff Mahoney [Thu, 21 Feb 2013 15:05:53 +0000 (10:05 -0500)]
LU-1994 kernel: fix reference counting with l_dentry_open

Commit 78b1d1bd (LU-1994 kernel: 3.6 dentry_open uses struct path
as first arg) added support for the new dentry_open call that
accepts struct path instead of a dentry/vfsmount pair, but missed
the new reference counting rules that go along with it.

Upstream commit 765927b2 also makes dentry_open grab references itself
so it no longer frees references that weren't passed to it.

On failure, we'll end up with an extra reference to the dentry
that was passed in.

Since new dentry_open is the one that will be around for the
foreseeable future, let's just map to that directly for the path case.

For the other two cases, we'll take the references ourselves in
ll_dentry_open, free them on failure, and adjust callers to expect
that it won't free any references passed to it.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I05a95cf735a5b2d70273a485335d571fcda7a6b0
Reviewed-on: http://review.whamcloud.com/5330
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1798 tests: don't set jobid if not changing
Andreas Dilger [Sat, 1 Sep 2012 01:15:42 +0000 (19:15 -0600)]
LU-1798 tests: don't set jobid if not changing

Don't set jobid_var conf_param if the value would not change.  This
avoids setting the same parameter in the config log multiple times,
and avoids the extra delay on each startup waiting for the conf_param
to propagate from the MGS to the client each time.

Fix the console error printing if the jobid_env does not exist.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I36ed60451a875bcd46fd0d6f3d7068d1b1398df5
Reviewed-on: http://review.whamcloud.com/3867
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2484 mgs: remove unused md_stats
John L. Hammond [Tue, 12 Mar 2013 03:44:09 +0000 (22:44 -0500)]
LU-2484 mgs: remove unused md_stats

Do not allocate md_stats or create /proc/.../MGS/md_stats for mgs
devices since they do not implement the md_ops interface.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8b417bc2433484a0e008ff9bf7fef69ba1e62416
Reviewed-on: http://review.whamcloud.com/4813
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2513 osc: compute grant targets in bytes
John L. Hammond [Thu, 28 Feb 2013 09:48:13 +0000 (03:48 -0600)]
LU-2513 osc: compute grant targets in bytes

In osc_shrink_grant() and osc_shrink_grant_to_target() convert page
unit target values to bytes before comparing to cl_avail_grant.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie8e6e8b4b3245efa3b14777608f3a48bbab7e4e2
Reviewed-on: http://review.whamcloud.com/5495
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2675 cleanup: remove obsolete llog-test crud
John L. Hammond [Fri, 1 Feb 2013 04:00:07 +0000 (22:00 -0600)]
LU-2675 cleanup: remove obsolete llog-test crud

Do not create the llog-test.c symlink as this Linux 2.4-ism is no
longer needed. Also remove the now defunct llog-test.sh.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I72ba710659e168ead206a2b9b28633724d0e44c5
Reviewed-on: http://review.whamcloud.com/5239
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2916 llite: call ll_permission rather than inode_permission
Peng Tao [Wed, 27 Feb 2013 10:50:54 +0000 (18:50 +0800)]
LU-2916 llite: call ll_permission rather than inode_permission

So that we can build on kernels older than 2.6.27.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I288030c3ee37ccb909d45121d457adb4dccafe0a
Reviewed-on: http://review.whamcloud.com/5607
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2642 osd-ldiskfs: fix typo in REQ_WRITE check
James Simmons [Tue, 5 Mar 2013 12:55:54 +0000 (07:55 -0500)]
LU-2642 osd-ldiskfs: fix typo in REQ_WRITE check

Commit eecb3086 defines __REQ_WRITE as BIO_RW if __REQ_WRITE is
not defined. __REQ_WRITE is an enum. REQ_WRITE is a define.

Let's use that instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I500c771e6f3e69e1be3fab872150019103515d30
Reviewed-on: http://review.whamcloud.com/5503
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2873 tests: t-f generates numerous dots garbage
Kyrylo Shatskyy [Wed, 27 Feb 2013 02:40:24 +0000 (04:40 +0200)]
LU-2873 tests: t-f generates numerous dots garbage

Remove 'echo -n "."' from run_test t-f function when skipping test

Signed-off-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Reviewed-by: Roman Grigoryev <Roman_Grigoryev@xyratex.com>
Xyratex-bug-id: MRP-863
Change-Id: I2c6de9fff3676aee7a506a2c2f6b6f9fe7a3b472
Reviewed-on: http://review.whamcloud.com/5540
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2731 scripts: Speed up /etc/init.d/lustre stop
Prakash Surya [Thu, 31 Jan 2013 23:06:07 +0000 (15:06 -0800)]
LU-2731 scripts: Speed up /etc/init.d/lustre stop

This patch parallelizes the shutdown of multiple services running on the
same node. This has been empirically shown to drastically reduce the
runtime of the script for an OSS with many OSTs.

This patch was tested on a Lustre 2.1 ldiskfs OSS node with 32 OSTs
attached, by recording startup and shutdown times for the OSS. The
number of OSTs used in varied, ranging from a single one, up to all 32,
incrementing by powers of two (i.e. timed startup/shutdown of 1 OST,
then of 2 OSTs, then 4, etc.).

Results of startup and shutdown times *without* this patch applied:

    +------------------------------------------------+
    | $ time /etc/init.d/lustre start # (w/o patch)  |
    +-----------+------------+-----------+-----------+
    | # of OSTs |    real    |    user   |    sys    |
    +-----------+------------+-----------+-----------+
    |      1    | 0m  2.184s | 0m 0.162s | 0m 0.077s |
    |      2    | 0m  4.285s | 0m 0.281s | 0m 0.148s |
    |      4    | 0m  8.508s | 0m 0.500s | 0m 0.302s |
    |      8    | 0m 16.961s | 0m 1.017s | 0m 0.568s |
    |     16    | 0m 33.884s | 0m 1.964s | 0m 1.176s |
    |     32    | 1m  7.744s | 0m 3.986s | 0m 2.280s |
    +-----------+------------+-----------+-----------+

    +------------------------------------------------+
    | $ time /etc/init.d/lustre stop # (w/o patch)   |
    +-----------+------------+-----------+-----------+
    | # of OSTs |    real    |    user   |    sys    |
    +-----------+------------+-----------+-----------+
    |     1     | 0m  4.758s | 0m 0.072s | 0m 0.030s |
    |     2     | 0m  9.018s | 0m 0.118s | 0m 0.049s |
    |     4     | 0m 18.813s | 0m 0.185s | 0m 0.083s |
    |     8     | 0m 37.586s | 0m 0.337s | 0m 0.141s |
    |    16     | 1m 16.092s | 0m 0.597s | 0m 0.263s |
    |    32     | 2m 37.550s | 0m 1.181s | 0m 0.403s |
    +-----------+------------+-----------+-----------+

Results of startup and shutdown time *with* this patch:

    +------------------------------------------------+
    | $ time /etc/init.d/lustre start # (w/ patch)   |
    +-----------+------------+-----------+-----------+
    | # of OSTs |    real    |    user   |    sys    |
    +-----------+------------+-----------+-----------+
    |      1    | 0m  2.183s | 0m 0.158s | 0m 0.083s |
    |      2    | 0m  4.282s | 0m 0.274s | 0m 0.153s |
    |      4    | 0m  8.519s | 0m 0.510s | 0m 0.303s |
    |      8    | 0m 16.966s | 0m 1.019s | 0m 0.583s |
    |     16    | 0m 33.878s | 0m 1.984s | 0m 1.154s |
    |     32    | 1m  7.745s | 0m 3.944s | 0m 2.322s |
    +-----------+------------+-----------+-----------+

    +------------------------------------------------+
    | $ time /etc/init.d/lustre stop # (w/ patch)    |
    +-----------+------------+-----------+-----------+
    | # of OSTs |    real    |    user   |    sys    |
    +-----------+------------+-----------+-----------+
    |      1    | 0m  4.566s | 0m 0.075s | 0m 0.023s |
    |      2    | 0m  4.857s | 0m 0.105s | 0m 0.070s |
    |      4    | 0m  4.777s | 0m 0.175s | 0m 0.064s |
    |      8    | 0m  5.449s | 0m 0.323s | 0m 0.153s |
    |     16    | 0m  5.862s | 0m 0.606s | 0m 0.208s |
    |     32    | 0m  6.307s | 0m 1.183s | 0m 0.811s |
    +-----------+------------+-----------+-----------+

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I90c1f6a265a8d86bbc8ddfb88aa635e5b96fd975
Reviewed-on: http://review.whamcloud.com/5235
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-2760 ldiskfs: update rhel6.3 series to handle mkdir errors
James Simmons [Tue, 5 Mar 2013 17:42:35 +0000 (12:42 -0500)]
LU-2760 ldiskfs: update rhel6.3 series to handle mkdir errors

ext4_mkdir can fail in several paths to dirtying an inode but
the errors aren't caught. This patch adds the upstream commit
that handles the errors and adjusts the dependent patches
accordingly.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: If86538e88c7386a06016ffae6893bacc8ba131e4
Reviewed-on: http://review.whamcloud.com/5279
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-913 test: Framework needs to record the test filesystem.
Chris Gearing [Thu, 15 Nov 2012 18:12:32 +0000 (10:12 -0800)]
LU-913  test:  Framework needs to record the test filesystem.

Add a section

file_system: XXX

to the node info in yaml.sh

Because this runs on the node being recorded it can use
node_fstypes $HOSTNAME
to fetch the filesystemtype of the local machine

Signed-off-by: Chris Gearing <chris.gearing@intel.com>
Change-Id: I721e4084096c75b69290959190526ca27b573e1b
Reviewed-on: http://review.whamcloud.com/4591
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2675 cleanup: remove unused mkdirdeep.c and lltrace.h
John L. Hammond [Fri, 1 Feb 2013 03:10:24 +0000 (21:10 -0600)]
LU-2675 cleanup: remove unused mkdirdeep.c and lltrace.h

That's all.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I547623a98541d545057776a01424fa6a362f06ee
Reviewed-on: http://review.whamcloud.com/5177
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2342 tests: account for log size in replay-single/20b
Nathaniel Clark [Sun, 10 Mar 2013 21:27:02 +0000 (17:27 -0400)]
LU-2342 tests: account for log size in replay-single/20b

Account for larger ondisk log size in ZFS (256) vs. ldiskfs (50).

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs   mdtfilesystemtype=zfs testlist=replay-single
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4150d58556240b128c02ba667c4c390c79b8a463
Reviewed-on: http://review.whamcloud.com/5666
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2903 tests: calculation of available space
Nathaniel Clark [Fri, 8 Mar 2013 20:54:21 +0000 (15:54 -0500)]
LU-2903 tests: calculation of available space

Better debug logging for statfs path.
Account for log size in space calculation.
Sleep slightly longer to wait for good statfs because zfs doesn't
count uncommitted changes in available space.

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs   mdtfilesystemtype=zfs testlist=replay-ost-single
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib4b5a7c645d6b2a630dcc729483422c8b3a095db
Reviewed-on: http://review.whamcloud.com/5662
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2911 llite: add obd_fid_init/fini() back to llite
Emoly Liu [Fri, 15 Mar 2013 04:40:42 +0000 (12:40 +0800)]
LU-2911 llite: add obd_fid_init/fini() back to llite

If without obd_fid_init() in llite, when filesystem is upgraded from
branch 1.8 to 2.4, obd_fid_init() in lmv won't be triggered because
of no lmv in branch 1.8 based config log. This will cause LBUG during
running mkdir after upgrade, like

seq_client_alloc_fid()) ASSERTION( seq != ((void *)0) ) failed.
seq_client_alloc_fid()) LBUG
Call Trace:
[<ffffffffa0371895>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[<ffffffffa0371e97>] lbug_with_loc+0x47/0xb0 [libcfs]
[<ffffffffa080bea9>] seq_client_alloc_fid+0x379/0x440 [fid]
[<ffffffffa03822e1>] ? libcfs_debug_msg+0x41/0x50 [libcfs]
[<ffffffffa082470b>] mdc_fid_alloc+0xbb/0xf0 [mdc]
[<ffffffffa0832b1c>] mdc_create+0xcc/0x780 [mdc]
[<ffffffffa09c487b>] ll_new_node+0x19b/0x6a0 [lustre]
[<ffffffffa09c50a7>] ll_mkdir+0x97/0x1f0 [lustre]

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I0eab1298b8d02ca08ecd4ac8bb422a2de12b7f83
Reviewed-on: http://review.whamcloud.com/5733
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2948 osc: keep trying to shrink more LRU slots
Jinshan Xiong [Mon, 18 Mar 2013 23:05:45 +0000 (16:05 -0700)]
LU-2948 osc: keep trying to shrink more LRU slots

It used to try once. It can enter into a livelock state as we can
see it in this ticket.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If603686d1d9fa7cf6513143fcc6ef962cfea9863
Reviewed-on: http://review.whamcloud.com/5760
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
11 years agoLU-2849 hsm: don't run sanity-hsm for ver < 2.3.61
Johann Lombardi [Thu, 21 Feb 2013 15:17:43 +0000 (16:17 +0100)]
LU-2849 hsm: don't run sanity-hsm for ver < 2.3.61

Add version check in sanity-hsm.
Now that sanity-hsm has been added, we should consider running it by
default.

Test-Parameters: testlist=sanity-hsm

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I8cec304bed46ac24354a27716ad12f5233c75a3f
Reviewed-on: http://review.whamcloud.com/5502
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
11 years agoLU-2845 osp: fix osp precreate thread init error handling
Bobi Jam [Fri, 22 Feb 2013 03:08:00 +0000 (11:08 +0800)]
LU-2845 osp: fix osp precreate thread init error handling

If osp device hasn't connected OST, osp_precreate_thread() should
heed to that and bypass the normal quitting path.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I27d18dfd4d7d55c97eeb169b5d7dc7042a42fd33
Reviewed-on: http://review.whamcloud.com/5508
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>