Whamcloud - gitweb
fs/lustre-release.git
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>
10 years agoLU-3751 ost: disable OUT_PORTAL request handler on OST. 23/7323/3
wang di [Tue, 13 Aug 2013 07:00:23 +0000 (00:00 -0700)]
LU-3751 ost: disable OUT_PORTAL request handler on OST.

Disable OUT_PORTAL request handler on OST for now, otherwise
it will confuse the connect requests from another MDT, when
MDTs and OSTs are all in the same node.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ifcbfabaa52537e1664086e335b07a6f179b17f2d
Reviewed-on: http://review.whamcloud.com/7323
Reviewed-by: John L. Hammond <john.hammond@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>
10 years agoLU-3587 changelogs: Account for changelog_ext_rec in CR_MAXSIZE 93/6993/3
Christopher J. Morrone [Tue, 16 Jul 2013 00:56:25 +0000 (17:56 -0700)]
LU-3587 changelogs: Account for changelog_ext_rec in CR_MAXSIZE

CR_MAXSIZE needs to account for an llog_changelog_rec that actually
contains a changelog_ext_rec structure rather than a changelog_rec.
With out doing so, a file size approaching the Linux kernel NAME_MAX
length that is renamed to a size also close to, or at, NAME_MAX will
exceed CR_MAXSIZE and trip an assertion.

Change-Id: I2d86955efcbd6d0fd28c87026a7720311b4f5598
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/6993
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3783 ldlm: ldlm_flock_deadlock() ASSERTION( req != lock ) failed 92/7392/2
Andriy Skulysh [Tue, 20 Aug 2013 12:23:46 +0000 (15:23 +0300)]
LU-3783 ldlm: ldlm_flock_deadlock() ASSERTION( req != lock ) failed

Abort processing of flock blockers list
on reaching disconnected export

Change-Id: I8763dd246ef655fee6f926e49b00a7a54c720386
Xyratex-bug-id: MRP-1266
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/7392
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-3718 mdt: HSM EXIST event not triggered at last rm/mv 60/7260/4
jcl [Fri, 2 Aug 2013 11:25:30 +0000 (13:25 +0200)]
LU-3718 mdt: HSM EXIST event not triggered at last rm/mv

After a rm or mv, if the target file is destroyed
(last unlink) and if there is an archive in the backend
a flags must be set in changelog event

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I92f3ea91d377ba8b3724aef43d4e7ba8b0a6f681
Reviewed-on: http://review.whamcloud.com/7260
Tested-by: Hudson
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>
10 years agoLU-3659 llog: missed dt_try_as_dir() in llog_osd_dir_get() 67/7267/5
Niu Yawei [Thu, 8 Aug 2013 05:02:33 +0000 (01:02 -0400)]
LU-3659 llog: missed dt_try_as_dir() in llog_osd_dir_get()

dt_try_as_dir() should be called in llog_osd_dir_get() to make sure
the do_index_ops being initialized.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I879c47bb59fbd28f3351f61e59cff2a6666e7d7a
Reviewed-on: http://review.whamcloud.com/7267
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3649 lfsck: release object reference when reset lfsck 90/7190/5
Fan Yong [Sat, 13 Jul 2013 06:35:15 +0000 (14:35 +0800)]
LU-3649 lfsck: release object reference when reset lfsck

When reset lfsck, related lfsck tracing file will be re-created,
but we forgot to release the object reference of the old tracing
file, then trigger LASSERT() when related device to be released.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2f5dd9933e0870849d85d03909b2d7926d244029
Reviewed-on: http://review.whamcloud.com/7190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
10 years agoLU-3126 osd: remove fld lookup during configuration 66/7266/6
wang di [Wed, 7 Aug 2013 07:02:21 +0000 (00:02 -0700)]
LU-3126 osd: remove fld lookup during configuration

Remove fld lookup during configuration, so to avoid accessing
FLDB on MDT0 before MDT0 is setup.

1. add od_is_ost to check whether the FID is on OST, instead
of lookup in FLDB.

2. add oic_device in OI cache, so in OI cache lookup, it will
try to match device to avoid the ino of agent inode is being
retrieved from OI cache. Then osd_remote_fid, which will trigger
fld lookup, can be removed from osd index lookup.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I85649431f47ad8aa8bd1e46a7b074e15b080bb1d
Reviewed-on: http://review.whamcloud.com/7266
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.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-1346 libcfs: tcpip/time/type related cleanup 77/4777/8
James Simmons [Tue, 16 Jul 2013 16:03:29 +0000 (12:03 -0400)]
LU-1346 libcfs: tcpip/time/type related cleanup

Cleanup some macros in linux-tcpip.h, linux-time.h, linux-type.h.
Move some different kernel compatible macros to portals_compat25.h.

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: Ia03046ff53a5f51e67d2fe7ccee7a6441ebe1dc7
Reviewed-on: http://review.whamcloud.com/4777
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-3476 build: eliminate bad macros in lustre spec file 56/6856/5
Minh Diep [Tue, 2 Jul 2013 15:28:57 +0000 (08:28 -0700)]
LU-3476 build: eliminate bad macros in lustre spec file

We are replacing non-standard binary macros with standard
--with/--without mechanism

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Id499726b28f33b60b969b1d72b97625ca1f50967
Reviewed-on: http://review.whamcloud.com/6856
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3712 lmv: choose right MDT for open by FID 53/7253/4
wang di [Tue, 6 Aug 2013 11:26:44 +0000 (04:26 -0700)]
LU-3712 lmv: choose right MDT for open by FID

If the open is by FID, LMV should locate MDT by the FID
of the file/directory, instead of its parent.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If7815de8cab0cf28b521decccda3c5f0f1aed73c
Reviewed-on: http://review.whamcloud.com/7253
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3478 iokit: NUMA support in sgpdd-survey 83/6683/7
Gregoire Pichon [Tue, 18 Jun 2013 14:19:10 +0000 (16:19 +0200)]
LU-3478 iokit: NUMA support in sgpdd-survey

This patch provides NUMA support in sgpdd-survey script so that
devices can be accessed similarly to threads on Lustre servers.
Typically, IO buffers must be located close to cpus that are
local to the device.

It is based on the "numactl" command and an external command
provided by the caller that returns a cpu list from a device.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I42d41a69a2ff24b3384cada9d742f163d3777db2
Reviewed-on: http://review.whamcloud.com/6683
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@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 agoNew tag 2.4.91 2.4.91 v2_4_91 v2_4_91_0
Oleg Drokin [Sat, 17 Aug 2013 23:19:31 +0000 (19:19 -0400)]
New tag 2.4.91

Change-Id: I3abd885e42c97739658a95a875762bfc886e9bed
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3316 obdclass: fix wrong device put in case of race 34/6334/3
Mikhail Pershin [Tue, 14 May 2013 12:17:30 +0000 (16:17 +0400)]
LU-3316 obdclass: fix wrong device put in case of race

The ls_device_put() might be called from local_oid_storage_fini()
wrongly if mutex-protected check failed due to race

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ia2707d5db84b6bb6e9a5558c08b03028de8b9d50
Reviewed-on: http://review.whamcloud.com/6334
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-358 tests: Add the branch and commit-id to the yml. 29/1629/6
Chris Gearing [Fri, 28 Oct 2011 16:58:09 +0000 (17:58 +0100)]
LU-358 tests: Add the branch and commit-id to the yml.

yaml.sh updated to provide the information requested in the JIRA the
change is simple and requires that LUSTRE_BRANCH and LUSTRE_REVISION
are defined, if they are not defined then the elements are left blank

Change-Id: Ie558660bdf9cde4290342ea4e807ed22fa42d32a
Signed-off-by: Chris Gearing <chris@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1629
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-2800 autoconf: remove LC_FS_STRUCT_USE_PATH 59/5359/6
James Simmons [Tue, 23 Jul 2013 13:45:27 +0000 (09:45 -0400)]
LU-2800 autoconf: remove LC_FS_STRUCT_USE_PATH

struct fs_struct has been using struct path for working dirs
since v2.6.26.

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: I647eff05fa927e6d8b9865009a3e920c7971b7c5
Reviewed-on: http://review.whamcloud.com/5359
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>
10 years agoLU-3443 mdc: document mdc_rpc_lock 93/6593/3
Ned Bass [Fri, 7 Jun 2013 22:22:34 +0000 (15:22 -0700)]
LU-3443 mdc: document mdc_rpc_lock

As this lock can be a bottleneck, clarifying why it is needed may be
helpful to those working on client performance.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: Ib617a99a51b65b1141e52a6f31d4431828203650
Reviewed-on: http://review.whamcloud.com/6593
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-3434 build: disable automatic Git hook install 46/7046/3
Andreas Dilger [Fri, 19 Jul 2013 09:01:07 +0000 (03:01 -0600)]
LU-3434 build: disable automatic Git hook install

Don't automatically install the Git commit hooks for checking code
and commit message style into .git/hooks/{prepare-,}commit-msg.
This should be done manually by the developer and/or checked when
the patch is pushed to Gerrit.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ie44be3baa5f04eb71a3d7f76556c455fd5fa7052
Reviewed-on: http://review.whamcloud.com/7046
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2800 autoconf: remove LC_LINUX_FIEMAP_H test 42/5342/7
James Simmons [Fri, 2 Aug 2013 12:26:58 +0000 (08:26 -0400)]
LU-2800 autoconf: remove LC_LINUX_FIEMAP_H test

<linux/fiemap.h> has been upstream since v2.6.28
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: I26fbef49fa672e81bd23697c972d6f3fff0944b4
Reviewed-on: http://review.whamcloud.com/5342
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>
10 years agoLU-2800 autoconf: update LC_EXPORT_TRUNCATE_COMPLETE 35/5335/7
James Simmons [Fri, 2 Aug 2013 13:19:58 +0000 (09:19 -0400)]
LU-2800 autoconf: update LC_EXPORT_TRUNCATE_COMPLETE

The LC_EXPORT_TRUNCATE_COMPLETE is under the heading for RHEL4 patches
which is misleading. The test checks for:

- exported truncate_complete_page, which was never in a release
- remove_from_page_cache, exported in v2.6.35
- delete_from_page_cache, exported in v2.6.39, replaced
  removed_from_page_cache

Let's update the comments and move the test into a place in the list
where it makes sense at a glance.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8e53cc10d72528f9107c375cd7bb8527a27fadbd
Reviewed-on: http://review.whamcloud.com/5335
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>
10 years agoLU-2800 autoconf: remove LC_BIT_SPINLOCK_H test 38/5338/7
James Simmons [Tue, 23 Jul 2013 12:35:28 +0000 (08:35 -0400)]
LU-2800 autoconf: remove LC_BIT_SPINLOCK_H test

bit_spinlock.h has been upstream since v2.6.17.
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: I2875ae150e58c6670a2b56ad56e2a101eb6676b7
Reviewed-on: http://review.whamcloud.com/5338
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>
10 years agoLU-2800 autoconf: remove LC_UNREGISTER_BLKDEV_RETURN_INT test 49/5349/7
James Simmons [Fri, 2 Aug 2013 13:33:24 +0000 (09:33 -0400)]
LU-2800 autoconf: remove LC_UNREGISTER_BLKDEV_RETURN_INT test

unregister_blkdev has returned void since v2.6.23
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: Ic303ed75516064e508a1f84e6d64a6fa2f10a340
Reviewed-on: http://review.whamcloud.com/5349
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>
10 years agoLU-2800 autoconf: remove LC_LOCK_MAP_ACQUIRE test 69/5369/9
James Simmons [Fri, 2 Aug 2013 11:47:47 +0000 (07:47 -0400)]
LU-2800 autoconf: remove LC_LOCK_MAP_ACQUIRE test

lock_map_acquire has been in 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: I4ac4cb6c92f79408712b210eec11a9e350e6ccde
Reviewed-on: http://review.whamcloud.com/5369
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-2800 autoconf: remove LC_PROCFS_USERS test 84/7084/7
James Simmons [Mon, 12 Aug 2013 14:15:40 +0000 (10:15 -0400)]
LU-2800 autoconf: remove LC_PROCFS_USERS test

In-procfs locking has been upstream since v2.6.23
We can remove the test and the dead code (lots of it). Further
review should be made to determine whether _lprocfs_lock is
still necessary at all.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ie5db5e5cf2b6699d3e4fd3301fab1d5497a02ea6
Reviewed-on: http://review.whamcloud.com/7084
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2800 autoconf: remove LC_BLKDEV_PUT_2ARGS test 90/5390/9
James Simmons [Tue, 13 Aug 2013 17:14:37 +0000 (13:14 -0400)]
LU-2800 autoconf: remove LC_BLKDEV_PUT_2ARGS test

blkdev_put has taken two arguments since v2.6.28.
We can remove the test and dead code.

Change-Id: Ib0379f87f57ed6148750920d853604c0b2943278
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/5390
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2744 build: fix 'data race condition' issues 67/6567/4
Sebastien Buisson [Thu, 6 Jun 2013 12:34:32 +0000 (14:34 +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: Ia9bad7782b6289e84c11e7998957c732508e10a5
Reviewed-on: http://review.whamcloud.com/6567
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3557 mdt: fix open existing file with O_CREAT for ro mount 93/6893/4
Li Dongyang [Thu, 4 Jul 2013 04:13:49 +0000 (14:13 +1000)]
LU-3557 mdt: fix open existing file with O_CREAT for ro mount

We should only return -EROFS for read only mount if we really
need to create the file in question.

Defer the check to mdt_reint_open() instead of mdt_intent_opc().

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: I68f34ef7abbae934cfc3564a67ff70e5ab8a12b1
Reviewed-on: http://review.whamcloud.com/6893
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3494 libcfs: Add relocation function to libcfs heap 43/6743/4
Li Xi [Sun, 28 Jul 2013 15:48:47 +0000 (08:48 -0700)]
LU-3494 libcfs: Add relocation function to libcfs heap

When changing the values of the node in the heap which might affect
its ranking, we have to remove the node from the heap, change the
values and then insert the node into the heap again. The process of
inserting into the heap might fail because of memory insufficiency.
Sometimes, it is not convienient and efficient for a caller to handle
such kind of failure.

This patch adds a new function to do the job.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I31ce530d750341f6479470ba61457d9ed03afed3
Reviewed-on: http://review.whamcloud.com/6743
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoRevert "LU-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog" 71/7371/2
Oleg Drokin [Sat, 17 Aug 2013 06:11:41 +0000 (06:11 +0000)]
Revert "LU-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog"

Someow this causes compile failures. E.g. see here: http://build.whamcloud.com/job/lustre-master/arch=x86_64,build_type=server,distro=el6,ib_stack=inkernel/1623/changes

This reverts commit fc587387bacf232b0464f0913b967500aae09511

Change-Id: I2fa0eedadc8b5e511b24a9cb0a39cedd8dfc5cf8
Reviewed-on: http://review.whamcloud.com/7371
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2941 llite: Delaying creation of client side proc entries. 52/6852/6
Gaurav Mahajan [Tue, 2 Jul 2013 06:12:05 +0000 (11:42 +0530)]
LU-2941 llite: Delaying creation of client side proc entries.

In client_common_fill_super() proc entries are created before
before cl_sb_init() and therefore lu_site is not allocated resulting
in client crash when tried reading lu_site stats.
Delaying creation of proc entries after creation of all required data
structures fixed the problem.

Signed-off-by: Gaurav Mahajan <gmahajan@ddn.com>
Change-Id: Id9fc9adc3ce043c691e2d26b85c4bd1917444144
Reviewed-on: http://review.whamcloud.com/6852
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-3416 llite: reset writeback index in ll_writepages 54/6554/10
Jinshan Xiong [Sat, 10 Aug 2013 17:48:07 +0000 (10:48 -0700)]
LU-3416 llite: reset writeback index in ll_writepages

Otherwise after one round the writeback index will become beyond
the file size and ->writepages() turns into an empty operation.

Also, a safety guard is added to limit the wait time for grant to
10 minutes(take recovery into consideration) at maximum in the
osc_enter_cache() function. Otherwise, EDQUOT will be returned to
the applications to start sync write.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2b20296e80a6d2a4034be8cf17129bc17780b847
Reviewed-on: http://review.whamcloud.com/6554
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-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog 31/5331/12
James Simmons [Fri, 26 Jul 2013 14:21:20 +0000 (10:21 -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: Mikhail Pershin <mike.pershin@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I711e047dcb61f3ac62b33c5a21ae32fe87d7efd6
Reviewed-on: http://review.whamcloud.com/5331
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3162 lov: Get the correct address of lmm_objects 58/7258/2
Swapnil Pimpale [Wed, 7 Aug 2013 11:21:36 +0000 (16:51 +0530)]
LU-3162 lov: Get the correct address of lmm_objects

The introduction of lmm_layout_gen makes the assumption that
lmm_objects is present after lmm_stripe_count incorrect.
Fixed this to get the correct address of lmm_objects when lmmk is cast
to lov_mds_md_v1.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I6eba151a54862fde60f4382df92864a52bb12530
Reviewed-on: http://review.whamcloud.com/7258
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2762 ldiskfs: use upstream ext4_kvzalloc 81/5281/5
James Simmons [Fri, 14 Jun 2013 14:27:13 +0000 (10:27 -0400)]
LU-2762 ldiskfs: use upstream ext4_kvzalloc

Upstream commits f18a5f21 (v3.1) and 9933fc0a (v3.1) added and used
kvzalloc in the same matter the previous ldiskfs patches did.
We should use that instead of the open-coded versions.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iad7771169d83c8aca3051198b1cfdb18030f0482
Reviewed-on: http://review.whamcloud.com/5281
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
10 years agoLU-3685 hsm: copy start error should set HP_FLAG_COMPLETED 65/7265/4
Aurelien Degremont [Mon, 5 Aug 2013 13:49:16 +0000 (15:49 +0200)]
LU-3685 hsm: copy start error should set HP_FLAG_COMPLETED

If an error occurs when initializing a HSM request, in
ll_ioc_copy_start(), the PROGRESS message, sent to coordinator, should
carry the error code but also HP_FLAG_COMPLETED to mark the request as
finished (with error). If not, the Coordinator will ignore this
message and consider the request is still running.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ie5ddbe8b47331202bd085941c681fcaea57ebf69
Reviewed-on: http://review.whamcloud.com/7265
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3709 lmv: update coding style 52/7252/2
jcl [Tue, 6 Aug 2013 10:59:29 +0000 (12:59 +0200)]
LU-3709 lmv: update coding style

in lmv_obd.c:
- Correct wrong coding styles introduced by HSM (and others)
- Remove useless include

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I2dd369e94dd351396e4a4deb72d1ec6f19b59b40
Reviewed-on: http://review.whamcloud.com/7252
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>
10 years agoLU-3620 mdd: missing CLF_RENAME_LAST flag in CL_RENME record 95/7095/7
Bobi Jam [Tue, 23 Jul 2013 16:47:23 +0000 (00:47 +0800)]
LU-3620 mdd: missing CLF_RENAME_LAST flag in CL_RENME record

mdd_rename() should use target's attribute to determine add
CLF_RENAME_LAST flag in changelog record.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Id9a738f1c98f0c893b125d49965354f44c257e08
Reviewed-on: http://review.whamcloud.com/7095
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3705 target: refill env before tgt handle request 44/7244/4
wang di [Tue, 6 Aug 2013 07:34:08 +0000 (00:34 -0700)]
LU-3705 target: refill env before tgt handle request

Since those env of each threads might start before the
stack is initialized, i.e. the ctxt of some modules might not
be initialized yet. So it needs to refill the env before
handling the request to make sure all of ctxts are initialized.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id60432b3d1aa2f23166f0b8a2f4b208361cec80d
Reviewed-on: http://review.whamcloud.com/7244
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3693 utils: Posix copytool fixes. 37/7237/4
Henri Doreau [Mon, 5 Aug 2013 14:01:16 +0000 (16:01 +0200)]
LU-3693 utils: Posix copytool fixes.

Fixed several defects in the HSM posix copytool.
- Fixed two invalid format strings.
- Made --daemon optional.
- Remove .lov entries from the archive when removing the corresponding
  files.
- When restoring a file for which no LOV EA has been saved we must not
  create the volatile with O_LOV_DELAY_CREATE. Additionally, the
  caller should be able to specify the MDT index where to create the
  volatile file. Added parameters to llapi_hsm_action_begin()
  accordingly.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I7e855b42ef459e453a16c94bfe33e9db885fe2d5
Reviewed-on: http://review.whamcloud.com/7237
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>
10 years agoLU-3707 target: fix trans call back for out 56/7256/3
wang di [Tue, 6 Aug 2013 19:34:15 +0000 (12:34 -0700)]
LU-3707 target: fix trans call back for out

Since OUT and MDT share the same trans callback
route path, move mti_has_trans from mdt_thread_info to
tgt_session_info, so avoid confusing out transaction.

Test-Parameters: mdtcount=2 mdscount=2
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I8eee17645487a3a3eced6862743bc35b83fc2c24
Reviewed-on: http://review.whamcloud.com/7256
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@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-3709 mdt: CDT cleanup follow-on patch 54/7254/4
jcl [Tue, 6 Aug 2013 21:05:11 +0000 (23:05 +0200)]
LU-3709 mdt: CDT cleanup follow-on patch

This patch implements the comments made during the review after
maloo passed test or after the landing.

rename in hai_zero() hai_first()
 Use a better name for hai helper

replace use of cfs_helpers by native one in CDT
 replace cfs_atomic_t and helpers
 replace cfs_list and helpers
 change list_for_each + list_entry by list_entry_for_each
 replace cfs_task_t

clean err msg in HSM agent interface
 remove duplicate rc print

parenthesis code cleaning
 remove useless () in conditionnal tests

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ib57f5b4ed7023c18d71bdb620ed53f9b9fa41a3e
Reviewed-on: http://review.whamcloud.com/7254
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3647 hsm: small fixes for HSM 43/7243/4
Jinshan Xiong [Mon, 5 Aug 2013 22:08:43 +0000 (15:08 -0700)]
LU-3647 hsm: small fixes for HSM

This patch includes the following fixes for HSM:
1. Redefine D_HSM. It was defined to D_TRACE;
2. Fix lu_ref for lease handle
3. User input verification to make sure the hur size is less than
MDS_MAXREQSIZE;

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I6ae9af71b08cf38174b6b470ef1602966aab1805
Reviewed-on: http://review.whamcloud.com/7243
Reviewed-by: John L. Hammond <john.hammond@intel.com>
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-3554 test: Don't run Sanity 233 on less than 2.4 servers 24/7324/2
Keith Mannthey [Wed, 14 Aug 2013 03:36:52 +0000 (20:36 -0700)]
LU-3554 test:  Don't run Sanity 233 on less than 2.4 servers

2.4 clients 2.3 server interop testing showed that sanity.sh
test 233 needs to be skipped for older servers.

Add a check for MDS server code that it is greater than 2.3.64

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I3f96b8017c40a95d246061a8a52db8822c172eca
Reviewed-on: http://review.whamcloud.com/7324
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-2230 tests: disable replay-dual test 21b with ZFS 87/7287/3
Jian Yu [Sun, 11 Aug 2013 11:42:33 +0000 (19:42 +0800)]
LU-2230 tests: disable replay-dual test 21b with ZFS

This patch disables replay-dual test 21b with ZFS because
semantics of replay_barrier_nosync is different on ZFS:
spa_freeze() syncs all changes. IOW, "nosync" (which is
crucial here) doesn't work.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=replay-dual

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I271839fa626bfb140bd077d895826c6b4539892f
Reviewed-on: http://review.whamcloud.com/7287
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3180 tests: misc fix in lfsck.sh 23/6123/5
Niu Yawei [Tue, 13 Aug 2013 04:34:55 +0000 (00:34 -0400)]
LU-3180 tests: misc fix in lfsck.sh

- Make sure data flush back before run lfsck;
- Go back to old lfsck behaviour: supress the error of the second run
  of lfsck;
- Fix typo in is_empty_fs();

Test-Parameters: envdefinitions=SLOW=yes testlist=lfsck
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I6216b5325ff7d9dc420d57a11f6d09f345bff96c
Reviewed-on: http://review.whamcloud.com/6123
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3326 tests: limit the disk space used by run_*.sh 76/6376/5
Hongchao Zhang [Tue, 13 Aug 2013 13:40:21 +0000 (21:40 +0800)]
LU-3326 tests: limit the disk space used by run_*.sh

In run_dd.sh and run_tar.sh, limit the disk space to be used
according to the total free disk space and the client counts.

Test-Parameters: envdefinitions=ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 \
clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=recovery-mds-scale

Change-Id: I61ea1167906312fdb182b67d7169e95cad1b6d72
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/6376
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3744 llite: use 64bits flags in ll_lov_setea() 12/7312/2
Niu Yawei [Tue, 13 Aug 2013 02:59:13 +0000 (22:59 -0400)]
LU-3744 llite: use 64bits flags in ll_lov_setea()

In ll_lov_setea(), setting MDS_OPEN_HAS_OBJS to an int flags will
result in the flags being overflowed.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I7c623785579d782dd7ce03e0ca291d32ad3952f9
Reviewed-on: http://review.whamcloud.com/7312
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3683 libcfs: improve validity test for valid file descriptors 75/7275/4
Bob Glossman [Thu, 8 Aug 2013 17:59:59 +0000 (10:59 -0700)]
LU-3683 libcfs: improve validity test for valid file descriptors

File descriptor members of struct lustre_kernelcomm aren't set to
anything special at start time.
This leads to incorrect tests and skipping valid fd closes at stop time.
Fixed by defining, setting, and testing against a specific LK_NOFD value.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I9306ce380c5e049ef442b99ac20e51271deafbc5
Reviewed-on: http://review.whamcloud.com/7275
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3648 test: large_xattr_enable doesn't detect large xattrs 33/7133/5
James Nunez [Fri, 26 Jul 2013 17:43:42 +0000 (11:43 -0600)]
LU-3648 test: large_xattr_enable doesn't detect large xattrs

The large_xattr_enable function looks for "large_xattr" from
the output of dumpe2fs to determine if large xattrs is
enabled. When large extended attributes are enabled, the file
system flag "ea_inode" is set and not "large_xattr".

Since "large_xattr" may be used in the future for this
attribute, the fix is to grep for both "ea_inode" and
"large_xattr".

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iebe744e7fc70c878f1897b853e37f85cd6e59031
Reviewed-on: http://review.whamcloud.com/7133
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@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-3556 osd-ldiskfs: remove dependency on mdd module 45/6945/12
Andreas Dilger [Thu, 11 Jul 2013 21:34:12 +0000 (15:34 -0600)]
LU-3556 osd-ldiskfs: remove dependency on mdd module

Move the lu_capainfo_get() function (formerly named md_capainfo())
into obdclass/capa.c instead of mdd_device.c.  Otherwise, the
osd-ldiskfs.ko module depends on mdd.ko in order to load, and that
doesn't really make sense.

Move the lu_capainfo structure (formerly named md_capainfo) into
lustre_capa.h, and change the structure field prefix to match the
new name.  Fix up the users of this structure/function, and do some
code style cleanup in those functions at the same time.

Move the mdt_set_capainfo() and mdt_dump_capainfo() structures from
being static inline in mdt_internal.h into mdt_lib.c, since they are
too big to be static inline functions.  mdt_dump_capainfo() isn't
used anywhere, so it is put under #ifdef DEBUG_CAPA.  They should
really be named mdt_capainfo_{set,dump}(), but that was too big a
change for this patch.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I80ae12d3e14c7a935219a83ce8e79ebb98f12979
Reviewed-on: http://review.whamcloud.com/6945
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3445 utils: make add_param() handle comma-separated values 86/6686/9
Jian Yu [Wed, 7 Aug 2013 09:44:43 +0000 (17:44 +0800)]
LU-3445 utils: make add_param() handle comma-separated values

Current mkfs.lustre supports comma-separated values in "--mgsnode",
"--failnode", etc. options. However, in mount.lustre, the values
are directly passed to mount() as options without prefixing with
Lustre parameter key for each one. This will make the values can
not be recognized by the backend filesystem and cause mount.lustre
fail with -EINVAL error.

This patch improves add_param() to extract values from the comma-
separated string and prefix Lustre parameter key to each value.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I64c5cb6f61277a93f65f69f63050721e0070c450
Reviewed-on: http://review.whamcloud.com/6686
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-3637 lnet: build Lustre with Intel OFED for Xeon Phi 15/7115/3
Dmitry Eremin [Thu, 25 Jul 2013 12:53:17 +0000 (16:53 +0400)]
LU-3637 lnet: build Lustre with Intel OFED for Xeon Phi

The compilation of Lustre with Intel OFED for Xeon Phi failed
because of missing include of pci-dma.h header file. In Linux
kernel includes this file included automatically from pci.h
but in Intel Xeon Phi headers it's not true. So, just add this
include explicitly.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I086fa38f1aca4dd6e14b093f6f02ab4e3bcd347c
Reviewed-on: http://review.whamcloud.com/7115
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2424 ptlrpc: add rpc_cache 74/6874/6
Andriy Skulysh [Tue, 2 Jul 2013 08:08:36 +0000 (11:08 +0300)]
LU-2424 ptlrpc: add rpc_cache

Add rpc_cache for allocating ptlrpc_requests.

Xyratex-bug-id: MRP-689
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9e442f8309d19b3320727c3fbfcd7de371032369
Reviewed-on: http://review.whamcloud.com/6874
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3561 tests: HSM sanity test suite 13/6913/13
jcl [Thu, 8 Aug 2013 08:44:27 +0000 (16:44 +0800)]
LU-3561 tests: HSM sanity test suite

Add sanity-hsm.sh. It is a suite of tests used to validate
HSM features.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I0b88d68806158741e35ac16b124e7aff54581b40
Reviewed-on: http://review.whamcloud.com/6913
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1346 libcfs: cleanup macros in kp30.h 76/4776/5
James Simmons [Mon, 15 Jul 2013 21:39:09 +0000 (17:39 -0400)]
LU-1346 libcfs: cleanup macros in kp30.h

Some macro cleanup in kp30.h

Some other changes:
. removes some unused/reduplicate macros such as
our_recalc_sigpending, prepare_work, cfs_get_work_data, strtok,
work_struct_t, SEM_COUNT, PORTAL_SYMBOL_REGISTER/UNREGISTER,
cfs_num_present_cpus, cfs_num_present_cpus
. moves some different kernel version compatible macros/inlines to
  portals_compat25.h
. needs not differentiate CONFIG_SMP for LASSERT_SPIN_LOCKED
. get/put_cpu is avaiable for both SMP and !SMP

This patch does not change LWT(Light-weight trace) related code.

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: Iaa3cda88d539f3d7e677b7accda99b476daeddca
Reviewed-on: http://review.whamcloud.com/4776
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoNew tag 2.4.90 2.4.90 v2_4_90 v2_4_90_0
Oleg Drokin [Sat, 10 Aug 2013 04:46:05 +0000 (00:46 -0400)]
New tag 2.4.90

Change-Id: Iccc12581222bf19c71464c1df06e3f5fe21ee596

10 years agoLU-3069 build: fix 'integer handling' issues 88/5888/15
Sebastien Buisson [Fri, 29 Mar 2013 15:21:15 +0000 (16:21 +0100)]
LU-3069 build: fix 'integer handling' issues

Fix 'program hangs' defects found by Coverity version 6.5.1:
Improper use of negative value (NEGATIVE_RETURNS)
Variable is passed to a parameter that cannot be negative.
Macro compares unsigned to 0 (NO_EFFECT)
This comparison is always true.
Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
Test is always false regardless of the values of its operands.
Wrong operator used (CONSTANT_EXPRESSION_RESULT)
Test is always true regardless of the values of its operand.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I687a05aaffad13caaebe16edbc4f93ef7ca3413f
Reviewed-on: http://review.whamcloud.com/5888
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-3097 build: fix 'deadcode' errors 67/7167/2
Sebastien Buisson [Mon, 29 Jul 2013 15:25:47 +0000 (17:25 +0200)]
LU-3097 build: fix 'deadcode' errors

Fix 'deadcode' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I720a5ae6f963cd2cc77208a854ca4587758a82d5
Reviewed-on: http://review.whamcloud.com/7167
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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-3097 build: fix 'stray semicolon' errors 65/7165/2
Sebastien Buisson [Mon, 29 Jul 2013 15:21:57 +0000 (17:21 +0200)]
LU-3097 build: fix 'stray semicolon' errors

Fix 'stray semicolon' issues found by Coverity version 6.5.1:
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ieff4b45204f8be9ad4590cc9de9d06960c07d052
Reviewed-on: http://review.whamcloud.com/7165
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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-3433 clio: wrong cl_lock usage 09/6709/3
Vitaly Fertman [Thu, 6 Jun 2013 19:40:32 +0000 (23:40 +0400)]
LU-3433 clio: wrong cl_lock usage

granted lock is moved to HELD state in cl_wait_try() only which is
done after upcall for non-agl locks. as the result, lock unuse moves
cl_lock not to CACHED state, but to NEW state. A parallel thread
gets this lock and tries to enqueue it - instead of re-using a
cached lock, cl_enqueue_try() initiates a new enqueue and gets to
osc_lock_enqueue() where it asserts:

LASSERTF(ols->ols_state == OLS_NEW, ...);

the state of osc lock is RELEASED already - moved here by unuse.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I611a6e8778871da184db13434d223036625443c8
Reviewed-on: http://review.whamcloud.com/6709
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2940 llite: Fix for oops in vvp_pgcache_show() 92/7192/2
Swapnil Pimpale [Wed, 31 Jul 2013 12:07:25 +0000 (17:37 +0530)]
LU-2940 llite: Fix for oops in vvp_pgcache_show()

Hold the lock protecting page tree (coh_page_guard) till the point the page is
being accessed.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I9d1d5129d9cac8f1fa5eec77f554320c0c255fc2
Reviewed-on: http://review.whamcloud.com/7192
Tested-by: Hudson
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: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3656 tests: use full path to directio 73/7173/2
Elena Gryaznova [Tue, 30 Jul 2013 06:21:50 +0000 (10:21 +0400)]
LU-3656 tests: use full path to directio

The sanity-benchmark iozone directio test is skipped if started not
from lustre/tests directory because of related path used.
Patch fixes this test to use DIRECTIO instead of ./directio

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-1170
Change-Id: I4dec24b38300df8a14fb8f74f84b4f91c0cde910
Reviewed-on: http://review.whamcloud.com/7173
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-3669 mdt: getxattr intent should check object existence 91/7191/3
Andrew Perepechko [Wed, 31 Jul 2013 11:53:36 +0000 (15:53 +0400)]
LU-3669 mdt: getxattr intent should check object existence

Make getxattr intent use HABEO_CORPUS similar to
REINT_GETXATTR to avoid crashes on race conditions.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: Ic277525152847118fbe95fcc73448945acba699d
Reviewed-on: http://review.whamcloud.com/7191
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>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
10 years agoLU-3565 mdt: a new param to allocate sequences 27/7027/11
Jinshan Xiong [Mon, 5 Aug 2013 17:23:03 +0000 (10:23 -0700)]
LU-3565 mdt: a new param to allocate sequences

sequence controller (aka master sequence server) exports
FLDB in proc/fs/lustre/seq/ctl-*/fldb. the same entry
can be used to modify FLDB using available sequences:
lctl set_param
  seq.ctl*.fldb="[0x0000000280000400-0x0000000280000600):0:mdt"

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2640811c23cacb00e423fcd408318cac2ac89c6f
Reviewed-on: http://review.whamcloud.com/7027
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3677 mdt: Set HSM dirty open-for-write file when evicted. 95/7195/2
Aurelien Degremont [Wed, 12 Jun 2013 10:22:03 +0000 (12:22 +0200)]
LU-3677 mdt: Set HSM dirty open-for-write file when evicted.

Fix regression introduced by LU-1303 (5165cdd). Previously,
MDS_CLOSE_CLEANUP was used to detect file closing, due to eviction.
This flag is no more since 5165cdd.

It completely removed this symbol.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I20e18103fe085672f499c956e831564e45bd5200
Reviewed-on: http://review.whamcloud.com/7195
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3661 dt: Fix assertion of method in dt_capa_get() 71/7171/2
Li Xi [Wed, 31 Jul 2013 23:28:45 +0000 (16:28 -0700)]
LU-3661 dt: Fix assertion of method in dt_capa_get()

dt_capa_get() should assert that do_capa_get method is defined
rather than do_ref_del.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Ibeb3f3dcd0bd9d8783e87be8c6d82c4e3e5bd460
Reviewed-on: http://review.whamcloud.com/7171
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3691 llapi: do not use GOTO 31/7231/2
Alex Zhuravlev [Mon, 5 Aug 2013 04:20:32 +0000 (08:20 +0400)]
LU-3691 llapi: do not use GOTO

as it's not defined in lustre_idl.h anymore.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If4bceb33ab2db5aa8c507e1c5f2857896ac39852
Reviewed-on: http://review.whamcloud.com/7231
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3343 mdt: HSM coordinator main thread 12/6912/14
jcl [Sat, 6 Jul 2013 12:57:08 +0000 (14:57 +0200)]
LU-3343 mdt: HSM coordinator main thread

This patch implements the HSM coordinator. It is a MDT
thread in charge of schedulling HSM requests to
agents.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I18fb2fad94b3972b9a09fd093e259f4ad50d810f
Reviewed-on: http://review.whamcloud.com/6912
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3633 test: Sanity test 101d fails due to full OST 79/7179/3
James Nunez [Tue, 30 Jul 2013 17:20:49 +0000 (11:20 -0600)]
LU-3633 test: Sanity test 101d fails due to full OST

Sanity test 101d checks the available space on the file
system against the size of the file before writing, but
the file stripe is never checked or set. So, test 101d
has failed with enough space on the file system to write
the file, but the default stripe was 1 and there was not
enough space on that single OST for the file.

This patch sets the stripe of the file to -1 (all OSTs)
before writing to the file system.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I69b8f24bc6e6fe05c7179160bf89610516b9c5cb
Reviewed-on: http://review.whamcloud.com/7179
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2902 test: ost stat parameters were not present 64/6564/10
Keith Mannthey [Fri, 12 Jul 2013 05:33:04 +0000 (22:33 -0700)]
LU-2902 test: ost stat parameters were not present

A few tests use roc_hit to sort out cache hits. These tests
were failing for a while because the lproc stats needed were not
present.

Use roc_hit_init with setstripe to correctly identify that basic
cache_access stats are working for each individual ost before
using roc_hit.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Iea501433ddcdb367fe5d9614361b4aff049cb1f1
Reviewed-on: http://review.whamcloud.com/6564
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>