Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-3750 mdt: fix typo in mdt_txn_stop_cb() 87/7787/4
Mikhail Pershin [Fri, 27 Sep 2013 15:13:30 +0000 (19:13 +0400)]
LU-3750 mdt: fix typo in mdt_txn_stop_cb()

Wrong check was added to mdt_txn_stop_cb() to identify object
for version update. Version is not updated for all local objects
due to that typo and leads to replay-vbr.sh failures

Test-Parameters: testgroup=review,failover
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I9c41f7208d7aa8cf307858b9c6f51ae73c1081e4
Reviewed-on: http://review.whamcloud.com/7787
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
6 years agoLU-3749 recovery: save versions from reply into lastrcvd 86/7786/4
Mikhail Pershin [Fri, 27 Sep 2013 15:08:30 +0000 (19:08 +0400)]
LU-3749 recovery: save versions from reply into lastrcvd

Fix bug with using the wrong buffer for reply versions.
Versions should be saved from rq_repmsg instead of rq_reqmsg.
This bug was introduced in commit
4f5830f769f9cc9bacfcdfee9de5962324fb5c81.

Test-Parameters: testgroup=review,failover
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I6881b5d23ec9349b8fe4e9a21e32a1c8be338182
Reviewed-on: http://review.whamcloud.com/7786
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3903 osd-zfs: Remove dead property handling code 85/7685/3
Brian Behlendorf [Wed, 25 Sep 2013 16:12:53 +0000 (09:12 -0700)]
LU-3903 osd-zfs: Remove dead property handling code

The udmu_userprop_get_str(), udmu_userprop_set_str(), and
udmu_objset_name_get() functions are all currently unused.
Therefore this code is removed from the zfs osd.

If manipulation of zfs dataset properties is needed in the
future it can be done through the existing dsl_prop_get(),
dsl_prop_set_int(), and dsl_prop_set_string() interfaces.

This patch allows Lustre to cleanly build with versions
of zfs newer than 0.6.2.

Change-Id: I15b1ef8825dcdbed1572990d230776485d627457
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7685
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-4019 ofd: setattr don't udpate lvbo with object referenced 95/7795/2
Alex Zhuravlev [Sat, 28 Sep 2013 13:58:45 +0000 (17:58 +0400)]
LU-4019 ofd: setattr don't udpate lvbo with object referenced

we shouldn't allow recursive lu_object_find() while object
can be destroyed. so release the reference to the object
before calling to ldlm_res_lvbo_update() which lookups the
object on its own.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If34d89834e352b6d0b8129a6fb4377317833a78a
Reviewed-on: http://review.whamcloud.com/7795
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3974 libcfs: replace num_physpages with totalram_pages 26/7726/4
James Simmons [Tue, 24 Sep 2013 15:55:44 +0000 (11:55 -0400)]
LU-3974 libcfs: replace num_physpages with totalram_pages

Currently lustre uses an exported kernel variable
num_physpages but this variable includes also non-ram
pages and is not memory hotplug support aware. Also in
kernels 3.11 and above this variable is no longer
exported. The exported variable totalram_pages handles
the the limitations of num_physpages plus its avaliable
in all Lustre supported kernels.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I021fbbd99b2c8e538fc0357a676834e26d690702
Reviewed-on: http://review.whamcloud.com/7726
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
6 years agoLU-2074 build: fix 'copy into fixed size buffer' errors 54/4154/22
Sebastien Buisson [Tue, 2 Oct 2012 14:52:17 +0000 (16:52 +0200)]
LU-2074 build: fix 'copy into fixed size buffer' errors

Fix 'copy into fixed size buffer' defects found by Coverity
version 6.0.3:
Copy into fixed size buffer (STRING_OVERFLOW)
The fixed-size string might be overrun by copying without
checking the length.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia47e6ae132fe476fce202ce06d6fc655f9855012
Reviewed-on: http://review.whamcloud.com/4154
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoRevert "LU-3544 nfs: writing to new files will return ENOENT" 09/7809/2
Oleg Drokin [Tue, 1 Oct 2013 04:37:03 +0000 (04:37 +0000)]
Revert "LU-3544 nfs: writing to new files will return ENOENT"

This causes nasty interop issues with 2.1 that ca cannot get a handle on in time for 2.5, so reverting this for now.

This reverts commit 2402980a0891e43668f4016e17f2ff872006e0fa

Change-Id: Ia5323df6f493b78832c5ca9cfbd497e80bef26fe
Reviewed-on: http://review.whamcloud.com/7809
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3828 mdt: hsm tunable can be set permanently 57/7557/8
jcl [Thu, 5 Sep 2013 07:49:00 +0000 (09:49 +0200)]
LU-3828 mdt: hsm tunable can be set permanently

HSM tunable are now always visible, even if hsm is off,
so HSM tunning in MGS conf can be set at MDT mount.
Rename hsm /proc entry archive_id in default_archive_id

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ic89de22e11f989ecd2ce01f10764ec6a61a7e870
Reviewed-on: http://review.whamcloud.com/7557
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3979 tests: archive access must be done on agent 30/7730/4
jcl [Mon, 23 Sep 2013 18:04:05 +0000 (20:04 +0200)]
LU-3979 tests: archive access must be done on agent

In sanity-hsm tests, all access to archive backend
must be done from an agent, so all the command which
access it are executed through a do_facet $SINGLEAGT
Modified tests are 10a 10b 10c 11 12a 12b 12d 12n 13 25a 30a
110a 111a 222a
When doing remote commands on agent, we cannot use default
environnement variables. So test 106 must use explicitly the
lustre mount point when calling get_client_uuid.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I245069655d2dcf20d1c316c8b9e166cbd8ee4e98
Reviewed-on: http://review.whamcloud.com/7730
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3864 mdt: return st_blocks=1 for released files 76/7776/3
Bruno Faccini [Sun, 29 Sep 2013 06:58:44 +0000 (08:58 +0200)]
LU-3864 mdt: return st_blocks=1 for released files

Before this patch it has been decided to return st_blocks=0 for
released files. Unfortunatelly this caused tools like tar then
to consider the file as fully sparse and to archive it as is
without attempting to access/restore its content.
As this leads to potential corruption, it has been decided that
the less ugly and intrusive way to bypass this was to return 1
block considering this is consumed by file's metadatas.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I85df56a60bf3585b42999fc1b80d1f075435dbc3
Reviewed-on: http://review.whamcloud.com/7776
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
6 years agoLU-3959 build: fix make rpms for lustre-iokit 71/7771/3
James Simmons [Fri, 27 Sep 2013 15:04:57 +0000 (11:04 -0400)]
LU-3959 build: fix make rpms for lustre-iokit

With the recent merge of the lustre-iokit build
system with lustre's build system on some platforms
running make rpms from the top of the lustre tree
breaks with

make -C lustre-iokit  rpms
make[1]: Entering directory `lustre-2.4.93/lustre-iokit'
make[1]: *** No rule to make target `rpms'.  Stop.

This patch removes the offending code in the makfile
without breaking anything else.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I837ab1c2c383e1ca68eaadc492c3c8cf18cecb92
Reviewed-on: http://review.whamcloud.com/7771
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
6 years agoLU-3953 config: move ext4 src detection to earlier phase 92/7692/2
Minh Diep [Tue, 17 Sep 2013 23:33:56 +0000 (16:33 -0700)]
LU-3953 config: move ext4 src detection to earlier phase

Moving ext4 src detection to earlier in config phase to
make sure enable_ldiskfs is marked no to avoid build
failure from client only.

Correct syntax error in LB_ZFS_USER.

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I8b707dd66bcceb2b5b56a26ea7354c455c03f3d8
Reviewed-on: http://review.whamcloud.com/7692
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3990 kernel: kernel update [SLES SP2 3.0.93-0.5] 53/7753/3
Bob Glossman [Sat, 21 Sep 2013 16:57:11 +0000 (09:57 -0700)]
LU-3990 kernel: kernel update [SLES SP2 3.0.93-0.5]

Update of config and build files to new kernel version.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ia5e3ad75966e98e567d06d41c3ccb810fb62168d
Reviewed-on: http://review.whamcloud.com/7753
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly 81/7781/3
Bob Glossman [Thu, 26 Sep 2013 20:36:28 +0000 (13:36 -0700)]
LU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly

When mb prealloc table item value is not valid, the
s_mb_prealloc_table_size should be adjust accordingly.

ported to SLES11 SP[23]

Lustre-change: http://review.whamcloud.com/7591
Lustre-commit: 6c9f72a1e537826be2b889feba1ff8c5b5db2e77

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1803c201743fccf9c177a7098959083f7baf95a0
Reviewed-on: http://review.whamcloud.com/7781
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3916 lprocfs: export lprocfs setup race 06/7606/4
Bobi Jam [Wed, 11 Sep 2013 04:26:59 +0000 (12:26 +0800)]
LU-3916 lprocfs: export lprocfs setup race

Protect setting export's exp_nid_stats.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I83e65f5ff851b8d8553cbedef6469e188d3502ff
Reviewed-on: http://review.whamcloud.com/7606
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoRevert "LU-1346 libcfs: replace CFS_CAP_XXX with kernel definition" 98/7798/2
Oleg Drokin [Sat, 28 Sep 2013 18:15:14 +0000 (18:15 +0000)]
Revert "LU-1346 libcfs: replace CFS_CAP_XXX with kernel definition"

Shadow raised pretty valid points about compatibility and wire protocol changes caused by this patch i LU-1346 comments, so reverting

This reverts commit b22fb817507ff52c02de38435fe90d758e852105

Change-Id: Ia0fcd279d17c9f996b2726e4bd5f115d1c629f49
Reviewed-on: http://review.whamcloud.com/7798
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3871 osd: Tell QUOTA/NAME_LLOG fid in fid_is_on_ost check 27/7527/4
wang di [Tue, 10 Sep 2013 07:25:29 +0000 (00:25 -0700)]
LU-3871 osd: Tell QUOTA/NAME_LLOG fid in fid_is_on_ost check

Tell QUOTA/NAME_LLOG fid during fid_is_on_ost check, so
they will not be inserted into /O, which might confuse
e2fsck otherwise.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4d091393b60c66a554de861359d8f5a32c83029e
Reviewed-on: http://review.whamcloud.com/7527
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3989 kernel: kernel update [SLES11 SP3 3.0.92-0.8] 52/7752/2
Bob Glossman [Sat, 21 Sep 2013 16:48:44 +0000 (09:48 -0700)]
LU-3989 kernel: kernel update [SLES11 SP3 3.0.92-0.8]

Update of config and build files to new kernel version.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8c77bf3cd4e3dfefd8f85bf1c26241d1f0887f50
Reviewed-on: http://review.whamcloud.com/7752
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3349 test: add b2_3/b2_4 image for conf-sanity test_32a 91/7091/7
Wei Liu [Tue, 23 Jul 2013 00:11:54 +0000 (17:11 -0700)]
LU-3349 test: add b2_3/b2_4 image for conf-sanity test_32a

Add 2.3.0 and 2.4.0 ldiskfs filesystem test image
for conf-sanity test_32a

Change-Id: Ic7d130a5eb66ea4b1f57fe9b270ae0ed6bdd1f33
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/7091
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
6 years agoLU-4000 lloop: Fix build failure on ppc64 45/7745/2
Jeff Mahoney [Tue, 24 Sep 2013 16:03:37 +0000 (12:03 -0400)]
LU-4000 lloop: Fix build failure on ppc64

On ppc64 with 64k pages, we get a build failure in lloop:

drivers/staging/lustre/lustre/llite/lloop.c:527:2:
note: in expansion of macro 'CLASSERT'
CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));

There's no need to change the queue's logical block size. Even if it could
accept a 64k value, that would result in any file system on top of it
needing to also use 64k blocks. It'd be safe to set it to 4k, but there's
no actual need for it. It's not used to split requests except for WRITE_SAME,
which lloop doesn't implement anyway.

Change-ID: Ib36959ca2323ab0dfdc1fb34aeffb778cffd6c92
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-on: http://review.whamcloud.com/7745
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3640 test: Sanity test 116a fails when an OST is full 32/7132/9
James Nunez [Fri, 26 Jul 2013 15:41:43 +0000 (09:41 -0600)]
LU-3640 test: Sanity test 116a fails when an OST is full

Sanity test 116a looks for the OST with the least amount of free
space and fills it to varying levels. It does not check to see if
the OST is full and fails because of a divide by zero (bytes
available on full OST) error.

This patch adds a check to see if an OST is full and, if so, the test
is now skipped. We also corrected where to look for the qos_prio_free
file from the client to the MDS. A correction was made to how the
number of files written to each OST is calculated. We also added
using qos_threshold_rr to check how uneven the OSTs need to be.

This test is usually skipped since filling large OST takes too much
time. In order to get this test to run faster, we’ve added

1. A check to see if the OST needs to be filled to create uneven
OSTs. For QOS mode, a pair of OSTs must be at least qos_threshold_rr%
off balanced. If the OSTs are already this uneven, we skip
writing files to an OST. If the OSTs do not exceed this threshold,
we write only 2% over the threshold amount to create uneven OSTs.

2. A cap on the number of files written when checking QOS
functionality. The files are small, 200k in size,and we were
writing enough files to fill 25% of the most full OST. Now we
cap the number of file written to at most 600. There’s no meaning
to 600 files, it just seemed like enough files to make sure that
the OST that has the most space available is getting more files.
We could make this number of files dependent on the number of OSTs.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ide1565015ffc26a849adabd0d06285971bcee9f2
Reviewed-on: http://review.whamcloud.com/7132
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
6 years agoLU-3664 test: get_param atime_diff returns multiple values 50/7750/3
James Nunez [Tue, 24 Sep 2013 20:29:57 +0000 (14:29 -0600)]
LU-3664 test: get_param atime_diff returns multiple values

In sanityn test 23, lctl get_param mdd.*. time_diff can
return multiple values. This can happen with there are multiple
MDTs mounted. In order to deal with multiple values, we run the
return value of lctl get_param through "head -1".

Test-Parameters: mdtcount=2 mdscount=2
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ie830429af38e1e4bce084aa1e6490bbadf366920
Reviewed-on: http://review.whamcloud.com/7750
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>
6 years agoLU-1346 libcfs: replace CFS_CAP_XXX with kernel definition 81/4781/6
James Simmons [Fri, 13 Sep 2013 13:44:00 +0000 (09:44 -0400)]
LU-1346 libcfs: replace CFS_CAP_XXX with kernel definition

Replace CFS_CAP_XXX with kernel standard CAP_XXX flags.
Keep cfs_cap_xxx(raise/lower/raised) wrappers.

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: I656c41b94e73bf8d03698a8709be999038a50b35
Reviewed-on: http://review.whamcloud.com/4781
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-1346 libcfs: cleanup libcfs atomic primitives 59/6959/7
Peng Tao [Wed, 11 Sep 2013 17:17:33 +0000 (01:17 +0800)]
LU-1346 libcfs: cleanup libcfs atomic primitives

Only libcfs/ directory are converted yet. Other directories
are left for later patches.

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: Ic379ac493ca4ead1ee6aa8aeb52b4017ee65c93c
Reviewed-on: http://review.whamcloud.com/6959
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-14 utils: allow formatting OST without VIRGIN flag 43/7443/6
Andreas Dilger [Fri, 9 Aug 2013 21:03:05 +0000 (15:03 -0600)]
LU-14 utils: allow formatting OST without VIRGIN flag

When reformatting a new target to replace an existing target, the
"mkfs.lustre --replace" option allows formatting an OST (or MDT?)
with the same index as a previously used OST without setting the
LDD_F_VIRGIN flag.

This is required in the case where an OST was lost due to massive
corruption or critical hardware failure.  Otherwise, the newly
formatted target will try to register with the MGS as a new target,
but will be refused by the MGS due to having an already-used index.

The OFD code skips precreating all of the objects in the filesystem
if the MDS requests an object ID too much larger than the current
LAST_ID.  In this case (which can happen if the OST is replaced
or restored from an older backup) only the most recent objects are
precreated, and the deletion of orphans from a too-large precreate
is left to lfsck.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iea57167346627eeb85ac40c17f3ea4596b3ebbe5
Reviewed-on: http://review.whamcloud.com/7443
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3999 hsm: Improve mdt.*.hsm.agents output in /proc 44/7744/2
Aurelien Degremont [Tue, 24 Sep 2013 13:33:02 +0000 (15:33 +0200)]
LU-3999 hsm: Improve mdt.*.hsm.agents output in /proc

mdt.*.hsm.agents file contains a list of registered agents and a
couple of information for each of them. This patch improves the output
to clarify the meaning of each returned values.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Id4858f7ac9387d539eba03389871c6e99476a5c9
Reviewed-on: http://review.whamcloud.com/7744
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3670 mdt: cancel MDS_INODELOCK_XATTR on MDS updates 86/7186/3
Andrew Perepechko [Wed, 31 Jul 2013 00:23:20 +0000 (04:23 +0400)]
LU-3670 mdt: cancel MDS_INODELOCK_XATTR on MDS updates

In some cases, MDS updates extended attributes
on its own rather than on a client request.
MDS_INODELOCK_XATTR should be taken for this purpose.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I8d5e947cc05ce5f25c8f128b01ab7458636b55ba
Reviewed-on: http://review.whamcloud.com/7186
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
6 years agoLU-3462 lnet: Fix path to ldiskfs module 39/7639/2
Christopher J. Morrone [Thu, 12 Sep 2013 22:32:39 +0000 (15:32 -0700)]
LU-3462 lnet: Fix path to ldiskfs module

After this commit:

4dd31ba LU-3462 ldiskfs: Subsume ldiskfs's build system into lustre

The path to the ldiskfs module in lnet/utils/debug.c is updated
to point to the new location (one directory higher).

Change-Id: I949a9cdad107755f66d10dafaf0e8692587e902e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7639
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove LC_BI_HW_SEGMENTS test 70/5370/10
James Simmons [Wed, 11 Sep 2013 17:24:24 +0000 (13:24 -0400)]
LU-2800 autoconf: remove LC_BI_HW_SEGMENTS test

bio.bi_hw_segments has been removed from the upstream kernel
since v2.6.27

We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iaf8c468750aeb3c0234e46c09873f8f382c77b9a
Reviewed-on: http://review.whamcloud.com/5370
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>
6 years agoLU-2800 autoconf: remove quota_on/quota_off checks 67/5367/11
James Simmons [Wed, 11 Sep 2013 17:09:16 +0000 (13:09 -0400)]
LU-2800 autoconf: remove quota_on/quota_off checks

With the rewrite of the Lustre quota code we no longer
need ll_quota_[on/off]. Those obsolete methods touched
linux kernel internals that have changed over time.
With ll_quota_[on/off[ gone we can remove all the
quota autoconf that was required.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I6d11894e163f213ee53c007c0e41a374fccb70f9
Reviewed-on: http://review.whamcloud.com/5367
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>
6 years agoLU-2800 autoconf: remove LC_PAGE_CONSTANT 39/5339/7
James Simmons [Mon, 9 Sep 2013 18:43:58 +0000 (14:43 -0400)]
LU-2800 autoconf: remove LC_PAGE_CONSTANT

The purpose of this patch was to see if the kernel
was patched to support raid5 zerocopy. This only was
supported on RHLE5 servers which means this test can
be removed now.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I36276dfee7a6247719e716a9a304453dd519acdb
Reviewed-on: http://review.whamcloud.com/5339
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) 57/6957/8
Peng Tao [Wed, 11 Sep 2013 17:15:28 +0000 (01:15 +0800)]
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)

Affected primitives:

cfs_mb, cfs_in_interrupt, cfs_might_sleep, cfs_group_info_t,
cfs_get_group_info, cfs_put_group_info, cfs_set_current_groups,
cfs_groups_free, cfs_groups_alloc, cfs_get_random_bytes_prim

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: I52293cad577f2027cabf1b124dbb1b7354fef3a5
Reviewed-on: http://review.whamcloud.com/6957
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3496 lprocfs: implement log2 using bitops 57/6757/2
Andrew Perepechko [Mon, 24 Jun 2013 18:12:55 +0000 (22:12 +0400)]
LU-3496 lprocfs: implement log2 using bitops

This patch implements log2 using fls.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: alexander_zarochentsev@xyratex.com
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Xyratex-bug-id: MRP-999
Change-Id: Id19752761b4dd162b282bb8006072f607b8bf729
Reviewed-on: http://review.whamcloud.com/6757
Reviewed-by: John L. Hammond <john.hammond@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>
6 years agoLU-1346 gnilnd: remove libcfs abstractions 54/7454/7
James Simmons [Tue, 17 Sep 2013 15:37:23 +0000 (11:37 -0400)]
LU-1346 gnilnd: remove libcfs abstractions

With the move of libcfs to using linux as the default api
this has impacted many of the lnet drivers. This patch
removes the libcfs wrappers and uses the linux API's
directly in the LND driver

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id502abb578808063b04e094bff026c92a5d12a3b
Reviewed-on: http://review.whamcloud.com/7454
Reviewed-by: James Shimek <jshimek@cray.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Chuck Fossen <chuckf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3642 seq: make seq_proc_write_common() safer 23/7123/3
Andreas Dilger [Thu, 25 Jul 2013 22:27:41 +0000 (16:27 -0600)]
LU-3642 seq: make seq_proc_write_common() safer

Don't allow seq_proc_write_common() to specify arbitrary ranges,
since this can permanently corrupt the sequence controller and/or
sequnece server.  That would allow duplicate FID allocation, or
possibly prevent any new files to be created or servers to be added
to the filesystem.

Instead, limit the sequence range that can be written via /proc to
a subset of the sequence range currently allocated to that node.
Add the "clear" keyword to allow dropping the entire local sequence
and force a new one to be fetched from the sequence server.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I89da0223a52ce8bec787b1d5099402c84274291a
Reviewed-on: http://review.whamcloud.com/7123
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog 13/7413/5
James Simmons [Fri, 13 Sep 2013 16:52:24 +0000 (12:52 -0400)]
LU-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog

- remove obdfilter/llog_lvfs.c
- remove lgh_file from llog_header

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I5749997284c558307372d1442591ff68f457feb9
Reviewed-on: http://review.whamcloud.com/7413
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) 56/6956/8
Peng Tao [Wed, 11 Sep 2013 17:12:11 +0000 (01:12 +0800)]
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)

Affected primitives:

cfs_kthread_run, CFS_DAEMON_FLAGS, cfs_task_t, cfs_current,
cfs_task_lock, cfs_task_unlock, CFS_DECL_JOURNAL_DATA,
CFS_PUSH_JOURNAL, CFS_POP_JOURNAL, cfs_sigset_t,
cfs_timer_t, CFS_MAX_SCHEDULE_TIMEOUT

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iae0e9a9ccaa39fda71175205e9af451e65b620d1
Reviewed-on: http://review.whamcloud.com/6956
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>
6 years agoLU-3756 mdt: Change HSM policy display 65/7365/6
jcl [Fri, 16 Aug 2013 17:23:21 +0000 (19:23 +0200)]
LU-3756 mdt: Change HSM policy display

HSM policy display must follow the format:
policy1 policy2 policy3 ... with [] around
active policies

Add sanity-hsm test 109 to test policy setting.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I2000b9b8adfaf4cd2b369acbd076e65166832fc5
Reviewed-on: http://review.whamcloud.com/7365
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3466 iokit: Make lustre-iokit a subpackage of lustre 14/7314/13
Minh Diep [Tue, 13 Aug 2013 05:53:40 +0000 (22:53 -0700)]
LU-3466 iokit: Make lustre-iokit a subpackage of lustre

Remove build_iokit from lbuild
Remove lustre-iokit.spec.in and merge with lustre.spec.in
Use of --disable-iokit and remove support for building external
Remove iokit script from main lustre package.
Add lustre-iokit dependency to lustre-tests rpm
Disable building iokit rpm for client build

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I34889b97b5bdbb201ee88d71e1668f419e640cdb
Reviewed-on: http://review.whamcloud.com/7314
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
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>
6 years agoLU-1962 doc: add "lfs df --lazy" description 89/7689/2
Andreas Dilger [Tue, 17 Sep 2013 21:24:54 +0000 (15:24 -0600)]
LU-1962 doc: add "lfs df --lazy" description

The "lfs df --lazy" option was previously added in change
http://review.whamcloud.com/4007 but was not documented.
Add a short description to the lfs.1 man page.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I9f29d11ddaadd7b415c655ac43ba2738433ebbe5
Reviewed-on: http://review.whamcloud.com/7689
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoNew tag 2.4.93 2.4.93 v2_4_93 v2_4_93_0
Oleg Drokin [Tue, 24 Sep 2013 18:39:55 +0000 (14:39 -0400)]
New tag 2.4.93

Change-Id: I3374ad671eb4db44da8b10db4d66de7996e982c9
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2779 osc: osc_extent_wait() shouldn't be interruptible 19/5419/4
Jinshan Xiong [Wed, 13 Feb 2013 19:40:19 +0000 (11:40 -0800)]
LU-2779 osc: osc_extent_wait() shouldn't be interruptible

Otherwise it will hit the assertion at cl_lock.c:

   cl_lock.c:1967:discard_cb())
ASSERTION( (!(page->cp_type == CPT_CACHEABLE) ||
(!PageWriteback(cl_page_vmpage(env, page)))) ) failed:

This is because in osc_lock_flush() we have to make sure the IO
is finished before discarding the pages.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I296ab35d26b861f3c57ddba9f74564aa439aaa0b
Reviewed-on: http://review.whamcloud.com/5419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3027 clio: Do not shrink sublock at cancel 69/7569/4
Oleg Drokin [Thu, 29 Aug 2013 09:10:06 +0000 (17:10 +0800)]
LU-3027 clio: Do not shrink sublock at cancel

Shrinking sublock at ldlm lock cancel time means whoever happened
to attach to this lock just before will reenqueue the wrong lock.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes  clientdistro=el6 serverdistro=el6 clientarch=x86_64  serverarch=x86_64 mdtcount=1  testlist=parallel-scale,parallel-scale-nfsv3,parallel-scale-nfsv4
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I599da98ce364ccf459b5b5f3b72550115972c456
Reviewed-on: http://review.whamcloud.com/7569
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoRevert "LU-3027 clio: Do not shrink sublock at cancel" 49/7749/2
Oleg Drokin [Tue, 24 Sep 2013 18:24:56 +0000 (18:24 +0000)]
Revert "LU-3027 clio: Do not shrink sublock at cancel"

This uncovered another long standing problem that is LU-3874

This reverts commit fcf44d0a05ebd9bc9c2ce52c314b0e67a656140e

Change-Id: I0b31abdb5c00c089d0f91eb217ea82b2325dac21
Reviewed-on: http://review.whamcloud.com/7749
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3931 hsm: reprocess LDLM resource in mdt_hsm_release() 21/7621/3
John L. Hammond [Wed, 11 Sep 2013 21:55:11 +0000 (16:55 -0500)]
LU-3931 hsm: reprocess LDLM resource in mdt_hsm_release()

In mdt_hsm_release() manually reprocess the LDLM resource (the file
being released) after cancelling the lease (exclusive open lock on the
same file).

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idc2333bc14432f24ef45d5f5d59c8518717c99c2
Reviewed-on: http://review.whamcloud.com/7621
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly 91/7591/4
Bobi Jam [Tue, 10 Sep 2013 07:13:18 +0000 (15:13 +0800)]
LU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly

When mb prealloc table item value is not valid, the
s_mb_prealloc_table_size should be adjust accordingly.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I17c0d440e4c89cae1780de63ca2b3a0d69de298b
Reviewed-on: http://review.whamcloud.com/7591
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3894 mdt: return EXDEV for cross-MDT rename 79/7579/4
wang di [Fri, 6 Sep 2013 07:02:34 +0000 (00:02 -0700)]
LU-3894 mdt: return EXDEV for cross-MDT rename

If target does not exist, and source directory is remote
directory, it should return -EXDEV.

Add test in test_24x to verify it.

Create local directory for test_214, since cross-MDT rename
is not allowed yet.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0d4d8d96249ec23fcea5ab6ac5fce196728e8e73
Reviewed-on: http://review.whamcloud.com/7579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3976 tests: sanity-hsm test_9a is buggy 23/7723/2
jcl [Sun, 22 Sep 2013 21:58:43 +0000 (23:58 +0200)]
LU-3976 tests: sanity-hsm test_9a is buggy

After a file is successfully archived, it's HSM status is
EXIST and ARCHIVED so 0x00000009
Also add a generic function to test the minimum count of clients
needed by a test

Test-Parameters: clientcount=4
Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I878e994d1a903646adc1c55e706ea9118196c0a1
Reviewed-on: http://review.whamcloud.com/7723
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-3856 mount: fix volume label update 12/7712/3
Alexander.Boyko [Fri, 20 Sep 2013 11:51:42 +0000 (15:51 +0400)]
LU-3856 mount: fix volume label update

The -n|--nomtab options is used to do not update
/etc/mtab after mount, but this option prevents to
update volume label also. This patch resolve this issue.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1325
Change-Id: Ib39de6a64c0aaeb4eff1b8d88fd7c9d4514c6c7e
Reviewed-on: http://review.whamcloud.com/7712
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
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>
6 years agoLU-3935 scrub: support dryrun mode OI scrub 20/7720/4
Fan Yong [Sun, 25 Aug 2013 14:11:25 +0000 (22:11 +0800)]
LU-3935 scrub: support dryrun mode OI scrub

The administrator can detect whether there are any inconsistent
OI mappings but without repairing them via the command:
lctl lfsck_start --dryrun on -M <$device>

Under default mode, dryrun is "off". When the device is mounted,
the initial OI scrub will detect whether there are upgrade case,
or file-level backup/resotre case, or OI file(s) recreated case.
If found some inconsistency, it will trigger non-dryrun mode OI
scrub automatically. If the administrator does NOT want to such
auto non-dryrun OI scrub to avoid some unexpected repairing, he
(or she) can specify "-o noscrub" when mount the device.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If00433aa40b43f0be284215009a2b01898fbad35
Reviewed-on: http://review.whamcloud.com/7720
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3934 scrub: detect upgraded from 1.8 correctly 19/7719/3
Fan Yong [Sun, 25 Aug 2013 13:24:27 +0000 (21:24 +0800)]
LU-3934 scrub: detect upgraded from 1.8 correctly

The OI scrub should has the capability to detect the case of the MDT
device upgraded from lustre-1.8 and trigger full OI scrub to process
IGIF mapping into OI files.

Originally, we detect that by checking /ROOT/.lustre via initial OI
scrub, but if the MDT is upgraded to lustre-2.1 firstly, and then
continue to lustre-2.4, the such detect mechanism will be failed.
Because lustre-2.1 does not support OI scrub, but will create the
/ROOT/.lustre.

The new detect mechanism will combine the checking OI file name and OI
scrub successfully scan count: if there is old OI file "oi.16" and OI
scrub has never successfully run on the device, then it is regarded as
upgrading case.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I69d9b4f93797bb5589609d7ee0911ffd4262d0cb
Reviewed-on: http://review.whamcloud.com/7719
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3876 hsm: proc agent_actions fix up 89/7589/4
Jinshan Xiong [Tue, 10 Sep 2013 01:02:29 +0000 (18:02 -0700)]
LU-3876 hsm: proc agent_actions fix up

In the original implementation, it will return ENOMEM if there
exists too many llog entries.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I48089bae566f28fd0128f749ce1581b1fc26d45b
Reviewed-on: http://review.whamcloud.com/7589
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoRevert "LU-3682 tunefs: prevent tunefs running on a mounted device" 48/7748/2
Oleg Drokin [Tue, 24 Sep 2013 16:27:05 +0000 (16:27 +0000)]
Revert "LU-3682 tunefs: prevent tunefs running on a mounted device"

This totally kills zfs testing and also prevents local testing even with ldiskfs.

This reverts commit 66858bc059362504d201262202549099185e69ba

Change-Id: I07a82203173b3ddff67f1def953a26e5009f0f2f
Reviewed-on: http://review.whamcloud.com/7748
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3587 changelogs: Correct KUC code max changelog msg size 06/7406/4
Christopher J. Morrone [Tue, 20 Aug 2013 01:15:31 +0000 (18:15 -0700)]
LU-3587 changelogs: Correct KUC code max changelog msg size

The kernel to userspace communication routines (KUC) allocate
and limit the maximum cs_buf size to CR_MAXSIZE.  However this
fails to account for the fact that the buffer is assumed to begin
with a struct kuc_hdr.  To allocate and account for that space,
we introduce a new define, KUC_CHANGELOG_MSG_MAXSIZE.

Change-Id: I623746126dd64c8016366ee5fdce094129e4103e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7406
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1480 lov: avoid subobj's coh_parent race 05/6105/6
Bobi Jam [Sat, 20 Apr 2013 03:56:18 +0000 (11:56 +0800)]
LU-1480 lov: avoid subobj's coh_parent race

* during a file lov object initialization, we need protect the access
  and change of its subobj->coh_parent, since it could be another
  layout change race there, which makes an unreferenced lovsub obj in
  the site object hash table.

* dump lovsub objects in the site if the lovsub device reference > 0
  during its finalization phase.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I5d4b79f25a13258cf04f04459f3f1780246b0144
Reviewed-on: http://review.whamcloud.com/6105
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3928 ost: update OST export connection flags 11/7611/4
Alexander.Boyko [Wed, 11 Sep 2013 08:44:14 +0000 (12:44 +0400)]
LU-3928 ost: update OST export connection flags

LU-1623 introduce atomically update export connection flags for MDT.
The same issue exist for OST. In any case the flags would be updated
for export, even if error handling code path occured.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1306
Change-Id: I4f93ff88cd94467cfe6d6fdb9d7214c727c43db2
Reviewed-on: http://review.whamcloud.com/7611
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3249 tests: build POSIX test suite on FC18 44/7644/2
Jian Yu [Fri, 13 Sep 2013 12:35:56 +0000 (20:35 +0800)]
LU-3249 tests: build POSIX test suite on FC18

While building POSIX test suite, some required header files are
not in the /usr/include directory on Fedora 18 distribution. On
FC18, only arm-gp2x-linux-glibc-2.3.6-11.fc18.noarch.rpm contains
those header files. This patch links those header files to the
standard system directory so as to make the building pass.

Test-Parameters: envdefinitions=SLOW=yes \
clientdistro=fc18 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=posix

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Idf622606d730d80a44e341bf7317dda37ea6bf82
Reviewed-on: http://review.whamcloud.com/7644
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2757 dynlocks: move into osd-ldiskfs 82/5282/16
James Simmons [Fri, 20 Sep 2013 16:34:38 +0000 (12:34 -0400)]
LU-2757 dynlocks: move into osd-ldiskfs

Commit 43603bd1 (LU-1548 osd: move i_htree_lock to iam container)
eliminated the use of dynlocks inside ldiskfs. Now that it's only
used in the osd-ldiskfs code, we can move it under osd-ldiskfs/,
and eliminate a patch we apply during build. Long term dynlocks
will never merged into the ext4 work so it makes sense to move it
to the osd-ldisk layer. Also the mdd layer was carrying techinical
debt of dynlocks as well so this patch removes it from that layer.
This work helps us move forward to a patchless ldiskfs in the
future.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I3d2ca2317426df3a7f3855d85a834a37091a78bd
Reviewed-on: http://review.whamcloud.com/5282
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3986 build: eliminate redundant kernel config files 13/7713/2
Bob Glossman [Fri, 20 Sep 2013 15:40:50 +0000 (08:40 -0700)]
LU-3986 build: eliminate redundant kernel config files

fix lbuild to stop using two different names for kernel config files
delete redundant sles kernel config files

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Idb214c67579028069ad1ad95eba621d80c44c661
Reviewed-on: http://review.whamcloud.com/7713
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3817 llite: Truncate to restore file 05/7505/7
Jinshan Xiong [Fri, 6 Sep 2013 23:26:25 +0000 (16:26 -0700)]
LU-3817 llite: Truncate to restore file

Truncate up is safe so it won't trigger restore.

Copy optimization for truncate down - only copy the part under
truncate length. If a file is truncated to zero usually it'll be
followed by write so I choose to restore the file and set correct
stripe information.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I5e64893bdeaeb7323566154e3469f3a0ce7797d4
Reviewed-on: http://review.whamcloud.com/7505
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3915 osd-ldiskfs: don't assert on possible upgrade 73/7673/3
Mikhail Pershin [Mon, 16 Sep 2013 18:25:04 +0000 (22:25 +0400)]
LU-3915 osd-ldiskfs: don't assert on possible upgrade

There are some cases possible during upgrade to the Lustre 2.5
from older versions which need workaround instead assertion.
The osd_object_ref_del() shouldn't assert on nlink == 0 if
object is local file but produce error message.

The underlying ext4_unlink() code doesn't treat decref on an
inode with nlink == 0 as a fatal error either, so only print
an error in the non-upgrade case for regular objects.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I5aa1cc3d9a6d6210e8ce9f55193a4f25507b0986
Reviewed-on: http://review.whamcloud.com/7673
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3698 ptlrpc: skip rpcs that fail ptl_send_rpc 11/7411/3
Keith Mannthey [Wed, 21 Aug 2013 04:32:28 +0000 (21:32 -0700)]
LU-3698 ptlrpc: skip rpcs that fail ptl_send_rpc

ptl_send_rpc is not dealing with -ENOMEM in some
situations.  When the ptl_send_rpc fails we need
set error and skip further processing or trigger
and LBUG

Original patch from Peng Tao.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Ib90cb7841cd0866bcf08f6dcd702d65804992e1d
Reviewed-on: http://review.whamcloud.com/7411
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
6 years agoLU-3490 autoconf: disable GSS when required libraries missing 22/7622/7
Patrick Farrell [Mon, 16 Sep 2013 12:48:19 +0000 (07:48 -0500)]
LU-3490 autoconf: disable GSS when required libraries missing

Add 'auto' functionality to GSS keyring configuration to match
GSS configuration.

When using the 'auto' setting for GSS and GSS keyring, set
enable_gss/enable_gss_keyring to 'yes' if configuration tests pass
so GSS is actually built.

Disable GSS/KRB5 if both krb5_derive_key and krb5int_derive_key
are missing. In some distro such as Sles11sp1 and Ubuntu 10.04,
both of these libraries are missing

Remove #ifdef HAVE_STRUCT_CRED since it's not defined anywhere.
This is due to incomplete cleanup of autoconf from LU-2800

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I36eb1370afe42cbac3ac924ca8100acaa25558d9
Reviewed-on: http://review.whamcloud.com/7622
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3892 ofd: setattr doesn't need to return attributes 72/7672/2
Alex Zhuravlev [Mon, 16 Sep 2013 17:11:09 +0000 (21:11 +0400)]
LU-3892 ofd: setattr doesn't need to return attributes

the root cause of the problem is that getattr finds the
object being already destroyed, so we have transno from
preceeding setattr and -ENOENT from getattr and this
confuses OSP.

there is actually no need in attributes in the reply.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ib059a443af164d0def58fdfbf41ab545c057cd10
Reviewed-on: http://review.whamcloud.com/7672
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
6 years agoLU-3430 nrs: Fix a race condition in the ORR policy 23/7623/3
Nikitas Angelinas [Wed, 11 Sep 2013 22:43:23 +0000 (23:43 +0100)]
LU-3430 nrs: Fix a race condition in the ORR policy

Checking the atomic oo_ref in nrs_orr_hop_put_free() and then
taking the bucket lock leaves a race window open, by which a
second thread can attempt to free an already-freed
nrs_orr_object. Fix this, and change the hash bucket lock type
from an rwlock to a spinlock, as there are now as many calls on
the write path, as there are on the read path. Rehashing is not
used on the hashes, so libcfs_hash API usage can also be
simplified.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I2e16320c5e4b0803e1bef428f26ea18b0341ac5f
Xyratex-bug-id: MRP-1294
Reviewed-on: http://review.whamcloud.com/7623
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3978 nrs: ORR/TRR is using CRR-N fields 08/7708/2
Nikitas Angelinas [Fri, 20 Sep 2013 01:15:55 +0000 (02:15 +0100)]
LU-3978 nrs: ORR/TRR is using CRR-N fields

A repeated typo is causing ORR/TRR to make use of CRR-N fields;
this completely impairs the ability of ORR/TRR to perform any
sensible scheduling of RPCs, since significant fields used
to enable ORR/TRR scheduling were being overwritten, and
incorrect fields were used when making scheduling decisions.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I4e30360cd412a37cf14348009c6aedb9843df951
Xyratex-bug-id: MRP-1355
Reviewed-on: http://review.whamcloud.com/7708
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3938 osd-zfs: Account for ZAP when shrinking an xattr 71/7671/2
Nathaniel Clark [Mon, 16 Sep 2013 17:00:46 +0000 (13:00 -0400)]
LU-3938 osd-zfs: Account for ZAP when shrinking an xattr

When an xattr is too big for SA it is put in the ZAP, if it is
replaced with one that fits in SA, the one in ZAP should be removed,
otherwise the object will end up with two xattrs with the same name,
and everything gets confused.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I5d33b9e505c751ec01811217377656171553659d
Reviewed-on: http://review.whamcloud.com/7671
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3584 osd-zfs: error check dmu_tx_hold_sa 90/7090/7
Nathaniel Clark [Tue, 23 Jul 2013 17:38:31 +0000 (13:38 -0400)]
LU-3584 osd-zfs: error check dmu_tx_hold_sa

Add extra error checking around call to dmu_tx_hold_sa to ensure that
it succeeds.

Update lbuild target to include necessary zfs fixes (update to version
0.6.2)

Test-Parameters: testlist=racer mdsfilesystemtype=zfs  mdtfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id9dd9aed5a50a3b6febdddcbcc0d238229bb031f
Reviewed-on: http://review.whamcloud.com/7090
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
7 years agoLU-3682 tunefs: prevent tunefs running on a mounted device 33/7433/7
Emoly Liu [Tue, 10 Sep 2013 07:14:16 +0000 (15:14 +0800)]
LU-3682 tunefs: prevent tunefs running on a mounted device

This patch is to check if the given device is already mounted in
the following two situations.
1) Try to get the real path to the given device, in case it is a
symbolic link or dm device for instance, and return EEXIST if it
is already mounted.
2) If the given file is already associated with a mounted loop
device, check_mtab_entry() should return EEXIST to prevent the
following loop setup attemp.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I57d9dc443d94057014212cb30d04a2f385b50d7b
Reviewed-on: http://review.whamcloud.com/7433
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3884 lfsck: LFSCK should NOT hold root object 43/7643/3
Fan Yong [Tue, 20 Aug 2013 15:10:04 +0000 (23:10 +0800)]
LU-3884 lfsck: LFSCK should NOT hold root object

The root object may be accessed via local storage stack and release
the reference by lu_object_put_nocache(), then the root object will
be marked as LU_OBJECT_HEARD_BANSHEE. On the other hand, the LFSCK
still holds reference on the root object. Under such case, if some
others want to access the root object, they have to wait the LFSCK
to release the root object and re-generate the root object in RAM.
But if the LFSCK does not release the reference on the root object
until the device umount, then all the others will hung there.

Test-Parameters: testlist=sanity-lfsck
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I068c442ae808bb2f018e93e0a584a35dcf4c2f9c
Reviewed-on: http://review.whamcloud.com/7643
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3802 tests: only start mdt0 for conf-sanity 68 07/7407/5
wang di [Tue, 10 Sep 2013 07:00:04 +0000 (00:00 -0700)]
LU-3802 tests: only start mdt0 for conf-sanity 68

Only start MDT0 for conf-sanity 68, otherwise other
MDT might reserve sequence as well, which will confuse
test result.

Test-Parameters: mdtcount=2 mdscount=2
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I27b583480ce608cad7743877d14f3f372d7ed645
Reviewed-on: http://review.whamcloud.com/7407
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-3900 autoconf: use set_cpus_allowed_ptr for CPU_AFFINITY 82/7582/2
Minh Diep [Fri, 6 Sep 2013 23:38:12 +0000 (16:38 -0700)]
LU-3900 autoconf: use set_cpus_allowed_ptr for CPU_AFFINITY

Starting 2.6.32 kernel, set_cpus_allowed only set when
CONFIG_CPUMASK_OFFSTACK=n, so we will use set_cpus_allowed_ptr to
define CPU_AFFINITY

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I20d4bb2d620d877aadfb042757fd53cc122ee03a
Reviewed-on: http://review.whamcloud.com/7582
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: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3865 build: support of new MPSS version 3.x 13/7513/6
Dmitry Eremin [Mon, 26 Aug 2013 11:30:26 +0000 (15:30 +0400)]
LU-3865 build: support of new MPSS version 3.x

The MPSS team changed the architecture name from
“x86_64-k1om-linux” to “k1om-mpss-linux”. To accommodate
this change we need few fixes in build infrastructure.

Disable automatic dependency processing for cross build
to avoid incorrect package dependency.

The following files were just copied from main directory
beacuse they are produced by modern autoconf which knows
about k1om architecture:
  libsysio/config.guess
  libsysio/config.sub
  libsysio/depcomp
  libsysio/install-sh
  libsysio/missing

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I89aab076a350540fbc79aa3f6cb0221f5190eb62
Reviewed-on: http://review.whamcloud.com/7513
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3567 kernel: kernel update [SLES11 SP3] 80/7580/7
Bob Glossman [Fri, 6 Sep 2013 19:31:46 +0000 (12:31 -0700)]
LU-3567 kernel: kernel update [SLES11 SP3]

Add ldiskfs patch series and config files for SLES11 SP3.
Add logic to lbuild and ldiskfs autoconf to select between
SP2 and SP3 so we can continue to build for both.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iaca466e9c1d17b16c3f3f57339405e173f8bd1fe
Reviewed-on: http://review.whamcloud.com/7580
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1601 ldlm: Fix flock detection for different mounts 76/3276/12
Andriy Skulysh [Wed, 12 Dec 2012 13:53:52 +0000 (15:53 +0200)]
LU-1601 ldlm: Fix flock detection for different mounts

Deadlock can happen when 2 processes take concurrent locks
on files situated in different mountpoints.

Modify flock detection algorithm to distinguish process by
pair PID+NID instead of PID+export.
It is done by searching for a blocking owner in all OBD's
exports with the same NID.

Xyratex-bug-id: MRP-449
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: Ib2969df9b9733af4025e1905caf2378af72c6f18
Reviewed-on: http://review.whamcloud.com/3276
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3808 ptlrpc: Return a meaningful status from ptlrpcd_init() 22/7522/4
Swapnil Pimpale [Mon, 2 Sep 2013 07:21:32 +0000 (12:51 +0530)]
LU-3808 ptlrpc: Return a meaningful status from ptlrpcd_init()

This patch has the following:
1) Fix for the return value from ptlrpcd_init(). It will now return a
correct status instead of returning zero always.
2) ptlrpcd_addref() should not increment ptlrpcd_users on error.
3) Added code in a mdc_setup() and mgc_setup() to test the return
value of ptlrpcd_addref() and return on error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I684b5603b33d469f4e7566d07f52cb49b05c8ec6
Reviewed-on: http://review.whamcloud.com/7522
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-3872 tests: Fix rpmlint error in lustre/tests/Makefile.am 37/7537/2
yjp [Tue, 3 Sep 2013 16:19:34 +0000 (11:19 -0500)]
LU-3872 tests: Fix rpmlint error in lustre/tests/Makefile.am

This patch is to fix the file permission of the file,
lustre/tests/clientapi/simple_test.c, in lustre/tests/Makefile.am,
which caused the rpmilnt check to fail with error:
"E: spurious-executable-perm (Badness: 50)".

The Makefile.am has simple_test.c as scripts (nobase_noinst_SCRIPTS),
so it is executable. It should be "data" (nobase_noinst_DATA) which
is installed 644.

Signed-off-by: Young Jong Pao <n16490@cray.com>
Change-Id: I83d692bccf8feba48b281a34636f6fd8ec2297f6
Reviewed-on: http://review.whamcloud.com/7537
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-3185 build: fix autogen with modern autoconf tools 90/7490/4
Alexey Lyashkov [Wed, 17 Apr 2013 20:40:10 +0000 (13:40 -0700)]
LU-3185 build: fix autogen with modern autoconf tools

Modern autoconf tools request configure scripts to be more
strict in style, some fixes to improve autoconf usage.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I954c0fc7be34d84ec279883debc44e7a543ebbe5
Reviewed-on: http://review.whamcloud.com/7490
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3829 ldlm: MDT mount fails on MDS w/o MGS on it 09/7509/6
Bobi Jam [Mon, 9 Sep 2013 11:02:19 +0000 (19:02 +0800)]
LU-3829 ldlm: MDT mount fails on MDS w/o MGS on it

If we specify multiple --mgsnode for a MDT, when we start MDS upon
it while MGS is no the other node, the MGC import connection will
always select the local nid (which is one of the candidate mgsnode)
since it think its the closest connection.

This patch treats further --mgsnode nids as failover nids, so that
multiple import connections are added for the MGC import.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ifd015a6df47d4285ff5081a9e1e6eabfc405b193
Reviewed-on: http://review.whamcloud.com/7509
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3694 utils: rewrite posix CT messages 68/7568/4
jcl [Thu, 5 Sep 2013 18:58:40 +0000 (20:58 +0200)]
LU-3694 utils: rewrite posix CT messages

This patch:
- rewrite messages to have a standard format
- add thread id to each message
- use stderr for trace, debug, error

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If7ac03d1b8ed85a80608cf112925dc53a8839fb0
Reviewed-on: http://review.whamcloud.com/7568
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1199 build: fix for configure args with space inside 74/7574/4
Dmitry Eremin [Fri, 6 Sep 2013 14:42:21 +0000 (18:42 +0400)]
LU-1199 build: fix for configure args with space inside

Fix passing arguments with space inside to configure script.
The following example demostrate this issue:
  sh ./autogen.sh
  CFLAGS=" -g -O2 -Werror" ./configure
  make rpms
configure: error: unrecognized option: -g
Try `./configure --help' for more information.
error: Bad exit status from /var/tmp/rpm-tmp.M5V8zv (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.M5V8zv (%build)
make[1]: *** [rpms-real] Error 1
make: *** [rpms] Error 2

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I65fab13d8ef97f0c48a159d77500b66253947aa9
Reviewed-on: http://review.whamcloud.com/7574
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3273 mdt: Hold med_open_lock before walking med_open_head 72/7272/4
Swapnil Pimpale [Thu, 8 Aug 2013 13:42:25 +0000 (19:12 +0530)]
LU-3273 mdt: Hold med_open_lock before walking med_open_head

Fixed a bug where during replay mdt_mfd_open() calls mdt_handle2mfd()
without acquiring the med_open_lock.
We now take the med_open_lock before traversing med_open_head list.
This bug was noticed during the analysis of LU-3233.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ib879f65d41d35f266897e8961dac78e6c4f0d9ec
Reviewed-on: http://review.whamcloud.com/7272
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-3731 ldlm: Fix misleading error message 38/7438/6
Bobbie Lind [Fri, 23 Aug 2013 16:50:11 +0000 (10:50 -0600)]
LU-3731 ldlm: Fix misleading error message

This is a correct error when target only mounts on one server,
but is a misleading error message for an HA scenario.

This rebased patch makes the error message a little clearer for
admins running in HA.

Signed-off-by: Bobbie Lind <bobbie.j.lind@intel.com>
Change-Id: I4bdc7891812dd5db65a4dff420632b771a97d103
Reviewed-on: http://review.whamcloud.com/7438
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3676 llite: error setting max_cache_mb at mount time 94/7194/4
Jinshan Xiong [Wed, 31 Jul 2013 19:31:27 +0000 (12:31 -0700)]
LU-3676 llite: error setting max_cache_mb at mount time

The root cause is that when max_cache_mb conf parameter is applied,
the client isn't connected to the OST yet so that sbi->ll_dt_exp is
NULL. However, it's not necessary to shrink the cache memory in this
case so success should be returned.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib12800812b635207bf4001e2272aadb0ce1e0d6f
Reviewed-on: http://review.whamcloud.com/7194
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-3852 tests: remove large files created by HSM test 84/7484/3
Jinshan Xiong [Wed, 28 Aug 2013 18:14:59 +0000 (11:14 -0700)]
LU-3852 tests: remove large files created by HSM test

Delete files created by HSM test cases with size bigger than 10M.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ibe774254110d0d6f3477bd0bbb3bf287c4356b9a
Reviewed-on: http://review.whamcloud.com/7484
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3706 scrub: fix mutex leak in osd_obj_map_recover() 34/7534/4
Fan Yong [Sat, 10 Aug 2013 07:12:42 +0000 (15:12 +0800)]
LU-3706 scrub: fix mutex leak in osd_obj_map_recover()

We forget to release inode::i_mutex on the /O/<seq>/<dx> when meet OI
mapping conflict in osd_obj_map_recover() to recover objects from the
/lost+found to their original places. Such mutex leak will cause the
OI scrub thread or other threads to be hung when access /O/<seq>/<dx>
next time.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Idc3b99aea5591f546a6d33e5d1fe015a2aac0167
Reviewed-on: http://review.whamcloud.com/7534
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1346 libcfs: cleanup waitq related primitives 55/6955/8
Peng Tao [Wed, 11 Sep 2013 17:01:45 +0000 (01:01 +0800)]
LU-1346 libcfs: cleanup waitq related primitives

Plus some manual change:

1. Remove __wait_event_timeout definition
2. Change cfs_waitq_wait_event_timeout and
   cfs_waitq_wait_event_interruptible_timeout to linux kernel API
3. Replace some function definitions in linux-prim.c as macros in
   linux-prim.h

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I7e53f3deac9e4076e78c109662ff9d1e90239e8d
Reviewed-on: http://review.whamcloud.com/6955
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) 54/6954/8
Peng Tao [Wed, 11 Sep 2013 16:46:17 +0000 (00:46 +0800)]
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)

Affected primitives:

CFS_KERN_XXX, CFS_L1_CACHE_ALIGN, CFS_NR_IRQS, CFS_EXPORT_SYMBOL,
cfs_psdev_t, cfs_psdev_register/deregister, cfs_sysctl_table_t,
cfs_sysctl_table_header_t, cfs_unregister_sysctl_table,
PORTAL_SYMBOL_PUT/GET, PORTAL_MODULE_USE/UNUSE, cfs_(try_)module_get,
__cfs_module_get, cfs_module_refcount, cfs_module_t,
cfs_request_module

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ie1ab42d60b2cba052bb21f4ec5b02a7f7a555515
Reviewed-on: http://review.whamcloud.com/6954
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3462 ldiskfs: Subsume ldiskfs's build system into lustre 50/6850/22
Christopher J. Morrone [Sat, 15 Jun 2013 00:08:10 +0000 (17:08 -0700)]
LU-3462 ldiskfs: Subsume ldiskfs's build system into lustre

Remove ldiskfs's independant build system (configure, spec
file, etc.) and merge its build into lustre's build system.

Move the ldiskfs/ldiskfs directory up one level.  The extra
directory level is no longer needed without the independant
ldiskfs build system.

Add a make dependency on ldiskfs's "sources" target in
ldiskfs/autoMakefile.am rather than explicitly launching a
separate make instance from the top level autoMakefile.am.

Remove unused "sources" targets in libcfs, lnet, and lustre/obdclass.

Improve the handling of the --disable-ldiskfs option, and make it
interact with other configure options more cleanly.

Change-Id: Id0787f27269e938032e480c7c627327c0adf2672
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/6850
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3473 llite: speedup in unlink/rmdir 48/6648/3
Andrew Perepechko [Fri, 14 Jun 2013 10:40:01 +0000 (14:40 +0400)]
LU-3473 llite: speedup in unlink/rmdir

Assume dchild argument is fully initialized in ->unlink and
->rmdir callbacks, so additional lookup for ELC is not needed.

Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Xyratex-bug-id: MRP-1027
Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I984cc8260f8fb5be1f09938b2b38399636c2acd9
Reviewed-on: http://review.whamcloud.com/6648
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3403 test: error of listxattr when buffer is small 94/6594/8
Keith Mannthey [Fri, 9 Aug 2013 06:17:27 +0000 (23:17 -0700)]
LU-3403 test: error of listxattr when buffer is small

Add a new test for LU-3403. Check that when a buffer
that is too small is passed into listxattr the system
call fails correctly.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Idf45a3155284a20afadbd2c331a3d85710f740cb
Reviewed-on: http://review.whamcloud.com/6594
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3715 tests: track_declares_assert only for ldiskfs 99/7399/2
Andreas Dilger [Tue, 20 Aug 2013 17:00:13 +0000 (11:00 -0600)]
LU-3715 tests: track_declares_assert only for ldiskfs

Only enable the track_declares_assert debugging for ldiskfs, or
it spews harmless but unsightly error messages during testing.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I824b56233ee3a58a7a1dc06a67e7ad803a05a536
Reviewed-on: http://review.whamcloud.com/7399
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3610 ptlrpc: Fix argument names of mgs_write_log_pool() 44/7044/2
Li Xi [Sun, 21 Jul 2013 01:21:00 +0000 (18:21 -0700)]
LU-3610 ptlrpc: Fix argument names of mgs_write_log_pool()

The argument 'fsname' and 'poolname' of mgs_write_log_pool()
is misplaced, which is confusing for code readers. This patch
fixes the problem.

What's more, 'lovname' is changed to 'tgtname', which might
be more preferable for more upcoming callers of the function.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I08f11be7e2c99f623d22bec865f31476021c72bb
Reviewed-on: http://review.whamcloud.com/7044
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-2935 tests: Test for layout swap on open unlinked file 01/7301/5
Swapnil Pimpale [Mon, 12 Aug 2013 11:11:00 +0000 (16:41 +0530)]
LU-2935 tests: Test for layout swap on open unlinked file

This regression test verifies that layout swap works correctly on an
open unlinked file

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ib0de7de21286c3c9b37625008432ffd080de589b
Reviewed-on: http://review.whamcloud.com/7301
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3669 xattr: separate ACL and XATTR caches 08/7208/15
Nathaniel Clark [Wed, 4 Sep 2013 18:10:48 +0000 (14:10 -0400)]
LU-3669 xattr: separate ACL and XATTR caches

This patch separates ACL and XATTR caches, so that
when updating an ACL only LOOKUP lock is needed and
when updating another XATTR only XATTR lock is needed.

This patch also reverts XATTR cache support for setxattr
because client performing REINT under even PR lock
can deadlock if an active server operation (like unlink)
attempts to cancel all locks, and setxattr has to wait
for it (MDC max-in-flight is 1).

This patch also drops mot_xattr_sem because there is
no use case for FLXATTRLS with locking.

This patch also takes into account that osd_xattr_list
may be changing lu_buf, so it does not assume that
the buf is unchanged after the call.

This patch disables the r/o cache if the data is
unreasonably large (larger than maximum single EA
size).

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I53f63597d9ecc85bcca0d2b35cda48762b2187bb
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/7208
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2744 build: fix 'data race condition' issues 68/6568/4
Sebastien Buisson [Thu, 6 Jun 2013 12:35:51 +0000 (14:35 +0200)]
LU-2744 build: fix 'data race condition' issues

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I706e4facef8d29a3b072f977c7a903e6c1772b71
Reviewed-on: http://review.whamcloud.com/6568
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-3624 utils: fix lctl test_mkdir for use in mds-survey 01/7101/2
Gregoire Pichon [Wed, 24 Jul 2013 14:42:29 +0000 (16:42 +0200)]
LU-3624 utils: fix lctl test_mkdir for use in mds-survey

The mds-survey script uses the 'lctl test_mkdir' command to create
directories for metadata tests. This currently raises the following
error message:
"...stre-2.4.0/lustre/include/lustre/lustre_idl.h:683:ostid_set_id())
Bad 18446744073709551615 to set 0:0"

This patch fixes the jt_obd_md_common() routine to avoid this error
to be generated.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Idccc13166d6160bfb5f9ac6a79911cc27bfe77a2
Reviewed-on: http://review.whamcloud.com/7101
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-3701 ldlm: refine LU-2665 patch for POSIX compliance 53/7453/3
Bruno Faccini [Tue, 27 Aug 2013 19:20:00 +0000 (21:20 +0200)]
LU-3701 ldlm: refine LU-2665 patch for POSIX compliance

Follow-on to patch introduced to fix LU-2665 ticket (Gerrit
Change at http://review.whamcloud.com/6415 with Change-Id:
I8faa331712abeadee46eabe111ee1c23a05840d5).
Original patch introduced regressions against POSIX test suite
(fcntl.18/fcntl.35 tests in LSB-VSX POSIX test suite at
http://www.opengroup.org/testing/linux-test/lsb-vsx.html),
so the idea is to only resend F_UNLCKs to have both LU-2665 bug
and POSIX test suite happy.

Test-Parameters: testlist=posix
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I8d325cb7039bb3f3f74f2a9829cbaea760d9e20f
Reviewed-on: http://review.whamcloud.com/7453
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-2217 build: fix 'NULL pointer dereference' errors 20/4720/21
Sebastien Buisson [Tue, 21 May 2013 09:07:02 +0000 (11:07 +0200)]
LU-2217 build: fix 'NULL pointer dereference' errors

Fix 'NULL pointer dereference' defects found by Coverity version
6.5.3:
Dereference after null check (FORWARD_NULL)
For instance, Passing null pointer to a function which dereferences
it.
Dereference before null check (REVERSE_INULL)
Null-checking variable suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
Dereference null return value (NULL_RETURNS)

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I646d75d488b66ed348ec51cc2b69f0b644474c30
Reviewed-on: http://review.whamcloud.com/4720
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3807 dcache: Unsafe error handling arnd ll_splice_alias 60/7460/4
Swapnil Pimpale [Tue, 27 Aug 2013 12:25:46 +0000 (17:55 +0530)]
LU-3807 dcache: Unsafe error handling arnd ll_splice_alias

Callers of ll_splice_alias() should not assign the returned pointer to
the dentry since it can be an err pointer. Fixed the above bug using a
temporary dentry pointer. This temporary pointer is assigned to dentry
only if ll_splice_alias has not returned an err pointer.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I0cfdeb53b09fa5642ff01a919ded41aed32aad6d
Reviewed-on: http://review.whamcloud.com/7460
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>