Whamcloud - gitweb
fs/lustre-release.git
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 years agoLU-3490 kerberos: Enable GSSAPI support by default 40/6740/6
Andrew Korty [Fri, 21 Jun 2013 04:08:21 +0000 (00:08 -0400)]
LU-3490 kerberos: Enable GSSAPI support by default

This change enables GSSAPI support by default when its prerequisites
are available.  Without this change, the GSSAPI code does not get
tested when commits are made to Gerrit, even if the prerequisite
GSSAPI and Kerberos libraries are installed.

Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: If661cc6bb1188f3678f70189d5e333219c31052d
Reviewed-on: http://review.whamcloud.com/6740
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3809 test: Cleanup if replay-single/58[bc] fail 19/7419/2
Nathaniel Clark [Thu, 22 Aug 2013 14:10:25 +0000 (10:10 -0400)]
LU-3809 test: Cleanup if replay-single/58[bc] fail

Cleanup state if replay-single/58b or 58c have an error.  This will
unmount MOUNT2.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I471408ffe1aa818be16b6a36ccf6b7e9e9e9891e
Reviewed-on: http://review.whamcloud.com/7419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3781 mdt: Atomically update MDT exp_connect_data 91/7391/2
Andriy Skulysh [Tue, 20 Aug 2013 10:47:20 +0000 (13:47 +0300)]
LU-3781 mdt: Atomically update MDT exp_connect_data

don't copy exp_connect_data in mdt_connect_internal()
it restores original LU-1623 behaviour.

Xyratex-bug-id: MRP-1208
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I71ab4d8917bba8ce12fd9af933885796869321e6
Reviewed-on: http://review.whamcloud.com/7391
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
10 years agoLU-1126 ldlm: Fix a race during FLock handling 34/7134/3
Bruno Faccini [Thu, 1 Aug 2013 07:09:05 +0000 (09:09 +0200)]
LU-1126 ldlm: Fix a race during FLock handling

Protect against race where lock could have been just destroyed
due to overlap, in ldlm_process_flock_lock().
Easy reproducer is BULL's NFS Locktests in pthread mode.
(http://nfsv4.bullopensource.org/tools/tests/locktest.php)

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I4f4183098e8e7aaacb2c6b80787d3c7a7ad5688b
Reviewed-on: http://review.whamcloud.com/7134
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
10 years agoLU-3521 clio: incorrect assertions in 'enable-invariants' 32/6832/4
Niu Yawei [Mon, 1 Jul 2013 04:38:23 +0000 (00:38 -0400)]
LU-3521 clio: incorrect assertions in 'enable-invariants'

Fixed several incorrect assumptions in 'enable-invariants'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I0b54a26afe4e750ef887d0ca9786699bf0ca6ba2
Reviewed-on: http://review.whamcloud.com/6832
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3862 misc: delete obsolete scripts 04/7504/2
Andreas Dilger [Thu, 29 Aug 2013 22:35:56 +0000 (16:35 -0600)]
LU-3862 misc: delete obsolete scripts

There are a number of ancient patch management scripts originally from
Andrew Morton in lustre/kernel_patches/scripts that predate quilt.
There are also a few scripts around from the lconf/LDAP configuration
days in lustre/utils/lustre/ that are completely obsolete.

Delete these and a few other similarly old scripts.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5ad9078c8372a605af5f8e35c97cb40d2a5f8346
Reviewed-on: http://review.whamcloud.com/7504
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1346 contrib: fix libcfs_cleanup script 24/6824/6
Andreas Dilger [Fri, 28 Jun 2013 21:41:07 +0000 (15:41 -0600)]
LU-1346 contrib: fix libcfs_cleanup script

Fix up some warnings in the contrib/scripts/libcfs_cleanup.sed script.
Add a comment with details on how to run the script to find missing
conversions.

Exclude the gnilnd subdirectory, as James prefers to update this
himself.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If61c4318e9d4e7bb59592dfef5c9ee4f973ebbe5
Reviewed-on: http://review.whamcloud.com/6824
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3674 ldiskfs: fix mb_groups column names 87/7187/2
Andreas Dilger [Tue, 30 Jul 2013 23:30:59 +0000 (17:30 -0600)]
LU-3674 ldiskfs: fix mb_groups column names

The ext4-mballoc-extra-checks.patch changes the mb_groups /proc file
to print out both the mballoc free blocks count and the group
descriptor free block count, but incorrectly modifies the column
headers.  Fix the headers to match the fields being printed.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ia7cb2348cfa7a91ed37690bdbc8438834a3ebbe5
Reviewed-on: http://review.whamcloud.com/7187
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2744 build: fix race issues thanks to oap_lock 72/6572/6
Sebastien Buisson [Thu, 6 Jun 2013 12:39:13 +0000 (14:39 +0200)]
LU-2744 build: fix race issues thanks to oap_lock

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.

This patch is dedicated to code fragments involving oap_lock.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ibfd5fe6338c624a1ab98b83ec621bcd88d736491
Reviewed-on: http://review.whamcloud.com/6572
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2744 build: fix 'data race condition' issues 74/6574/4
Sebastien Buisson [Thu, 6 Jun 2013 12:41:34 +0000 (14:41 +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: I9ce06aee1e5ac033025288ad55bf0c3935a3a9cb
Reviewed-on: http://review.whamcloud.com/6574
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2744 build: fix 'data race condition' issues 73/6573/4
Sebastien Buisson [Thu, 6 Jun 2013 12:40:06 +0000 (14:40 +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: I29825c47f08a893685a62aeea2e49b315149b3d9
Reviewed-on: http://review.whamcloud.com/6573
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>
10 years agoLU-2997 test: remove special case for "client" 94/5794/3
Keith Mannthey [Tue, 4 Jun 2013 23:14:37 +0000 (16:14 -0700)]
LU-2997 test: remove special case for "client"

I ran into trouble on a machine named "client"
and I tracked it down to this special case code.

I removed the speical case for "client" and fixed some tabs.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Ia0660b912c29301060682ac51459edb5c44c2190
Reviewed-on: http://review.whamcloud.com/5794
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: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3811 hsm: handle file ownership and timestamps 61/7461/5
John L. Hammond [Thu, 29 Aug 2013 19:41:49 +0000 (14:41 -0500)]
LU-3811 hsm: handle file ownership and timestamps

In hsm_init_ucred() set the capability mask to CFS_CAP_FS_MASK thereby
allowing the coordinator to swap layouts of files not owned by
root. In mdt_orphan_open() raise CFS_CAP_DAC_OVERRIDE before creating
the orphan filee in the MDT's local root. In mdt_hsm_release() set
inode size and timestamps before getting the LOV xattr and ensure that
the orphan file is created with the same UID and GID of the original.
In lhsmtool_posix.c similalrly ensure that the volatile file used for
restore has the same ownership, access and modification timestamps as
the original.

Strengthen sanity-hsm test 24 to check that none of archive, release,
or restore will change the access or modified timestamps. Add 24b to
check that root can archive, release, and restore an ordinary user's
files and that the user will be able to read a released file even if
the parent directory is unwritable.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id08429cbfed1bbab719f52ed101e61d5e629ccd2
Reviewed-on: http://review.whamcloud.com/7461
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3711 mdt: default archive id is tunable 73/7373/2
jcl [Sat, 17 Aug 2013 16:37:39 +0000 (18:37 +0200)]
LU-3711 mdt: default archive id is tunable

Add a /proc entry to specify default archive id. The
default is used when no archive id or 0 archive id are
specified from the command line.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I0d59c37e7bc9a552d1787cf85d03328989ba9b19
Reviewed-on: http://review.whamcloud.com/7373
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Malcolm Cowe <malcolm.j.cowe@intel.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>
10 years agoLU-3500 mdt: use __u64 for sp_cr_flags 68/6868/3
John L. Hammond [Tue, 2 Jul 2013 22:57:09 +0000 (17:57 -0500)]
LU-3500 mdt: use __u64 for sp_cr_flags

In mdt_reconstruct_open() and mdt_open_by_fid(), when storing a copy
of the sp_cr_flags member of struct md_op_spec on the stack use __u64
rather than __u32. In mdd_create_data() use LPO64 for printing
sp_cr_flags.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icaaafe537e9f9dea3934d6c85332d0a355299e25
Reviewed-on: http://review.whamcloud.com/6868
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3788 man: add "lctl set_param -P" to lctl.8 man page 52/7452/2
Artem Blagodarenko [Mon, 26 Aug 2013 12:59:55 +0000 (16:59 +0400)]
LU-3788 man: add "lctl set_param -P" to lctl.8 man page

lctl set_param -P has been added with LU-3155.

This add information about the command to the man page.

Xyratex-bug-id: MRP-272
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Change-Id: I63197836cbd3ce287f9cda33ab292e1e105c7ee8
Reviewed-on: http://review.whamcloud.com/7452
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>
10 years agoNew tag 2.4.92 2.4.92 v2_4_92 v2_4_92_0
Oleg Drokin [Tue, 3 Sep 2013 06:25:48 +0000 (02:25 -0400)]
New tag 2.4.92

Change-Id: I8320ecdb13f9b2358f72c8da317ac5faa6b98f43

10 years agoLU-2800 autoconf: remove LC_RW_TREE_LOCK test 40/5340/8
James Simmons [Sun, 18 Aug 2013 00:12:40 +0000 (20:12 -0400)]
LU-2800 autoconf: remove LC_RW_TREE_LOCK test

address_space.tree_lock has been a spinlock since v2.6.26.
We can remove the test and the dead code.

Change-Id: Ia9204ab7dfe76d053483244347f9a7194ac4e416
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/5340
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>
10 years agoLU-3841 lod: handle released defined layouts 67/7467/2
John L. Hammond [Tue, 27 Aug 2013 17:29:09 +0000 (12:29 -0500)]
LU-3841 lod: handle released defined layouts

In lod_use_defined_striping() covert layout magic to non _DEF form
before passing to lov_mds_md_size() and check that the supplied buffer
is sufficiently large only after accounting for released layouts.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic5fdebaf0bc4a9327d6f5bba1be048bb033b1d3a
Reviewed-on: http://review.whamcloud.com/7467
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
10 years agoLU-2800 autoconf: update LC_INODE_PERMISION_2ARGS test 63/5363/7
James Simmons [Sun, 18 Aug 2013 00:44:56 +0000 (20:44 -0400)]
LU-2800 autoconf: update LC_INODE_PERMISION_2ARGS test

inode_operations->permission has changed over time:
v2.6.27..v2.6.37 had a 2 arg version
v2.6.28..v3.0 had a 3 arg version
v3.1.. has a 2 arg version again

We move the test so it makes more sense in the list.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I0e9b2a35e934f8efb3bd932303cdee859d7a6b44
Reviewed-on: http://review.whamcloud.com/5363
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2800 autoconf: remove LC_FS_RENAME_DOES_D_MOVE test 48/5348/9
James Simmons [Sun, 18 Aug 2013 00:32:17 +0000 (20:32 -0400)]
LU-2800 autoconf: remove LC_FS_RENAME_DOES_D_MOVE test

FS_RENAME_DOES_D_MOVE has been upstream since v2.6.19.
We can remove the test and the dead code.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I71fc1e7c2216861dff2ce31f45c8ecaea64e7cfa
Reviewed-on: http://review.whamcloud.com/5348
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>
10 years agoLU-3789 mgs: Add deprecation warning for "lctl conf_param" 36/7436/3
Artem Blagodarenko [Fri, 23 Aug 2013 12:53:45 +0000 (16:53 +0400)]
LU-3789 mgs: Add deprecation warning for "lctl conf_param"

lctl set_param -P has been added with LU-3155. Old mechanism
(lctl conf_param) should be deprecated.

This patch adds warnings since 2.7.53 and disable lctl set_param
option since 3.0.53

Xyratex-bug-id: MRP-272
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Change-Id: I37479a333869de1d10b74b623bd4d921774664e8
Reviewed-on: http://review.whamcloud.com/7436
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
10 years agoLU-3581 osc: Lustre returns EINTR from writes when SA_RESTART is set 02/7002/5
James Simmons [Thu, 22 Aug 2013 18:11:51 +0000 (14:11 -0400)]
LU-3581 osc: Lustre returns EINTR from writes when SA_RESTART is set

When Lustre is in a read or write system call and receives a
SIGALRM, it will return EINTR if interrupted in osc_enter_cache.
This prevents the system call from being restarted if
SA_RESTART is set in the handler.

This patch changes behavior in this location to return ERESTARTSYS
when a signal arrives during the call to l_wait_event.

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I95423c5d572974352173f3c5c94d980385bfef29
Reviewed-on: http://review.whamcloud.com/7002
Reviewed-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3549 llapi: add printf attribute to llapi_{printf,error} 67/6867/9
John L. Hammond [Tue, 2 Jul 2013 22:06:29 +0000 (17:06 -0500)]
LU-3549 llapi: add printf attribute to llapi_{printf,error}

Add printf attributes to llapi_printf and llapi_error for compile time
checking that the format string agrees with the argument list, and
const qualify the format parameter of both functions. Fixup the
mismatched calls to these functions.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ic8df148abb0bfe8ce72d05d76cb7ce0f1832c28f
Reviewed-on: http://review.whamcloud.com/6867
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3497 build: Use alt. path for ZFS development headers 50/6750/5
James Simmons [Mon, 24 Jun 2013 14:19:35 +0000 (10:19 -0400)]
LU-3497 build: Use alt. path for ZFS development headers

In the move to dkms the ability to use ZFS userland developement
headers from the ZFS source tree instead of /usr/include was
removed. This patch restores the ability to build lustre using
ZFS on any build box that lacks having the ZFS developement rpms
installed.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I4307d07072f655df86f542686ece71e11cc97045
Reviewed-on: http://review.whamcloud.com/6750
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2800 autoconf: remove LC_SECURITY_PLUG test 60/5360/6
James Simmons [Sun, 18 Aug 2013 00:22:01 +0000 (20:22 -0400)]
LU-2800 autoconf: remove LC_SECURITY_PLUG test

Only the SLES 10 kernel took a vfsmount for various vfs operations
to support AppArmor before the path variants were available.
We can remove the test and the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I5d4b1c1c9c4994582c51c39ef3b7375b2e0997d3
Reviewed-on: http://review.whamcloud.com/5360
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>
10 years agoLU-3768 tunefs: make tunefs.lustre work correctly for MGS 53/7353/4
Emoly Liu [Sun, 2 Jun 2013 07:35:18 +0000 (15:35 +0800)]
LU-3768 tunefs: make tunefs.lustre work correctly for MGS

Since LDD_F_NEED_INDEX flag is unset for a stand-alone MGS during
mkfs.lustre, when running tunefs.lustre on that MGS, it always says
"'----index' only valid for MDT,OST". To fix that, this patch is to
- print that error message only for mkfs.lustre
- fix the typo '----index' in the error message.

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I4fa00dc554521c03671602ff9b2bbaca02c6a581
Reviewed-on: http://review.whamcloud.com/7353
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>
10 years agoLU-3787 test: Missing "$" on variable 03/7403/2
James Nunez [Tue, 20 Aug 2013 21:21:49 +0000 (15:21 -0600)]
LU-3787 test: Missing "$" on variable

In test 90 of replay-single, the argument of
getstripe is $dir/file when it really should be
$dir/$file. Getstripe fails since "file" does
not exist.

The patch adds the "$" to the argument of getstripe.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I253c358d2912b57b54024f02a0a1ca54094369a7
Reviewed-on: http://review.whamcloud.com/7403
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2484 obd: add md_stats to MDC and LMV devices 27/4827/7
John L. Hammond [Thu, 13 Dec 2012 21:47:00 +0000 (15:47 -0600)]
LU-2484 obd: add md_stats to MDC and LMV devices

Enable md_stats for MDC and LMV devices and fix the definition of
EXP_MD_COUNTER_INCREMENT() so that they will be tallied. These stats
track usage of the md_ops methods (from the OBD layer, not to be
confused with md_device methods) and are exported through the files
/proc/fs/lustre/{lmv,mdc}/*/md_stats.

Rename m_sync to m_fsync making the counter name (fsync) more
intuitive. Prune the minimally useful operations from set of md_ops to
be counted. The operations counted are close, create, enqueue,
getattr, intent_lock, link, rename, setattr, fsync, readpage, unlink,
setxattr, egtxattr, intent_getattr_async, and revalidate_lock.

Add assertions to lprocfs_counter_{add,sub}() to ensure that the
counter index lies in the appropriate range for stats. Remove the
corresponding assertions from OBD_COUNTER_INCREMENT(),
EXP_COUNTER_INCREMENT(), and EXP_MD_COUNTER_INCREMENT(). Add macros
NUM_OBD_STATS and NUM_MD_STATS for use when allocating stats.

In mdt_export_stats_init() allocate and initialize the nid_stats
member of struct exp_nid_stats using only the MDT private
counters. This does not affect the contents of
/proc/fs/lustre/mdt/*/exports/*/stats but does save memory.

Add a flag to struct obd_device to indicate if EXP_COUNTER_INCREMENT()
should increment stats in the nid_stats member (as in the case of OFD)
or not (MDT).

Remove the unused member exp_md_stats from struct obd_export.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idccd30e13adbc11d10b544cdfbe1d23123176e94
Reviewed-on: http://review.whamcloud.com/4827
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2675 cleanup: define sparse annotations for libcfs 69/6969/2
John L. Hammond [Fri, 12 Jul 2013 20:31:28 +0000 (15:31 -0500)]
LU-2675 cleanup: define sparse annotations for libcfs

Add empty definitions for the sparse checker annotations (__user,
__kernel, __safe, ...) defined by the kernel. This will allow these
annotations to be used in files common to kernel modules and libcfs.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I26a7d3fad0bc07535db4dfaa25e40bb10ff4e951
Reviewed-on: http://review.whamcloud.com/6969
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2253 tests: get proper free indoes 75/7375/2
Niu Yawei [Mon, 19 Aug 2013 04:16:52 +0000 (00:16 -0400)]
LU-2253 tests: get proper free indoes

In the DNE environment, usually we want to get free indoes on the
master MDT but not the whole filesystem.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I3bbae177ba556eaa7a7cdb582448c94d24c57bfb
Reviewed-on: http://review.whamcloud.com/7375
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3720 test: use actual stripe count in sanity.sh 130d 03/7303/2
Emoly Liu [Fri, 31 May 2013 20:14:08 +0000 (04:14 +0800)]
LU-3720 test: use actual stripe count in sanity.sh 130d

The test is expecting each OST to get a specific amount if data based
in the size and stripe count, but if an OST is full, more data will be
written to each of the other OSTs.
To fix that, use the actual number of stripes allocated instead of the
requested number of stripes.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Iadb0daf16d7c121d2104f1fe49afa7f762a7f52a
Reviewed-on: http://review.whamcloud.com/7303
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3703 tests: skip getfattr part of sanity test 234 06/7306/2
Bob Glossman [Mon, 12 Aug 2013 19:28:41 +0000 (12:28 -0700)]
LU-3703 tests: skip getfattr part of sanity test 234

Test fails due to a known bug in the upstream getfattr command in
SLES clients.  Skip the failing part of the test to work around
this problem.

If the upstream fix already present in source and in RHEL releases ever
lands in SLES releases this mod can be removed.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I153713dc0dd43178d16f3c5bdf79c7ce07b6bbef
Reviewed-on: http://review.whamcloud.com/7306
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3763 utils: set multipath devices recursively 37/7337/4
Bobi Jam [Thu, 15 Aug 2013 02:21:25 +0000 (10:21 +0800)]
LU-3763 utils: set multipath devices recursively

Make set_blockdev_tunables() set tunables recursively to reach
slaves' slaves.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ic56e433758c91d3cbf5063f0d5e652b57c607a1e
Reviewed-on: http://review.whamcloud.com/7337
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3508 test: small fix for sanity.sh test_101c 54/6854/3
Emoly Liu [Sun, 19 May 2013 08:45:38 +0000 (16:45 +0800)]
LU-3508 test: small fix for sanity.sh test_101c

Filter out those "found no match" proc entries in sanity.sh test_101c
and do some code cleanup.

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ie56c058318c52c8809a21ed242e9bb797b7d421a
Reviewed-on: http://review.whamcloud.com/6854
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3097 build: fix 'no effect' errors 66/7166/5
Sebastien Buisson [Mon, 29 Jul 2013 15:23:48 +0000 (17:23 +0200)]
LU-3097 build: fix 'no effect' errors

Fix 'no effect' issues found by Coverity version 6.5.1:
Unsigned compared against 0 (NO_EFFECT)
This greater-than-or-equal-to-zero comparison of an unsigned value
is always true.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ic832e990c428ba674dcb8ba0f04c2bbf78fa8ee9
Reviewed-on: http://review.whamcloud.com/7166
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3647 hsm: Add support to drop all pages for ll_data_version 94/6794/8
Jinshan Xiong [Mon, 29 Jul 2013 19:43:27 +0000 (12:43 -0700)]
LU-3647 hsm: Add support to drop all pages for ll_data_version

This will be used by HSM release to get data version and drop all
caching pages from all clients, before sending IT_RELEASE close
REQ to MDT.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I670521881d77dfa584e9124d21eb65b048cc82e9
Reviewed-on: http://review.whamcloud.com/6794
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3561 tests: improve sanity-hsm.sh to support remote agent 10/7110/12
Jian Yu [Thu, 29 Aug 2013 15:23:56 +0000 (23:23 +0800)]
LU-3561 tests: improve sanity-hsm.sh to support remote agent

In the current sanity-hsm.sh, only one HSM copytool is started on
the local Lustre client node.

In order to test multiple remote HSM agents/copytools, this patch
introduces a new facet type named "AGT" and the following associated
variables:

- AGTCOUNT: number of agents
- AGTDEV{N}: target HSM mount point (root path of the backend)
- agt{N}_HOST: hostname of the agent agt{N}
- SINGLEAGT: facet of the single agent

By default, only single copytool is started on a remote client node.
If there was no remote client, then the copytool will be started on
the local client.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I6e85d6948da894bd50148b0504347159ae23a79b
Reviewed-on: http://review.whamcloud.com/7110
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1346 libcfs: cleanup cfs_curproc_xxx macros 79/4779/5
James Simmons [Thu, 29 Aug 2013 11:31:21 +0000 (07:31 -0400)]
LU-1346 libcfs: cleanup cfs_curproc_xxx macros

Change cfs_curproc_xxx to stadard linux kernel API.

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: Ic526d02f547b04550e6049f2e343dd678bdbdf3c
Reviewed-on: http://review.whamcloud.com/4779
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>
10 years agoLU-1346 libcfs: cleanup macros in portals_compat25.h 78/4778/8
James Simmons [Tue, 27 Aug 2013 16:51:06 +0000 (12:51 -0400)]
LU-1346 libcfs: cleanup macros in portals_compat25.h

. remove some unused/unnecessary macros such as smp_num_cpus /
  SIGNAL_MASK_ASSERT etc.

. replace some macros with direct kernel API calls such as
  RECALC_SIGPENDING/CLEAR_SIGPENDING/CURRENT_SECONDS,
  cfs_wait_event_interruptible/_exclusive etc.

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: I2fd4bb4e05136d738ee5357b35893a6ca2ec335a
Reviewed-on: http://review.whamcloud.com/4778
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3428 build: fix 'uninitialized variables' errors 11/6511/2
Sebastien Buisson [Fri, 31 May 2013 14:14:08 +0000 (16:14 +0200)]
LU-3428 build: fix 'uninitialized variables' errors

Fix 'uninitialized variables' defects found by Coverity version 6.5.1:
Uninitialized scalar variable (UNINIT)
Using uninitialized value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I594b3c509ec72cb35829fb675c4a23c6ef03b6d8
Reviewed-on: http://review.whamcloud.com/6511
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@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>
10 years agoLU-3647 llite: cancel open lock before closing file 46/7346/3
Jinshan Xiong [Thu, 15 Aug 2013 22:11:26 +0000 (15:11 -0700)]
LU-3647 llite: cancel open lock before closing file

In error handling path of ll_lease_open(), och has already been
freed in ll_close_inode_openhandle() so the sequence of cancel
open lock and close open handle need adjusting.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I02ac654e7ac0dd482a80ede727ea1e90382a5f76
Reviewed-on: http://review.whamcloud.com/7346
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3332 tests: Add DNE support to sanity-scrub 33/6333/8
Li Wei [Wed, 29 May 2013 02:38:00 +0000 (10:38 +0800)]
LU-3332 tests: Add DNE support to sanity-scrub

sanity-scrub only exercises MDT 0.  This patch enhances it to also
test OI scrub on the other MDTs, if available.

Test-Parameters: mdtcount=2 testlist=sanity-scrub
Change-Id: Ic11abf964a85892f3c772cc1a12f3e94c8f2a256
Signed-off-by: wang di <di.wang@intel.com>
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/6333
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3847 kernel: Kernel update [RHEL6.4 2.6.32-358.18.1.el6] 14/7514/3
Bob Glossman [Fri, 30 Aug 2013 18:41:48 +0000 (11:41 -0700)]
LU-3847 kernel: Kernel update [RHEL6.4 2.6.32-358.18.1.el6]

Kernel update [RHEL6.4 2.6.32-358.18.1.el6]

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iba2692be9fa85c5bfe4a7c2c8152981c43b4defc
Reviewed-on: http://review.whamcloud.com/7514
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2904 llite: return compatible fsid for statfs 34/7434/2
Fan Yong [Mon, 15 Jul 2013 14:59:48 +0000 (22:59 +0800)]
LU-2904 llite: return compatible fsid for statfs

Lustre uses 64-bits inode number to identify object on client side.
When re-export Lustre via NFS, NFS will detect whether support fsid
via statfs(). For the non-support case, it will only recognizes and
packs low 32-bits inode number in nfs handle. Such handle cannot be
used to locate the object properly.
To avoid patch linux kernel, Lustre client should generate fsid and
return it via statfs() to up layer.

To be compatible with old Lustre client (NFS server), the fsid will
be generated from super_block::s_dev.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I56ffe1836a33c6436ed628f2aee3714cf4445dc9
Reviewed-on: http://review.whamcloud.com/7434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3832 clio: honor O_NOATIME 42/7442/4
John L. Hammond [Fri, 23 Aug 2013 19:50:17 +0000 (14:50 -0500)]
LU-3832 clio: honor O_NOATIME

Add a ci_noatime bit to struct cl_io. In ll_io_init() set this bit if
O_NOATIME is set in f_flags. Ensure that this bit is propagated down
to lower layers. In osc_io_read_start() don't update atime if this bit
is set. Add sanity test 39n to check that passing O_NOATIME to open()
is honored.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I3e7ab1d777e897ce7840ad6b1b067a571fa2bff4
Reviewed-on: http://review.whamcloud.com/7442
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3042 build: fix 'NULL pointer dereference' errors 68/5868/10
Sebastien Buisson [Thu, 28 Mar 2013 13:55:08 +0000 (14:55 +0100)]
LU-3042 build: fix 'NULL pointer dereference' errors

Fix 'NULL pointer dereference' defects found by Coverity version
6.5.0:
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>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ie04698f49ec7804466962511e3035c00b14b3d8c
Reviewed-on: http://review.whamcloud.com/5868
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3097 build: fix 'missing break' errors 64/7164/4
Sebastien Buisson [Mon, 29 Jul 2013 15:19:15 +0000 (17:19 +0200)]
LU-3097 build: fix 'missing break' errors

Fix 'missing break' issues found by Coverity version 6.5.1:
Missing break in switch (MISSING_BREAK)
This case is not terminated by a 'break' statement.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ib96784433db5075bb6fb916024c1c217850f7eb6
Reviewed-on: http://review.whamcloud.com/7164
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3860 bug: fix kernel directory README. 99/7499/2
Richard Henwood [Thu, 29 Aug 2013 19:53:44 +0000 (14:53 -0500)]
LU-3860 bug: fix kernel directory README.

The kernel patch README now points visitors to
http://lustre.opensfs.org/documentation/

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Ifbf3d71fc0c6f7ad99a09f19107ca99f5b445ce7
Reviewed-on: http://review.whamcloud.com/7499
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3842 hsm: handle NULL crh in hsm_cdt_request_completed() 70/7470/2
John L. Hammond [Tue, 27 Aug 2013 18:00:40 +0000 (13:00 -0500)]
LU-3842 hsm: handle NULL crh in hsm_cdt_request_completed()

In hsm_cdt_request_completed() if a restore handle could not be found,
don't dereference the NULL crh returned by hsm_restore_hdl_find().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I175f506d0acdecfef36352638bda2ada66d182db
Reviewed-on: http://review.whamcloud.com/7470
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3835 hsm: add missing braces to ct_copy_attr() 62/7462/2
John L. Hammond [Tue, 27 Aug 2013 14:08:18 +0000 (09:08 -0500)]
LU-3835 hsm: add missing braces to ct_copy_attr()

Add missing braces to ct_copy_attr() in lhsmtool_posix.c so that we
don't return a stale errno on success.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia8ab377d8fd00d94666b15713f4e749d1330854a
Reviewed-on: http://review.whamcloud.com/7462
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3775 build: build error with gcc 4.7.0 20110509 82/7382/4
Dmitry Eremin [Mon, 19 Aug 2013 10:00:24 +0000 (14:00 +0400)]
LU-3775 build: build error with gcc 4.7.0 20110509

Fixed the error: 'tgt' and 'nf' may be used uninitialized in
this function. Also fixed comparison signed and unsigned
indexes.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I733e3f6456ce2926dfc6f3c5e9ac8f860566c121
Reviewed-on: http://review.whamcloud.com/7382
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3027 clio: Do not shrink sublock at cancel 81/7481/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,ONLY=write_disjoint \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=parallel-scale

Change-Id: I8f2de683812621fb2f8d761cf2aceebc12868d75
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/7481
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
10 years agoLU-3754 mdt: Enable data_version control 29/7329/3
Aurelien Degremont [Thu, 25 Jul 2013 12:48:20 +0000 (14:48 +0200)]
LU-3754 mdt: Enable data_version control

When LU-1333 was landed, all HSM infrastructure was not yet landed and
it was not possible to archived a file. As a consequence, the original
patch did not compare on-disk archived data version and current file
data version.
Now, everything required is there and we should enable this
verification.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I9db86797b234d0f54c4c87bb84290b788f2d05bb
Reviewed-on: http://review.whamcloud.com/7329
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
10 years agoLU-3803 test: refine sanity test_161c 39/7439/2
Bobi Jam [Fri, 23 Aug 2013 16:56:45 +0000 (00:56 +0800)]
LU-3803 test: refine sanity test_161c

The test 161c is assume the $tdir will be in MDT0, but
actually $tdir(161d) left by 161a and 161b will be on
MDT1, which will make 161 fails, so delete $tdir before
testing 161c.

Add interop test condition.

Add more console output infomation.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Id40c63c3c81d32565e393850c4448c30e0d2e693
Reviewed-on: http://review.whamcloud.com/7439
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: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3671 mdd: sync perm for dir and perm reduction only 57/7257/5
Lai Siyao [Wed, 7 Aug 2013 10:42:31 +0000 (18:42 +0800)]
LU-3671 mdd: sync perm for dir and perm reduction only

To mitigate performance impact for sync permission, do it for dir
and when permission is reduced only.

Remove extra sync permission check in mdd_xattr_set() because ACL
change is all handled in mdd_acl_set().

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I64fc720a380aafdaf858d83fbb85f29a1063e07f
Reviewed-on: http://review.whamcloud.com/7257
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>