Whamcloud - gitweb
fs/lustre-release.git
10 years agoLU-2842 mdt: Do not lbug on invalid fid entry in name
Oleg Drokin [Wed, 11 Sep 2013 18:26:43 +0000 (14:26 -0400)]
LU-2842 mdt: Do not lbug on invalid fid entry in name

Instead of crashing MDS when the name exists but has invalid fid,
we should just return error and let lfsck deal with it later.

Change-Id: Iea19dac75e9dc75c43a18efa757fc1c5e4d1743e
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7617
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
10 years agoLU-3161 lod: Added proper error handling instead of LASSERT
Gaurav Mahajan [Fri, 26 Jul 2013 08:33:06 +0000 (14:03 +0530)]
LU-3161 lod: Added proper error handling instead of LASSERT

LASSERT are replaced with proper error handling in
lod_initialize_objects.

Signed-off-by: Gaurav Mahajan <gmahajan@ddn.com>
Change-Id: Ia8fbbb4956765835bf46b46b3a7addc99cb191fa
Reviewed-on: http://review.whamcloud.com/7234
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-3903 osd-zfs: Remove dead property handling code
Brian Behlendorf [Wed, 25 Sep 2013 16:12:53 +0000 (09:12 -0700)]
LU-3903 osd-zfs: Remove dead property handling code

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

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

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

Change-Id: I15b1ef8825dcdbed1572990d230776485d627457
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7685
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
10 years agoLU-3027 lov: to not modify lov lock when sublock is canceled
Jinshan Xiong [Thu, 3 Oct 2013 01:14:16 +0000 (18:14 -0700)]
LU-3027 lov: to not modify lov lock when sublock is canceled

Otherwise it will cause wrong lock to be enqueued.

lls_ever_canceled is introduced to solve potential performance
problem by this patch.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I1ea62902c9d1a468f5952f30a8dc5dec22b8bb1c
Reviewed-on: http://review.whamcloud.com/7841
Reviewed-by: Bobi Jam <bobijam@gmail.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-3027 clio: Do not shrink sublock at cancel
Oleg Drokin [Thu, 29 Aug 2013 09:10:06 +0000 (17:10 +0800)]
LU-3027 clio: Do not shrink sublock at cancel

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

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes  clientdistro=el6 serverdistro=el6 clientarch=x86_64  serverarch=x86_64 mdtcount=1  testlist=parallel-scale,parallel-scale-nfsv3,parallel-scale-nfsv4
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I599da98ce364ccf459b5b5f3b72550115972c456
Reviewed-on: http://review.whamcloud.com/7569
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3892 ofd: setattr doesn't need to return attributes
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-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly
Bob Glossman [Thu, 26 Sep 2013 20:36:28 +0000 (13:36 -0700)]
LU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly

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

ported to SLES11 SP[23]

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

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1803c201743fccf9c177a7098959083f7baf95a0
Reviewed-on: http://review.whamcloud.com/7781
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly
Bobi Jam [Tue, 10 Sep 2013 07:13:18 +0000 (15:13 +0800)]
LU-3719 ldiskfs: adjust s_mb_prealloc_table_size correctly

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

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I17c0d440e4c89cae1780de63ca2b3a0d69de298b
Reviewed-on: http://review.whamcloud.com/7591
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
10 years agoLU-2779 osc: osc_extent_wait() shouldn't be interruptible
Jinshan Xiong [Wed, 13 Feb 2013 19:40:19 +0000 (11:40 -0800)]
LU-2779 osc: osc_extent_wait() shouldn't be interruptible

Otherwise it will hit the assertion at cl_lock.c:

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

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

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I296ab35d26b861f3c57ddba9f74564aa439aaa0b
Reviewed-on: http://review.whamcloud.com/5419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3416 llite: reset writeback index in ll_writepages 57/7657/2
Jinshan Xiong [Sat, 14 Sep 2013 17:15:40 +0000 (10:15 -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: I7d0b90ef0c15f069ec63435703622a327b75ad70
Reviewed-on: http://review.whamcloud.com/7657
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2745 lnet: fix failure handle of create reply 59/7659/2
Liang Zhen [Wed, 27 Feb 2013 07:54:52 +0000 (15:54 +0800)]
LU-2745 lnet: fix failure handle of create reply

error handler of lnet_create_reply_msg() didn't release lnet_res_lock
if lnet_msg_alloc() failed.
It can be fixed by moving validation check of msg out from lock.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I5a25b7e07d24f5c4f165a3266cca6e79dffc1461
Reviewed-on: http://review.whamcloud.com/7659
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4023 build: wrong type used 49/7849/3
Dmitry Eremin [Sun, 29 Sep 2013 09:58:42 +0000 (13:58 +0400)]
LU-4023 build: wrong type used

Fixed implicit conversion from 'unsigned long long' to 'int'.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I331a8ebe1fb9ef53ebd4fc92603b4100f006ee2b
Reviewed-on: http://review.whamcloud.com/7849
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
10 years agoLU-3934 scrub: detect upgraded from 1.8 correctly 25/7625/2
Fan Yong [Sun, 18 Aug 2013 22:00:46 +0000 (06:00 +0800)]
LU-3934 scrub: detect upgraded from 1.8 correctly

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

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

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

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5e57aae972e4fe93d3cb9e7cc7ca2e5b95dce4b2
Reviewed-on: http://review.whamcloud.com/7625
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3894 mdt: return EXDEV for cross-MDT rename
wang di [Fri, 6 Sep 2013 07:02:34 +0000 (00:02 -0700)]
LU-3894 mdt: return EXDEV for cross-MDT rename

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

Add test in test_24x to verify it.

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

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0d4d8d96249ec23fcea5ab6ac5fce196728e8e73
Reviewed-on: http://review.whamcloud.com/7579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3978 nrs: ORR/TRR is using CRR-N fields
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-3676 llite: error setting max_cache_mb at mount time
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-3273 mdt: Hold med_open_lock before walking med_open_head
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 agoNew tag 2.4.1-RC2 2.4.1 2.4.1-RC2 v2_4_1 v2_4_1_0 v2_4_1_0_RC2 v2_4_1_RC2
Oleg Drokin [Thu, 5 Sep 2013 22:08:47 +0000 (18:08 -0400)]
New tag 2.4.1-RC2

Change-Id: I8246d87f0a85b84f45d537cb4feb17b122829ef8

10 years agoRevert "LU-3027 clio: Do not shrink sublock at cancel"
Oleg Drokin [Thu, 5 Sep 2013 22:04:41 +0000 (18:04 -0400)]
Revert "LU-3027 clio: Do not shrink sublock at cancel"

This uenxpectedly let do LU-7834 whic appears to be old problem,
but happens more frequently with lu-3027 patch in place.
Reverting till the better solutoin is found as the side-effect is worse
than the original problem.

This reverts commit 3781d4465c9fa72120f35084d4eb5edb55a0b66a.

10 years agoLU-3305 quota: avoid unnecessary dqget/dqput calls
Niu Yawei [Fri, 24 May 2013 03:49:03 +0000 (23:49 -0400)]
LU-3305 quota: avoid unnecessary dqget/dqput calls

Because of the global lock contention inside the dqget()/dqput(),
we'd try to avoid dqget()/dqput() calls in dquot_initialize().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I4335d880f3b912f3de70816a9bd87841605f8907
Reviewed-on: http://review.whamcloud.com/6440
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3781 mdt: Atomically update MDT exp_connect_data
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 agoTew tag 2.4.1-RC1 2.4.1-RC1 v2_4_1_0_RC1 v2_4_1_RC1
Oleg Drokin [Sun, 1 Sep 2013 16:40:29 +0000 (12:40 -0400)]
Tew tag 2.4.1-RC1

Change-Id: I538ebce8c2d7ddf50279cc5a5c90abda9e47362c

10 years agoLU-3847 kernel: Kernel update [RHEL6.4 2.6.32-358.18.1.el6] 16/7516/3
Bob Glossman [Sat, 31 Aug 2013 02:23:52 +0000 (10:23 +0800)]
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: I752d3330d4a974bcf2b91392eca449d973cee6c1
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/7516
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 agoRevert "LU-3544 nfs: writing to new files will return ENOENT"
Oleg Drokin [Sat, 31 Aug 2013 18:42:51 +0000 (14:42 -0400)]
Revert "LU-3544 nfs: writing to new files will return ENOENT"

This commit created a problem lu3765 - crash of 2.1 servers when
exposed to clients with this patch and we don't have a robust
solution in sight for it, so reverting

This reverts commit 77a3c625c733edfaa748d2c7130d5635ee63ce15.

10 years agoLU-3027 clio: Do not shrink sublock at cancel
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-3063 osc: Check return code for lu_kmem_init 88/7388/2
Keith Mannthey [Sat, 1 Jun 2013 03:06:30 +0000 (20:06 -0700)]
LU-3063 osc: Check return code for lu_kmem_init

lu_kmem_init can fail and returns has a return code.
Check for this return code in lu_kmem_init.

This issue was found during 2gb VM Racer testing

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I4ca9d5bae212591d5109b2053940161f9e28baeb
Reviewed-on: http://review.whamcloud.com/6514
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7388

10 years agoLU-2904 llite: return compatible fsid for statfs 35/7435/2
Fan Yong [Mon, 15 Jul 2013 17:02:04 +0000 (01:02 +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: Id30ff2b2aa5c67c52b09765f50b2afa70cb6d1e3
Reviewed-on: http://review.whamcloud.com/7435
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3649 lfsck: release object reference when reset lfsck 32/7432/2
Fan Yong [Mon, 15 Jul 2013 14:54:24 +0000 (22:54 +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: I657e539183675e00fe43bbbdfde987c3e48dd13b
Reviewed-on: http://review.whamcloud.com/7432
Tested-by: Hudson
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-2547 tests: EXCLUDE recovery-small/24b for ZFS 24/7424/2
Nathaniel Clark [Thu, 6 Jun 2013 20:41:16 +0000 (16:41 -0400)]
LU-2547 tests: EXCLUDE recovery-small/24b for ZFS

Exclude test because it fails in the same way as 24a and in theory
should be fixed simultaniously.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iea5aaddf41b5765efce22cc7e32234cb1a8e49ae
Reviewed-on: http://review.whamcloud.com/6587
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-on: http://review.whamcloud.com/7424

10 years agoLU-3620 mdd: missing CLF_RENAME_LAST flag in CL_RENME record 84/7384/5
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>
Reviewed-on: http://review.whamcloud.com/7384
Reviewed-by: Jian Yu <jian.yu@intel.com>
10 years agoLU-3180 tests: misc fix in lfsck.sh 87/7387/2
Niu Yawei [Tue, 13 Nov 2012 12:17:45 +0000 (20:17 +0800)]
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: Ib2c3ab35424e13b1679f8a096f5e24042c7be3a2
Reviewed-on: http://review.whamcloud.com/7387
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-3712 lmv: choose right MDT for open by FID
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 agoRevert "LU-2665 mdc: Keep resend FLocks"
Oleg Drokin [Tue, 20 Aug 2013 04:54:35 +0000 (00:54 -0400)]
Revert "LU-2665 mdc: Keep resend FLocks"

This causes LU-3701

This reverts commit 5e9646ded8a35f1f0b7f3f1eadbd8ab4d927c4a5.

10 years agoLU-2901 ldlm: fix resource/fid check, use DLDLMRES 16/7316/2
Andreas Dilger [Fri, 7 Jun 2013 22:31:51 +0000 (16:31 -0600)]
LU-2901 ldlm: fix resource/fid check, use DLDLMRES

In ll_md_blocking_ast() the FID/resource comparison is incorrectly
checking for fid_ver() stored in res_id.name[2] instead of name[1]
changed since http://review.whamcloud.com/2271 (commit 4f91d5161d00)
landed.  This does not impact current clients, since name[2] and
fid_ver() are always zero, but it could cause problems in the future.

In ldlm_cli_enqueue_fini() use ldlm_res_eq() instead of comparing
each of the resource fields separately.

Use DLDLMRES/PLDLMRES when printing resource names everywhere.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I7b45d382d2ee87c1df813ebdd9c7f21029500c1e
Reviewed-on: http://review.whamcloud.com/6592
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-on: http://review.whamcloud.com/7316
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2901 mdt: duplicate link names in directory 15/7315/2
Andreas Dilger [Fri, 7 Jun 2013 21:56:29 +0000 (15:56 -0600)]
LU-2901 mdt: duplicate link names in directory

When creating a hard link to a file, the MDT/MDD/OSD code does
not verify whether the target link name already exists in the
directory.  The ZFS ZAP code checks for duplicate entries. The
add_dirent_to_buf() function in ldiskfs only checks entries for
duplicates while it is traversing the leaf block looking for free
space.  Even if it scanned the whole leaf block, this would not
work for non-htree directories since there is no guarantee that
the name is being inserted into the same leaf block.

To fix this, link should check target object doesn't exist as
other creat operations.

Add sanity.sh test_31o with multiple threads racing to link a new
name into the directory, while ensuring that there is a free entry
in the leaf block that is large enough to hold the duplicate name.
This needs to be racy, because otherwise the client VFS will see
the existing name and not send the RPC to the MDS, hiding the bug.

Add DLDLMRES/PLDLMRES macros for printing the whole lock resource
name (including the name hash) in LDLM_DEBUG() messages in a format
similar to DFID/PFID so they can be found in debug logs more easily.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Iaec6098332fe6b0f6a534f8dbecfb14f6f500c1e
Reviewed-on: http://review.whamcloud.com/6591
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-on: http://review.whamcloud.com/7315
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3445 utils: make add_param() handle comma-separated values 44/7344/2
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>
Reviewed-on: http://review.whamcloud.com/7344

10 years agoLU-3554 test: Don't run Sanity 233 on less than 2.4 servers
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
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-3326 tests: limit the disk space used by run_*.sh
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-3101 mgs: deregister the mount for failed case
Hongchao Zhang [Sun, 28 Apr 2013 10:12:58 +0000 (18:12 +0800)]
LU-3101 mgs: deregister the mount for failed case

in server_start_mgs, the mount of MGS should be put if MGS
failed to start up.

Change-Id: I03c7c3c8e0c578391b637fe0bcdf48da5e318db8
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/6035
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3744 llite: use 64bits flags in ll_lov_setea()
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-3264 tests: support failover testing with ZFS
Nathaniel Clark [Wed, 10 Jul 2013 15:42:42 +0000 (11:42 -0400)]
LU-3264 tests: support failover testing with ZFS

This patch improves test-framework.sh to support failover testing with
ZFS under shared storage configuration.

After formatting a ZFS target, "cachefile=none" property will be set
on the ZFS storage pool so that the pool is not automatically imported
on system startup. And then the pool will be exported so as to leave
the import and export operations handled by mount_facet() and stop().

For SOFT failure mode (unmount and mount), "zpool export â€¦" will be
run on the active server node to export the ZFS storage pool, and
"zpool import -f â€¦" will be run on the failover partner node to import
the pool.

For HARD failure mode (power off and on), since the "cachefile=none"
property has been set on the ZFS storage pool on the active server
node, after the node is power-cycled, the pool will not be imported.
Then on the failover partner node, "zpool import -f â€¦" can be run to
import the pool.

This is a reworked patch with fixes merged in.

Formerly Change-Id: I6b9646cb36f7fa4924af03a055ccb137187843a5
Formerly Reviewed-on: http://review.whamcloud.com/6258
Formerly Change-Id: I63ac141fdefcace99a1cf7c366e15f0067fa2a56
Formerly Reviewed-on: http://review.whamcloud.com/6358
Formerly Change-Id: I83678fd8b67de87f5174017634f108e6ae5b30e0
Formerly Reviewed-on: http://review.whamcloud.com/6408

Test-Parameters: envdefinitions=PTLDEBUG=-1,DEBUG_SIZE=128 mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs clientdistro=el6 serverdistro=el6 clientarch=x86_64 serverarch=x86_64 clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true useiscsi=true testlist=recovery-double-scale
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I6d2fffede5de7a7d4a6bde3d62dd7c6cb60f63fa
Reviewed-on: http://review.whamcloud.com/6429
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-2200 obdclass: be more careful processing server name
Nathaniel Clark [Sat, 27 Apr 2013 03:54:04 +0000 (23:54 -0400)]
LU-2200 obdclass: be more careful processing server name

Because whole options line gets passed to exclude processing, don't
search from end of passed in argument to determine fsname at
beginning.

Re-enable conf-sanity/32 but do replace_nids on IB.

Test-Parameters: nettypes=o2ib testlist=conf-sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ibc43417cb71581198e3516c1e431c0d3f668f1e0
Reviewed-on: http://review.whamcloud.com/6197
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3553 tests: volatile file test fails interop testing
Bob Glossman [Wed, 3 Jul 2013 20:22:59 +0000 (13:22 -0700)]
LU-3553 tests: volatile file test fails interop testing

There is no volatile file support in servers before v2.3.60.
Add a version check and skip sanity test 185 entirely on old servers
to allow interop testing of 2.4+ clients on 2.3 servers.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: If6aef3a782307b5fe659ffcb8a8f8182f83354bd
Reviewed-on: http://review.whamcloud.com/6887
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3547 tests: skip unsupported subtest on old servers
Bob Glossman [Wed, 3 Jul 2013 15:42:13 +0000 (08:42 -0700)]
LU-3547 tests: skip unsupported subtest on old servers

chmod of .lustre/fid is unsupported on servers older than v2.4.
Add a version check to skip the unsupported op in sanity test 154a
on old servers for interop testing of 2.4+ clients on 2.3 servers.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I353c93e8d1501944cad8f638de69a0432539249f
Reviewed-on: http://review.whamcloud.com/6879
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-3449 tests: Trash track_declares_assert related errors
Bruno Faccini [Tue, 18 Jun 2013 15:37:31 +0000 (17:37 +0200)]
LU-3449 tests: Trash track_declares_assert related errors

Do not care about track_declares_assert related errors (ie,
zfs, interop, ...).

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ie608ab0bd7fe3d02717931de1ba241638f5a124a
Reviewed-on: http://review.whamcloud.com/6639
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3352 test: use correct nettype in conf-sanity.sh test_73
Emoly Liu [Wed, 24 Apr 2013 23:23:17 +0000 (07:23 +0800)]
LU-3352 test: use correct nettype in conf-sanity.sh test_73

Use $NETTYPE instead of tcp to set failnode NID in conf-sanity.sh
test_73.

Test-Parameters: nettypes=o2ib testlist=conf-sanity
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ibcc1e60c2369aafada28e7d7462cb7dbb1ce5043
Reviewed-on: http://review.whamcloud.com/6550
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2407 tests: remove the leading space in the fake nid
Jian Yu [Wed, 26 Jun 2013 09:22:56 +0000 (17:22 +0800)]
LU-2407 tests: remove the leading space in the fake nid

This patch fixes conf-sanity test_35a() and test_35b() to remove
the leading space ahead of the fake failover nid.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_3 serverbuildno=41 \
testlist=conf-sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I2dd5b0274abc2aea7a5e7ee3599fbef7bcb16037
Reviewed-on: http://review.whamcloud.com/6779
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
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-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5 16/7216/3
Shuichi Ihara [Fri, 2 Aug 2013 16:22:49 +0000 (01:22 +0900)]
LU-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5

OFED-3.5.1 supports RHEL6.4 kernel. CONFIG_COMPAT_RHEL_6_4 macro
needs to build lustre with them.

backport from http://review.whamcloud.com/6448

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Ib082bdf08d9a4b609178ff572cae677699d988fe
Reviewed-on: http://review.whamcloud.com/7216
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2904 llite: return valid fsid for statfs
Fan Yong [Sun, 19 May 2013 17:00:21 +0000 (01:00 +0800)]
LU-2904 llite: return valid 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.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie292b26726a1b2aa7a763ef7c0507e3ed089323b
Reviewed-on: http://review.whamcloud.com/6493
Tested-by: Hudson
Tested-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3413 scrub: NOT create new files in test_11 during scrub
Fan Yong [Sat, 25 May 2013 06:18:40 +0000 (14:18 +0800)]
LU-3413 scrub: NOT create new files in test_11 during scrub

In sanity-scrub test_11, there may be new files created between two
cycles OI scrub. The test scripts cannot distinguish whether the OI
scrub skipped objects are new created or caused by OI scrub issues.

So we umount the clients after the test environment preparation to
prevent new files to be created from client during OI scrub.

On the other hand, enable full debug to check whether some internal
files creating during the OI scrub.

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie1bdebd12ea456bab07bd4c3a55776fa9451144e
Reviewed-on: http://review.whamcloud.com/6485
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7] 79/7279/2
Bob Glossman [Thu, 8 Aug 2013 23:26:07 +0000 (16:26 -0700)]
LU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7]

Update of build files to new kernel version.

Lustre-commit: c4faab9d603055d81e2c53a7fdfaf8d2960c477f
Lustre-change: http://review.whamcloud.com/6991

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie6ece5a6a885a45f6dee784b5d9a11d477f6ce58
Reviewed-on: http://review.whamcloud.com/7279
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-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6] 78/7278/2
yangsheng [Fri, 19 Jul 2013 05:18:03 +0000 (13:18 +0800)]
LU-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.14.1.el6

Lustre-commit: aaa103b24a4bead459cbae8e49fd051153011720
Lustre-change: http://review.whamcloud.com/7055

Signed-off-by: yang sheng <yang.sheng@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1b54bdbb1bde2434c561c8811ad53a77336415aa
Reviewed-on: http://review.whamcloud.com/7278
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3093 lnet: Fix assert on empty group in selftest module 77/7277/2
Amir Shehata [Wed, 10 Jul 2013 17:45:35 +0000 (10:45 -0700)]
LU-3093 lnet: Fix assert on empty group in selftest module

The core of the issue is that the selftest module doesn't sanitize its
own API, but it depends on lst utility to do such checks.  As a result
this issue manifests itself in this particular LU through an assert
on an empty group.  If the NID is misspelled then an empty group is
added.  An error output is provided, but if that's never checked in a
batch script, as is the case with this issue, then the script will try
to add an empty group to a test to run in a batch, and that will cause
an assert

The fix is two fold.  Ensure that lst utility checks that a group is
added with at least one node.  If not the group is subsequently
deleted.  And the add_test command would fail, since the group no
longer exists.

The second fix is to ensure that the kernel module itself sanitizes
its own API in this particular case, so that if a different utility is
used other than lst to communicate with the selftest kernel module
then this error would be caught.  This fix looks up the batch and the
groups, src and dst, in the ioctl handle and sanitizes that input at
this point.  If the group looked up either doesn't exist or doesn't
have at least one ACTIVE node, then the command fails.

NOTE:there are many other cases in the code where the selftest kernel
module doesn't check for sanity of the input, but depends totally on
the lst module to do such checks.  Particularly around length of
strings passed in.  Thus it is possible to crash the selftest module
if someone tries to create another userspace app to communicate with
the selftest kernel module without ensuring sanity of the params sent
to the kernel module.  In effect, it's always assumed that lst is the
front end for selftest and no other front end is to be used.

Lustre-commit: 7cd460776da349643f53cda4c5d4e927316b666e
Lustre-change: http://review.whamcloud.com/6092

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I304ffc64dcbc06c1802a7bb9a30b15d4489afd43
Reviewed-on: http://review.whamcloud.com/7277
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3576 mdc: prevent fall through in mdc_iocontrol() 76/7276/3
John L. Hammond [Fri, 12 Jul 2013 15:21:48 +0000 (10:21 -0500)]
LU-3576 mdc: prevent fall through in mdc_iocontrol()

In mdc_iocontrol() add a goto to the end of the LL_IOC_HSM_STATE_SET
case, preventing fall through into the next case. In the same
function, replace the return statement in OBD_IOC_QUOTACTL with a
goto, so that a reference to the module is not leaked.

Lustre-commit: 0d166ef1fd80b0056497969b956d04e32e86aa85
Lustre-change: http://review.whamcloud.com/6962

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I762de2aaf794f1691cb243feed5b65289f91e1dd
Reviewed-on: http://review.whamcloud.com/7276
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2902 test: ost stat parameters were not present
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>
10 years agoLU-3633 test: Sanity test 101d fails due to full OST
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-3230 osp: bail out of precreate_reserve on I/O errors
Nathaniel Clark [Mon, 15 Jul 2013 17:52:11 +0000 (13:52 -0400)]
LU-3230 osp: bail out of precreate_reserve on I/O errors

Allow osp_precreate_reserve to propogate error if
precreate_cleanup_ophans recives EIO.

Test-Parameters: testgroup=review-zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib6a109df82be610a21391777b9c293d78b2114e6
Reviewed-on: http://review.whamcloud.com/6988
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker
Ann Koehler [Thu, 25 Jul 2013 21:07:57 +0000 (16:07 -0500)]
LU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker

Dropping Lustre caches might not terminate if the Linux kernel
supports the customisable shrinker batch size feature (commit
e9299f5058595a655c3b207cda9635e28b9197e6). This kernel feature
added a new field (batch) to the shrinker struct. Lustre does
not initialize it. When the unitialized batch value is negative,
the kernel shrink_slab function never terminates its loop that
calls the Lustre shrinker function. The problem was observed
with the ldlm_pools_cli_shrink shrinker, but it could also happen
with other Lustre shrinkers.

The fix is to ensure that all fields of the shrinker struct are
initialized by zero filling the struct when cfs_set_shrinker
allocates it. Zero filling works with all versions of the kernel.

Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I3efa3a858f5d367f73596f38bb4e40b51c2ac5e7
Reviewed-on: http://review.whamcloud.com/7122
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
10 years agoLU-3643 ofd: get data version only if file exists
Jinshan Xiong [Fri, 26 Jul 2013 00:48:22 +0000 (17:48 -0700)]
LU-3643 ofd: get data version only if file exists

In ofd_getattr(), dt_version_get() could be called on a non-existant
object, leading to a NULL pointer for its inode.
It should try to call dt_version_get() only if attr_get returns
success; otherwise it will crash.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I450fb78b85ea86d813ccad4de2f14f5bd4fca645
Reviewed-on: http://review.whamcloud.com/7124
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer
Amir Shehata [Thu, 25 Jul 2013 20:13:55 +0000 (13:13 -0700)]
LU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer

When a system runs out of memory and the function
ptlrpc_register_bulk() is called from ptl_send_rpc() the call to
LNetMEAttach() fails due to failure to allocate memory.  This forces
the code into an error path, which most probably previously went
untested.  The error path:
if (rc != 0) {
CERROR("%s: LNetMEAttach failed x"LPU64"/%d: rc = %dn",
desc->bd_export->exp_obd->obd_name, xid,
posted_md, rc);
break;
}
This print assumes that desc->bd_export is not NULL.  However, it is.
In fact it is expected to be NULL.  desc->bd_import is the correct
structure to access in this case.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I772ec757af224b9868956cc3fc9dc00e804fe84d
Reviewed-on: http://review.whamcloud.com/7121
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.
Aurelien Degremont [Thu, 6 Jun 2013 10:27:32 +0000 (12:27 +0200)]
LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.

When doing a llapi_hsm_copy_end(), the FID sent to kernel should
be the DATA FID, when restoring. To be sure of that, the FID in
hsm_progress is used.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ic378b76716057044f33a670089d738c950e07702
Reviewed-on: http://review.whamcloud.com/7112
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@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-3634 llapi: Fix returned value of llapi_hsm_copy_start/end.
Aurelien Degremont [Mon, 22 Jul 2013 11:57:27 +0000 (13:57 +0200)]
LU-3634 llapi: Fix returned value of llapi_hsm_copy_start/end.

Both function were doing a ioctl and were returning ioctl()
return code instead of returning errno.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ibd4c6f5188bb50e7fa8875e2d4fa3442c2c69888
Reviewed-on: http://review.whamcloud.com/7109
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3427 build: fix 'error handling' issues
Sebastien Buisson [Wed, 24 Jul 2013 15:22:37 +0000 (17:22 +0200)]
LU-3427 build: fix 'error handling' issues

Fix 'error handling' issues found by Coverity version 6.5.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I67d667b405f292604290a49e69c963500d98278e
Reviewed-on: http://review.whamcloud.com/7103
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3405 build: fix 'control flow' errors
Sebastien Buisson [Mon, 27 May 2013 15:13:09 +0000 (17:13 +0200)]
LU-3405 build: fix 'control flow' errors

Fix 'control flow' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.
Missing break in switch (MISSING_BREAK)
This case is not terminated by a 'break' statement.
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.
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: Ia737603bd9ef4dd6b01891b9b13edd59dec11891
Reviewed-on: http://review.whamcloud.com/6466
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-3310 tests: add version check code to sanity test 17o
Jian Yu [Wed, 17 Jul 2013 08:43:15 +0000 (16:43 +0800)]
LU-3310 tests: add version check code to sanity test 17o

This patch adds Lustre version check codes into sanity test
17o to make the test work with servers which do not have the
following patch:

Lustre-commit: 20544bd96269dbda51a76d31c2d09935637e8b2d
Lustre-change: http://review.whamcloud.com/6121

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=17 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I590a4fb03d6dd406ff1d859825f9033a24ceb66c
Reviewed-on: http://review.whamcloud.com/7017
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3517 llite: don't check for O_CREAT in it_create_mode
John L. Hammond [Mon, 1 Jul 2013 17:26:15 +0000 (12:26 -0500)]
LU-3517 llite: don't check for O_CREAT in it_create_mode

ll_lookup_it() checks for O_CREAT in struct lookup_intent's
it_create_mode member which is nonsensical, as it_create_mode is used
for file mode bits (S_IFREG, S_IRUSR, ...). Fix this by just checking
for IT_CREATE in it_op and do the same in llu_lookup_it(). This will
not affect the behavior of either function, since if O_CREATE (0100)
is actually set in o_create_mode then IT_CREATE must have been set in
it_op. In ll_atomic_open() check for O_CREAT in the open_flags
parameter rather than testing mode.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I301964222ec043e6f0cc3b000678fe3c881a2381
Reviewed-on: http://review.whamcloud.com/6786
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3079 osd-zfs: Change header order to avoid build fail
yangsheng [Fri, 12 Jul 2013 19:49:24 +0000 (03:49 +0800)]
LU-3079 osd-zfs: Change header order to avoid build fail

SPL redefined list_move_tail() in sys/list.h. It will
confused if system & lustre header use list_move_tail()
after SPL header.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I946e810b57affdeedbfc16bb5e502ebde0716039
Reviewed-on: http://review.whamcloud.com/6968
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
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-3589 tests: Access changelog record FIDs by name.
Henri Doreau [Tue, 16 Jul 2013 09:33:16 +0000 (11:33 +0200)]
LU-3589 tests: Access changelog record FIDs by name.

Update sanity test_160 to make it parse changelog records
in a more robust way. Access target and parent FIDs by name
instead of relying on their position on the line.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Ib5836a8e624f04a971b80f9ff9b9e978bbff7bee
Reviewed-on: http://review.whamcloud.com/6998
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3364 tests: fix Lustre version number in sanity-lfsck.sh
Jian Yu [Wed, 17 Jul 2013 11:26:41 +0000 (19:26 +0800)]
LU-3364 tests: fix Lustre version number in sanity-lfsck.sh

The sanity-lfsck.sh was added by the following patch, which was included
since Lustre 2.3.60 instead of 2.2.90.

Lustre-commit: 21a9805abde3cbe1ffe046f2d9958d968303b8d3
Lustre-change: http://review.whamcloud.com/4911

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_3 serverbuildno=41 \
testlist=sanity-lfsck

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I0f35b22409853852d8c7336e67f7b3661aa89f95
Reviewed-on: http://review.whamcloud.com/7019
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2527 tests: add version check code to sanity test 183
Jian Yu [Tue, 16 Jul 2013 03:48:20 +0000 (11:48 +0800)]
LU-2527 tests: add version check code to sanity test 183

This patch adds Lustre version check codes into sanity test
183 to make the test work with servers which do not have the
following patch:

Lustre-commit: ef75b59800d643e666d7c44c20287a8002e0a166
Lustre-change: http://review.whamcloud.com/4458

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=183 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I5de38207ed1a3a7d69294abf979dc64be69a8135
Reviewed-on: http://review.whamcloud.com/6994
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3559 utils: mgs has no index
Sebastien Buisson [Fri, 5 Jul 2013 11:33:16 +0000 (13:33 +0200)]
LU-3559 utils: mgs has no index

An MGS formatted with Lustre 2.1 does not have any index.
So mount.lustre must not require an index when starting
an MGS.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I12c1a2511509c4d34ef60a0ed937dda9e5fba4e4
Reviewed-on: http://review.whamcloud.com/6904
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
10 years agoLU-3446 mdd: changelog index to survive MDT restart
Ned Bass [Thu, 13 Jun 2013 22:41:12 +0000 (15:41 -0700)]
LU-3446 mdd: changelog index to survive MDT restart

If all changelog records are cleared the current changelog index is
initialized to zero when the MDT starts. This confuses applications
that rely on the index to track their position in the changelog
history. To avoid this, initialize the current index from the
registered user with the highest end record index.

Add a sanity.sh regression test. Update changelog test function
test_160() and its helpers according to current style guidelines.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I841bbf84c718bac560b6eea4b18de9918b889a90
Reviewed-on: http://review.whamcloud.com/6642
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+
James Simmons [Thu, 18 Jul 2013 16:44:22 +0000 (12:44 -0400)]
LU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+

This patch address two issues needed for SuSE systems. The first
is 64 bit quotas are not properly support in SLES11 SP1. We update
quota-support-64-bit-quota-format, which is no longer needed for
RHEL system, to allow 64 bit quotas for SP1. The second is the port
of the patch to handle the global lock contention inside the
dqget()/dqput(). We'd avoid calling dqget()/dqput() in
dquot_initialize().

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I16a989a68925dfcd098415f6e1f621a6e5c2a9b1
Reviewed-on: http://review.whamcloud.com/7032
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3421 grant: more aggressively book space for precreate
Johann Lombardi [Tue, 4 Jun 2013 15:46:29 +0000 (17:46 +0200)]
LU-3421 grant: more aggressively book space for precreate

- ofd_grant() should not round sub-block allocation to 0.
- ofd_grant_create() should be more aggressive in reserving space.
  Precreation should try to always have enough grant space to process
  a very large preallocation request.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I5803b2d5fae216edcaae124d3b50b589c02e7251
Reviewed-on: http://review.whamcloud.com/6546
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
10 years agoLU-3420 scrub: trigger OI scrub properly
Fan Yong [Fri, 24 May 2013 05:59:16 +0000 (13:59 +0800)]
LU-3420 scrub: trigger OI scrub properly

In osd_fid_lookup(), if the iget() cannot locate the backend inode
(return -ENOENT or -ESTALE) with the found ino#/gen in the OI file,
there may be three cases:

1) MDT file-level backup/restore caused the OI invalid.
2) Someone unlinked the object but NOT removed the OI mapping, such
   as mount target device as ldiskfs, and modify something directly.
3) Someone just removed the object between the osd_oi_lookup() and
   the iget(). It is normal.

Under such case we can lookup OI again to check whether related OI
mapping is still there or not. If not, it is 3rd case. Otherwise,
it is diffcult to distinguish the 2nd from the 1st case. Relatively
speaking, the 1st case is more common than the 2nd case, so trigger
OI scrub without further distinguish.

To reduce the 2nd case, the initial OI scrub will scan the local
objects set to remove those stale OI mappings, such as the entry
for "CATALOGS" after file-level backup/restore.

Another update is about mapping FID to inode for the object with
remote name entry. For example, dir1's name entry resides on the
MDT0. Its object resides on the MDT1. On the MDT1, do file-level
backup/resotre. And before the OI scrub finishing to rebuilt the
OI files on the MDT1, MDT0 send RPC to MDT1 to access dir1's obj
with dir1's FID. On the MDT1, the OI mapping for FID1 is invalid
yet. Under such case, we have two possible solutions:

a) The MDT1 returns -EINPROGRESS to the MDT0, and the MDT0 retry
   such RPC sometime later.

b) On the MDT1, There is the directory "/REMOTE_PARENT_DIR" hold
   all the objects which have remote name entries on other MDTs.
   The object name under the "/REMOTE_PARENT_DIR" is FID string.
   So when get invalid OI mapping, OSD can localte the inode via
   lookup the "/REMOTE_PARENT_DIR" with the given FID.

Compared the two solutions, a) will cause the MDT0 busy wait until
related OI mapping rebuilt. b) is relative better. And bacause the
MDT file-level backup/restore is rare case, it will not affect the
normal cases for FID to inode mapping.

In fact, from the OSD view, it does not know whether the object for
the given FID is referenced by some remote name entry or not, and
especially for DNE II, a multiple-linked object may have many name
entries reside on many MDTs.

To simplify the operation, OSD will not distinguish more, it just
lookup the "/REMOTE_PARENT_DIR". Usually, it only happened for the
RPC from other MDT during the OI scrub, or for the client side RPC
with FID only, such as FID to path, or from old connected client.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I503bd1e2d5d5eb3976a46c385ae041d11d3b9c32
Reviewed-on: http://review.whamcloud.com/6515
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3426 build: fix 'resource leak' errors
Sebastien Buisson [Fri, 31 May 2013 13:47:36 +0000 (15:47 +0200)]
LU-3426 build: fix 'resource leak' errors

Fix 'resource leak' defects found by Coverity version 6.5.1:
Resource leak (RESOURCE_LEAK)
Variable going out of scope leaks the storage it points to.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ieb45e4cceb26b6c1ca605ef1b1c78cf3f603dffa
Reviewed-on: http://review.whamcloud.com/6509
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3611 quota: Fix order of locking and allocating memory.
Li Xi [Wed, 24 Jul 2013 03:33:05 +0000 (20:33 -0700)]
LU-3611 quota: Fix order of locking and allocating memory.

mgs_pool_cmd() locks fsdb_mutex and then allocates mti. It will
leave fsdb_mutex locked if it fails to allocate memory.

This patch fixes the problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I10f92522c509052916a7d7134d73c4923cfaf33e
Reviewed-on: http://review.whamcloud.com/7065
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>
10 years agoLU-3437 mdd: Fix ACL/def_ACL during object creation.
wang di [Wed, 5 Jun 2013 07:06:30 +0000 (00:06 -0700)]
LU-3437 mdd: Fix ACL/def_ACL during object creation.

In mdd_acl_init, after getting default ACL which will
be converted to ACL, then later(in mdd_create) the
acl_buf is re-used to set both default_ACL and ACL,
which is definitely wrong.

And also the remote directory creation does not use
correct ACL/default ACL.

This patch use different buf for def ACL and ACL to avoid
confusion.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I30177bc55e4c6b4d916ccf118ab3485f3394fa87
Reviewed-on: http://review.whamcloud.com/6552
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2835 ptlrpc: Fix race during exp_flock_hash creation
Andriy Skulysh [Thu, 16 May 2013 10:10:41 +0000 (13:10 +0300)]
LU-2835 ptlrpc: Fix race during exp_flock_hash creation

During race exp_flock_hash can be created 2 times.
It is created & assigned without any lock.

Move hash initialization from ldlm_flock_blocking_link()
to ldlm_init_export()

Xyratex-bug-id: MRP-855
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Tested-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Change-Id: Iaec171eb628396b69dede973260a59ac345b7e8c
Reviewed-on: http://review.whamcloud.com/5471
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3297 lov: convert magic to host-endian in lov_dump_lmm()
John L. Hammond [Wed, 8 May 2013 17:54:04 +0000 (12:54 -0500)]
LU-3297 lov: convert magic to host-endian in lov_dump_lmm()

In lov_dump_lmm(), convert the lmm_magic from little-endian to
host-endian byte order before the switch statement, as the other
lov_dump_xxx() and lov_verify_xxx() functions already do.  Remove the
unused macro LMM_ASSERT().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icfa52f3043aaa13b0d0cc34f5be2f59792c3787e
Reviewed-on: http://review.whamcloud.com/6290
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3383 utils: typo in lfs print_quota() function
Patrick Valentin [Fri, 24 May 2013 12:14:20 +0000 (14:14 +0200)]
LU-3383 utils: typo in lfs print_quota() function

In the print_quota() function of 'lfs quota' command, the following
sequence is to determine if the inode grace time is expired:
         if (dqb->dqb_btime > now) {
                 iover = 2;
The test must be done on dqb_itime (inode time), instead of
dqb_btime (data time).

Signed-off-by: Patrick Valentin <patrick.valentin@bull.net>
Change-Id: I1aa9dc9c25ba219ea2272165d21895220a9ef9a7
Reviewed-on: http://review.whamcloud.com/6444
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3470 llog: fix return value of llog_alloc_handle
Li Xi [Fri, 14 Jun 2013 09:09:13 +0000 (17:09 +0800)]
LU-3470 llog: fix return value of llog_alloc_handle

llog_open() calls llog_alloc_handle() taking NULL as the error return
value. But llog_alloc_handle() returns ERR_PTR(-ENOMEM) instead when
error.

Signed-off-by: Li Xi <pkuelelixi@gmail.com>
Change-Id: Id0e9d94107776f65bf6fdaba21988bab1882d3b3
Reviewed-on: http://review.whamcloud.com/6644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3544 nfs: writing to new files will return ENOENT
Patrick Farrell [Thu, 11 Jul 2013 16:06:27 +0000 (11:06 -0500)]
LU-3544 nfs: writing to new files will return ENOENT

This happend with SLES11SP2 Lustre client, which in turn acts as an
NFS server, exporting a subtree of an Lustre fs through NFS.

We detected that whenever we are writing to a new file using, fx,
'echo blah > newfile', it will return ENOENT error. We found
out that this was caused by the anonymous dentry. In SLESS11SP2,
anonymous dentries are assigned '/' as the name, instead of an
empty string. When MDT handles the intent_open call, it will look
up the obj by the name if it is not an empty string, and thus
couldn't find it.

As MDS_OPEN_BY_FID is always set on this request, we never need
to send the name in this request.  The fid is already available
and should be used in case the file has been renamed.

Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ia8bd6f2814d05350d0a197df8a3ffd9729e2081b
Reviewed-on: http://review.whamcloud.com/6920
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Lai Siyao <lai.siyao@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-3474 mdd: mdd_links_read() to return linkea_init() errors
Bruno Faccini [Thu, 4 Jul 2013 08:13:40 +0000 (10:13 +0200)]
LU-3474 mdd: mdd_links_read() to return linkea_init() errors

ASSERTION(ldata->ld_leh != ((void *)0)) can be triggered in
linkea_links_find() due to earlier mdd_links_read() call
missing to return linkea_init() errors and thus preventing
to detect that ld_leh is not populated.
Plus a few error handling fixes to avoid unnecessary msgs
and also prevent early return.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I35b1076d8eb036dd600e0fda711417634590b9df
Reviewed-on: http://review.whamcloud.com/6676
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@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-3233 llite: use correct FID in ll_och_fill()
John L. Hammond [Wed, 19 Jun 2013 00:50:56 +0000 (19:50 -0500)]
LU-3233 llite: use correct FID in ll_och_fill()

When ll_intent_file_open() is called on a file with a stale dentry,
ll_och_fill() may incorrectly use the FID from the struct
ll_inode_info rather than the FID from the response body (which is the
correct FID for the close). Fix this, remove the ll_inode_info
parameter from ll_och_fill(), and move the call to ll_ioepoch_open()
from ll_och_fill() to ll_local_open().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic4c97d82259b4b922e8b5be235d2db188406bc06
Reviewed-on: http://review.whamcloud.com/6695
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.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-3233 mdt: validate open handle cookies
John L. Hammond [Wed, 10 Jul 2013 20:45:18 +0000 (15:45 -0500)]
LU-3233 mdt: validate open handle cookies

Add a const void *h_owner member to struct portals_handle. Add a const
void *owner parameter to class_handle2object() which must be matched
by the h_owner member of the handle in addition to the cookie.  Adjust
the callers of class_handle2object() accordingly, using NULL as the
argument to the owner parameter, except in the case of
mdt_handle2mfd() where we add an explicit mdt_export_data parameter
which we use as the owner when searching for a MFD. When allocating a
new MFD, pass a pointer to the mdt_export_data into mdt_mfd_new() and
store it in h_owner. This allows the MDT to validate that the client
has not sent the wrong open handle cookie, or sent the right cookie to
the wrong MDT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4c26504d808db0c27cfc2f8ebcf7e1fa19719170
Reviewed-on: http://review.whamcloud.com/6938
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
10 years agoLU-2665 mdc: Keep resend FLocks
Bruno Faccini [Wed, 22 May 2013 09:50:03 +0000 (11:50 +0200)]
LU-2665 mdc: Keep resend FLocks

FLocks requests (particulary F_UNLCKs) can't be trashed
upon comm problems with Server/MDS nor upon kill/exit,
thus we need to keep retry/send.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I8faa331712abeadee46eabe111ee1c23a05840d5
Reviewed-on: http://review.whamcloud.com/6415
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-3313 tests: Skip sanityn test_51b
James Nunez [Wed, 15 May 2013 03:22:25 +0000 (21:22 -0600)]
LU-3313 tests: Skip sanityn test_51b

sanityn test_51b now checks the metadata server version and
will run the test for versions 2.3.59 and above. The test will be
skipped for all other server versions.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I040a77a3564e4801413ff342519ba10c54583e70
Reviewed-on: http://review.whamcloud.com/6340
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3268 lod: return root LOV EA in little-endian
John L. Hammond [Wed, 8 May 2013 02:46:39 +0000 (21:46 -0500)]
LU-3268 lod: return root LOV EA in little-endian

In lod_xattr_get() when constructing LOV EA to return for the
filesystem root, store members in little-endian byte order for
consistency with EAs from disk.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id76da869e14ff71b8af21fe2b1d66abd54da0a2d
Reviewed-on: http://review.whamcloud.com/6285
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3546 mdt: reply error to client after version check
Jinshan Xiong [Wed, 3 Jul 2013 09:25:04 +0000 (02:25 -0700)]
LU-3546 mdt: reply error to client after version check

This is missing from MDT implementation which will cause the client
to wait for reply forever.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9e46d83f8db6b6ded57a284914a2ede88dd987f4
Reviewed-on: http://review.whamcloud.com/6864
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3415 quota: not enforce quota when accounting disabled
Niu Yawei [Thu, 30 May 2013 03:46:28 +0000 (23:46 -0400)]
LU-3415 quota: not enforce quota when accounting disabled

When quota accounting isn't enabled, don't try to enforce quota.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9a74b7bfe6b2981adf501042efb6867a77ee4044
Reviewed-on: http://review.whamcloud.com/6492
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3461 kernel: Kernel update [RHEL6.4 2.6.32-358.11.1.el6] 35/6635/2
Bob Glossman [Wed, 12 Jun 2013 17:25:37 +0000 (10:25 -0700)]
LU-3461 kernel: Kernel update [RHEL6.4 2.6.32-358.11.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.11.1.el6

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0fdd7d739041c0ba9f17439e145c1776ffce63bf
Reviewed-on: http://review.whamcloud.com/6635
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-1602 ldlm: Fix flock deadlock detection race
Andriy Skulysh [Mon, 21 Jan 2013 21:15:23 +0000 (23:15 +0200)]
LU-1602 ldlm: Fix flock deadlock detection race

Deadlock isn't detected if 2 threads are trying to
grant 2 locks which deadlock on each other.
They call ldlm_flock_deadlock() simultaneously
and deadlock ins't detected.

The soulition is to add lock to blocking list before
calling ldlm_flock_deadlock()

Xyratex-bug-id: MRP-412
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: I437c8b40a58de14bbac3da39d98d0f03d0f2e064
Reviewed-on: http://review.whamcloud.com/3277
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-2212 crypto: add crc32c module loading to libcfs
Alexander.Boyko [Mon, 22 Oct 2012 18:21:50 +0000 (22:21 +0400)]
LU-2212 crypto: add crc32c module loading to libcfs

This patch add automatically module loading for crc32c
when libcfs is starting.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-725
Change-Id: I3bd8a29cd05b25b77a57f6df254f3d39641d99a1
Reviewed-on: http://review.whamcloud.com/4372
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
10 years agoLU-3095 build: fix 'memory corruption' errors
Sebastien Buisson [Wed, 3 Apr 2013 09:24:02 +0000 (11:24 +0200)]
LU-3095 build: fix 'memory corruption' errors

Fix 'memory corruption' defects found by Coverity version 6.5.1:
Unbounded source buffer (STRING_SIZE)
Passing string of unknown size to function which expects a string
of a particular size.
Write to pointer after free (USE_AFTER_FREE)
Dereferencing freed pointer.
Also fix leak of dentries.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I95a1f877025b2e3b58ace7ed86a82330f64c64a3
Reviewed-on: http://review.whamcloud.com/5926
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2193 mdt: replace fid_build_from_res_name
Fan Yong [Fri, 24 May 2013 05:24:15 +0000 (13:24 +0800)]
LU-2193 mdt: replace fid_build_from_res_name

We miss to replace fid_build_from_res_name() with new
function fid_extract_from_res_name() in mdt_handler.c

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I74804c61361b6c03d4dccd732bce96d9b57f037b
Reviewed-on: http://review.whamcloud.com/6565
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3411 osd: fsfilt_get_ops returns an error, not NULL
Alex Zhuravlev [Thu, 30 May 2013 11:23:02 +0000 (15:23 +0400)]
LU-3411 osd: fsfilt_get_ops returns an error, not NULL

osd_mount() should be able to recognize this properly.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ife1f52cf264fd6041dfc01606c6e48e47f2f8ff0
Reviewed-on: http://review.whamcloud.com/6496
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3032 ptlrpc: race in pinger (use-after-free situation)
Dmitry Eremin [Fri, 12 Apr 2013 13:10:15 +0000 (17:10 +0400)]
LU-3032 ptlrpc: race in pinger (use-after-free situation)

The race is result of use-after-free situation:

~ ptlrpc_stop_pinger()          ~ ptlrpc_pinger_main()
---------------------------------------------------------------
thread_set_flags(SVC_STOPPING)
cfs_waitq_signal(pinger_thread) ...
...                             thread_set_flags(SVC_STOPPED)
l_wait_event(thread_is_stopped)
OBD_FREE_PTR(pinger_thread)
...                             cfs_waitq_signal(pinger_thread)
---------------------------------------------------------------

The memory used by pinger_thread might have been freed and
reallocated to something else, when ptlrpc_pinger_main()
used it in cvs_waitq_signal().

Signed-off-by: Li Wei <wei.g.li@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I3516c7ece2b2e1e4e0b2e47acb0583c174a3e631
Reviewed-on: http://review.whamcloud.com/6040
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3089 tests: Give ZFS more time to complete dd's
Nathaniel Clark [Tue, 30 Apr 2013 19:33:21 +0000 (15:33 -0400)]
LU-3089 tests: Give ZFS more time to complete dd's

Due to LU-2887 and ilk, give zfs more time to do disk transfers.  Also
cleanup test formatting.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ia22f2244ccec552046d2efeaeaa6e2194547c96c
Reviewed-on: http://review.whamcloud.com/6217
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>