Whamcloud - gitweb
fs/lustre-release.git
8 years agoLU-7042 lnet: Handle OFED 3.18 packaging definitions 18/16418/3
Dmitry Eremin [Mon, 14 Sep 2015 19:34:52 +0000 (22:34 +0300)]
LU-7042 lnet: Handle OFED 3.18 packaging definitions

Starting with OFED 3.18 the OFED package started to use config.h
provided by autoconf tool. This lead to clash between PACKAGE_*
macros which are defined in OFED and Lustre headers.

Also dealing with kernels that have lustre enabled already
required to undefine the common macros that used by in-kernel
Lustre client and this sources.

This fix undefine all symbols that are generated by Lustre autoconf
to avoid conflicts with kernel defines or OFEDs. They are undefined
right before new definition in config.h. The list of symbols to undef
is automatically generated by autoconf and should not be extended in
the future.

Also undefine clashed macros in autoconf checks.

Change-Id: I0d93adac19573328e905ba536db0dbd842ed2aab
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/16418
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7078 llite: reset md->lmv to NULL 82/16382/3
wang di [Thu, 10 Sep 2015 04:06:11 +0000 (21:06 -0700)]
LU-7078 llite: reset md->lmv to NULL

ll_update_lsm_md() should reset md->lmv to NULL
right after it is assigned to lli_lsm_md, otherwise
it might be double freed if failure happens.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4f069e3445a957860c2853c6f32104885edc33fa
Reviewed-on: http://review.whamcloud.com/16382
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7096 nrs: serialize executions of nrs_policy_stop 14/16214/4
Henri Doreau [Thu, 3 Sep 2015 11:38:40 +0000 (13:38 +0200)]
LU-7096 nrs: serialize executions of nrs_policy_stop

Do not release nrs_lock in nrs_policy_stop0 to prevent op_policy_stop()
from being executed concurrently.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Ie42793021aa47ff7e2c14eb58b3d6e8405fa8407
Reviewed-on: http://review.whamcloud.com/16214
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7014 osd: add additional credits for generic IAM delete 13/16213/3
Alex Zhuravlev [Thu, 3 Sep 2015 10:46:11 +0000 (13:46 +0300)]
LU-7014 osd: add additional credits for generic IAM delete

IAM is different from regular htree used by regular directories.
it can recycle and shrink blocks which needs additional credits.

Change-Id: I819d26206b158a0e8ef2a9110ba89fe34e5a1925
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/16213
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7090 deb: fix wrong IB path for configure 83/16183/5
Wang Shilong [Tue, 15 Sep 2015 13:47:11 +0000 (09:47 -0400)]
LU-7090 deb: fix wrong IB path for configure

There are two problems:

Firstly, we need check whether O2IBPATH is valid before using
if not, asssign '--with-o2ib=no'instead.

Secondly, macro O2IBPATHS might be "$LINUX $LINUX/drivers/infiniband".
--with-o2ib only expect one string assignment here

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I86172056c57ec8e649c2e56455369e66bbbe3513
Reviewed-on: http://review.whamcloud.com/16183
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6995 osd: fix invalid use of bvec_iter_page 67/15967/2
Frank Zago [Wed, 12 Aug 2015 16:44:24 +0000 (11:44 -0500)]
LU-6995 osd: fix invalid use of bvec_iter_page

bvec_iter_page is expecting a biovecs list as a first argument, not a
biovec. That works as long as there is only one biovec in the bio. If
there is more than one, then invalid memory is dereferences since bvl
is a single vector, not a list. This only affect 3.14+ kernels, where
HAVE_BVEC_ITER is true. Don't use bvec_iter_page, but create the right
macro to simply return the vector's bv_page. Bug introduced in commit
833b670a.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I390b527bacae9dd650814bb19ab2dbc9184a605d
Reviewed-on: http://review.whamcloud.com/15967
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6798 kernel: kernel update [SLES11 SP3 3.0.101-0.47.55] 93/15493/14
Yang Sheng [Fri, 3 Jul 2015 22:01:43 +0000 (06:01 +0800)]
LU-6798 kernel: kernel update [SLES11 SP3 3.0.101-0.47.55]

Update SLES11 SP3 kernel to 3.0.101-0.47.55.

Test-Parameters: envdefinitions=SANITY_EXCEPT=170 \
mdsdistro=sles11sp3 ossdistro=sles11sp3 \
clientdistro=sles11sp3 mdsfilesystemtype=ldiskfs \
mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs \
testgroup=review-ldiskfs

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ib1932447f8d2a507a260e76a39df53ef9bea3a67
Reviewed-on: http://review.whamcloud.com/15493
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6772 tests: fix malform open in sanity:33d 15/16315/4
Yang Sheng [Tue, 8 Sep 2015 15:52:22 +0000 (23:52 +0800)]
LU-6772 tests: fix malform open in sanity:33d

The malform open original intends to verify whether panic.
Though we send a malform open flags, but it has possible
to success. So we should ignore the return value as test_33c.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ibc20e4864068f07dac30739792dc09e3844b7579
Reviewed-on: http://review.whamcloud.com/16315
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7102 tests: fix replay-dual.sh test_26 for MDSCOUNT=1 14/16414/3
Andreas Dilger [Mon, 14 Sep 2015 19:07:41 +0000 (13:07 -0600)]
LU-7102 tests: fix replay-dual.sh test_26 for MDSCOUNT=1

The replay-dual.sh test_26 code could never pass for MDSCOUNT=1
since it was returning a "false" condition for the first
conditional and always tripping the error message:

[ $MDSCOUNT -ge 2 ] && {set default dirstripe} || error

Instead, make {set default dirstripe} a sub-clause of the conditional.

Fix cleanup_26 to kill proper dbench pid.

Clean up some code style in this test.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0849318aa59e5698efb27b730a69e2f1b4e2d181
Reviewed-on: http://review.whamcloud.com/16414
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6846 llog: create remote llog synchronously 33/16333/5
wang di [Mon, 7 Sep 2015 15:27:34 +0000 (08:27 -0700)]
LU-6846 llog: create remote llog synchronously

Create remote llog synchronously, because llog_create
for remote object only pack the RPC in the buffer,
instead the real llog object will be created until
transaction stop. If other thread happens to use
this llog object and send RPC before the creation,
which might cause the failure.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6c806174381b87836b1f6dd833cda50f0ab2d168
Reviewed-on: http://review.whamcloud.com/16333
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5344 llite: lookup master inode by ilookup5_nowait 66/16066/8
wang di [Sat, 22 Aug 2015 20:54:52 +0000 (13:54 -0700)]
LU-5344 llite: lookup master inode by ilookup5_nowait

Do not lookup master inode by ilookup5, instead it should
use ilookup5_nowait, otherwise it will cause dead lock,

1. Client1 send chmod req to the MDT0, then on MDT0, it
enqueues master and all of its slaves lock, (mdt_attr_set()
->mdt_lock_slaves()), after gets master and stripe0 lock,
it will send the enqueue request(for stripe1) to MDT1, then
MDT1 finds the lock has been granted to client2. Then MDT1
sends blocking ast to client2.

2. At the same time, client2 tries to unlink the striped
dir (rm -rf striped_dir), and during lookup, it will hold
the master inode of the striped directory, whose inode state
is NEW, then tries to revalidate all of its slaves,
(ll_prep_inode()->ll_iget()->ll_read_inode2()->
ll_update_inode().). And it will be blocked on the server
side because of 1.

3.Then the client get the blocking_ast request, cancel the
lock, but being blocked by ilookup5 in ll_md_blocking_ast(),
because the inode state is still NEW.

Add test_90/91 in sanityn.sh to verify the deadlock

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I8ce88595998dc35b6165951873192a65674bf3a7
Reviewed-on: http://review.whamcloud.com/16066
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6485 libcfs: embed kr_data into kkuc_reg 38/14638/13
Hongchao Zhang [Tue, 16 Jun 2015 14:17:48 +0000 (22:17 +0800)]
LU-6485 libcfs: embed kr_data into kkuc_reg

In struct kkuc_reg, the "kr_data" is difficult to be freed
outside of libcfs, then it's better to change it to be
inline data instead of the data pointer.

Change-Id: Iaf5e9fbb9bad2540f51da2c4fd9c4047640d0877
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/14638
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6978 utils: mkfs.lustre to recognise non ldiskfs opts 37/15937/3
Alexander Zarochentsev [Sun, 9 Aug 2015 20:50:04 +0000 (23:50 +0300)]
LU-6978 utils: mkfs.lustre to recognise non ldiskfs opts

After "LU-6030 osd-ldiskfs: improve mount option handling landing",
mkfs.lustre lost ability to store non ldiskfs persistent options, because their
support was stripped out from ldiskfs layer.
This patch makes ldiskfs mount independent from the mount options from mkfs.lustre
command string.

Change-Id: I63e2efb84249eae8294ce33a72894aeb52563ad5
Xyratex-bug-id: MRP-2819
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-on: http://review.whamcloud.com/15937
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5297 osp: process unsuccessful osp sync records properly 25/14925/7
Emoly Liu [Fri, 21 Aug 2015 15:48:58 +0000 (23:48 +0800)]
LU-5297 osp: process unsuccessful osp sync records properly

Unsuccessful records can be classifed into two types: failed and
invalid. And they should be handled differently.

This patch improves the handling process by the following fixes.

First, correct the return values of osp_sync_new_xxx_job() to separate
the record types:
- 0 on success
- negative on error
- 1 on invalid record

Second, process these two types of records differently:
- When a failed record is processed, opd_syn_{changes,rpc_in_flight,
  rpc_in_progess} should be decreased, and opd_syn_last_processed_id
  should be bumped.
- When an invalid record is processed, besides above process should
  be taken, this record should be deleted at the end. ("unknown record
  type is treated as invalid record".)

Third, simplify the sending rec process in osp_sync_process_queues(),
remove the unnecessary loop waiting and continue processing other
records directly.

Also, OBD_FAIL_OSP_CHECK_INVALID_REC and OBD_FAIL_OSP_CHECK_ENOMEM are
defined and used in sanity.sh test_239a/b respectively to verify the
fix.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I9c55f43f160a3d9e51892a2dc2f45a52f9b6f2c8
Reviewed-on: http://review.whamcloud.com/14925
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7093 mdt: Remote operation permission check 86/16286/6
wang di [Fri, 4 Sep 2015 08:48:32 +0000 (01:48 -0700)]
LU-7093 mdt: Remote operation permission check

Only do permission check for migrate, create striped (remote)
directory, and set default LMV stripeEA for directory.

For non-administrators, only if their gid match
enable_remote_dir_gid (under /proc) or
enable_remote_dir_gid = -1, then they can do these above 3
operations.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id103ddd4dbf4a1901a32b599639037de8ce58e4a
Reviewed-on: http://review.whamcloud.com/16286
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6429 tests: fix external journal usage 26/14426/2
Alexey Lyashkov [Thu, 9 Apr 2015 19:09:59 +0000 (22:09 +0300)]
LU-6429 tests: fix external journal usage

add ability to specify a external journal for each target.

Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: I41005d3b78935185b3498513691fc250e9c57fe2
Reviewed-on: http://review.whamcloud.com/14426
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6943 clio: get rid of cl_req 33/15833/6
Jinshan Xiong [Mon, 3 Aug 2015 17:01:35 +0000 (10:01 -0700)]
LU-6943 clio: get rid of cl_req

Implement cl_req_attr_set with a cl_object operation.
Get rid of cl_req and related function and data structures.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I7ea4af3eed65c312835e19f12dd01c7c87445352
Reviewed-on: http://review.whamcloud.com/15833
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7114 ldiskfs: corrupted bitmaps handling patches 12/16312/2
Wang Shilong [Tue, 8 Sep 2015 13:54:29 +0000 (21:54 +0800)]
LU-7114 ldiskfs: corrupted bitmaps handling patches

This patch backported following patches from upstream:

163a203ddb36c36d4a1c942aececda0cc8d06aa7
ext4: mark block group as corrupt on block bitmap error

87a39389be3e3b007d341be510a7e4a0542bdf05
ext4: mark block group as corrupt on inode bitmap error

bdfb6ff4a255dcebeb09a901250e13a97eff75af
ext4: mark group corrupt on group descriptor checksum

Also use ext4_warning() instead of ext4_error() so that
filesystem don't become RO in default, and together
with these patches,FS wil still be usable even such
bad things happen.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: Ib4075aba7df6f7f59e89a90475405080acd43dd0
Reviewed-on: http://review.whamcloud.com/16312
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6356 tgt: add handlers for SEC_CTX_* requests 24/16124/2
Sebastien Buisson [Fri, 28 Aug 2015 09:19:00 +0000 (11:19 +0200)]
LU-6356 tgt: add handlers for SEC_CTX_* requests

When dealing with security context refresh requests, an export is
already associated with the request. So the normal *_common_slice
handlers are called.
We then have to have handlers for SEC_CTX_INIT, SEC_CTX_INIT_CONT
and SEC_CTX_FINI requests in *_common_slice for all target types.

This patch reintroduces the handlers that were removed by patch
http://review.whamcloud.com/14041, plus adds a new one for ofd.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ifadaff9d7f07cf4c6a75cd1f5054378aaca27c26
Reviewed-on: http://review.whamcloud.com/16124
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6529 ldlm: improve proc interface of lock reclaim 23/16123/5
Niu Yawei [Fri, 28 Aug 2015 07:52:32 +0000 (03:52 -0400)]
LU-6529 ldlm: improve proc interface of lock reclaim

Rename variables of ldlm_watermark_low & ldlm_watermark_high to
ldlm_reclaim_threshold & ldlm_lock_limit, and introduce two
additional variables of ldlm_reclaim_threshold_mb and
ldlm_lock_limit_mb for proc interface, so that we needn't to
convert the MB to locknr each time;

Adjust the proc name from watermark_low_mb & watermark_high_mb to
lock_reclaim_threshold_mb & lock_limit_mb;

Remove the misleading comment at the top of ldlm_reclaim.c, add more
comments to functions in ldlm_reclaim.c;

Export the total granted locks via proc for debug purpose;

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I161e088513ba2319cfdfe0d703512b4d9eeeebf1
Reviewed-on: http://review.whamcloud.com/16123
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6271 osc: handle osc eviction correctly 89/14989/6
Jinshan Xiong [Fri, 29 May 2015 04:26:40 +0000 (21:26 -0700)]
LU-6271 osc: handle osc eviction correctly

Cleanup everything if an OSC is being evicted.

Group lock is not well supported yet.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I24f815a9a1bf13cb565109b2dae7b4d07b57f921
Reviewed-on: http://review.whamcloud.com/14989
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6215 ofed: strengthen ib_create_cq test in 4.2+ kernels 42/16342/3
James Simmons [Wed, 9 Sep 2015 15:28:52 +0000 (11:28 -0400)]
LU-6215 ofed: strengthen ib_create_cq test in 4.2+ kernels

External infinband stacks tend to keep their kernel
headers in sync with the latest kernels but this is
not the case with the driver code itself. Since this
is the case we can not trust testing for API changes
using OFED headers but need to be test driver code
API changes. Update the autoconf test to see if
ib_create_cq() uses struct ib_cq_init_attr.

Change-Id: I9875b6787723589b9cbdb55ef088b146b6900b2a
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16342
Tested-by: Jenkins
Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6356 tests: add delay in tgt_handle_request0 for ctx init 09/15709/2
Sebastien Buisson [Thu, 23 Jul 2015 12:13:53 +0000 (14:13 +0200)]
LU-6356 tests: add delay in tgt_handle_request0 for ctx init

Add OBD_FAIL_SEC_CTX_HDL_PAUSE in tgt_handle_request0() for SEC_CTX_*
cases. It will induce a delay in gss context negotiation, useful for
sanity-krb5 test_8.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I5bc85e234dd72665f3ab654e60d8a07b40948684
Reviewed-on: http://review.whamcloud.com/15709
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6356 tests: fix sanity-krb5 56/15556/4
Sebastien Buisson [Fri, 10 Jul 2015 08:46:39 +0000 (10:46 +0200)]
LU-6356 tests: fix sanity-krb5

test_151 is updated because it was relying on the fact that a target
cannot start if it cannot reaches MGS, which is no longer the case.
Now start the target, and look at import state of the mgc connection,
thanks to the newly added wait_mgc_import_state() routine in the
test framework.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I8a846f1dfefe5d1d2310295bdd5172feb04739ef
Reviewed-on: http://review.whamcloud.com/15556
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6388 utils: make llog_reader parse changelogs 20/14120/18
Olaf Faaland [Fri, 6 Mar 2015 23:38:00 +0000 (07:38 +0800)]
LU-6388 utils: make llog_reader parse changelogs

Improve support for changelog_catalog records and changelog records.

Extend llog_reader to handle records of type CHANGELOG_REC or
CHANGELOG_USER_REC (present in lustre logs with changelog entries).

Records in the changelog_catalog (type LLOG_LOGID_MAGIC) contain the
ID of the object (file) containing actual changelog records.  The new
output provides the pathname to those files, as one would see them
when mounting an ldiskfs or zfs target via the posix layer. This makes
it easy to find those files to inspect them.

Move some logid/fid manipulation functions, which are specific to
llogs, out of lustre_log.h into a new header lustre_log_user.h.  One
of the functions is necessary for llog_reader to display useful
information for certain lustre log record types.  They are all related
to logid/fid conversion or access, and are not dependent on dt_object
like the rest of the material in lustre_log.h.

Also, llog_test_9() is added to llog_test.c, used in sanity.sh
test_60a to verify llog_reader.

Change-Id: I7120c391702fd5b8e18031bbe6e109d9e079690f
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/14120
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6895 osd-ldiskfs: handle REMOTE_PARENT_DIR properly 35/16035/10
Fan Yong [Thu, 23 Jul 2015 21:37:30 +0000 (05:37 +0800)]
LU-6895 osd-ldiskfs: handle REMOTE_PARENT_DIR properly

For a remote directory D_n, its name entry resides on the MDT_x,
its object resides on the MDT_y. On the MDT_y, the D_n's object
is inserted under REMOTE_PARENT_DIR and its dotdot entry is set
as the REMOTE_PARENT_DIR to satisfy local e2fsck.

When the namespace LFSCK scans the D_n directory on the MDT_y,
the REMOTE_PARENT_DIR will be found with LMAC_NOT_IN_OI in LMA,
the osd_dirent_check_repair() should NOT assert for such case.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Id7fc10caae81be7d751c338fda401a6be93562ef
Reviewed-on: http://review.whamcloud.com/16035
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
8 years agoLU-6215 libcfs: misc_unregister is now void function 75/16275/3
James Simmons [Thu, 10 Sep 2015 14:03:29 +0000 (10:03 -0400)]
LU-6215 libcfs: misc_unregister is now void function

For the 4.2 kernel misc_unregister() no longer returns
an int value. This patch handles this API change.

Change-Id: If81519a2b272b39252bfd153d8b4b13ab4b3059b
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16275
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6359 test: fix test_10d of recovery-small 55/16155/3
Niu Yawei [Tue, 1 Sep 2015 04:44:02 +0000 (00:44 -0400)]
LU-6359 test: fix test_10d of recovery-small

Drop unused locks and replace drop_bl_callback_once() with
drop_bl_callback() to avoid interference from other cached locks.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Id2846aed1f8e9e47e2a35fd8de122cc571002ffd
Reviewed-on: http://review.whamcloud.com/16155
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7057 utils: use stronger flags when opening volatile files 66/16166/5
John L. Hammond [Tue, 1 Sep 2015 21:50:44 +0000 (16:50 -0500)]
LU-7057 utils: use stronger flags when opening volatile files

Existing files with volatile-ish names may be accidentally opened by
lfs_migrate(). This is not the intent so disallow this behavior by
adding O_EXCL and O_NOFOLLOW to the flags to open(). Use the original
file's MDT index and a random suffix when constructing the volatile
file name (as is done in llapi_create_volatile_idx()) and reduce the
mode of the file created.

To handle pre-existing files use a do while lookup around the volatile
opens in llapi_create_volatile_idx() and lfs_migrate().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I399d30104d841df13fe1051aaa8264514911714d
Reviewed-on: http://review.whamcloud.com/16166
Tested-by: Jenkins
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-7118 tests: stop all OSTs before reformat 66/16366/2
wang di [Wed, 9 Sep 2015 08:35:56 +0000 (01:35 -0700)]
LU-7118 tests: stop all OSTs before reformat

Stop all of OSTs before reformat, otherwise
the leftover OSTs or MGC might cause trouble
in the following test.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I9b19f438906cf3c091d3ccbc55d3341a06e6745b
Reviewed-on: http://review.whamcloud.com/16366
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
8 years agoLU-6826 lod: validate stripe_count and offset 30/16130/3
wang di [Thu, 27 Aug 2015 10:35:18 +0000 (03:35 -0700)]
LU-6826 lod: validate stripe_count and offset

Validate stripe_offset and stripe_count in lod_ah_init, so
these two values will not cause unexpected failures in the
following creation.

Add sanity.sh 300m to verify the case.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I3d36b29079a36355eb4a8d645b70c04aa6d80a40
Reviewed-on: http://review.whamcloud.com/16130
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6356 sptlrpc: notify OSP and LWP for sptlrpc conf change 52/15552/4
Sebastien Buisson [Fri, 10 Jul 2015 06:12:16 +0000 (08:12 +0200)]
LU-6356 sptlrpc: notify OSP and LWP for sptlrpc conf change

Add .o_set_info_async handler for OSP and LWP. This handler only
deals with sptlrpc conf change, calling sptlrpc_conf_client_adapt().
The latter is also modified to accept LUSTRE_OSP_NAME and
LUSTRE_LWP_NAME obd types.
This enables OSP and LWP to dynamically take into account security
flavor change.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ide4d9e61da708a145431f4f7993d52d2a7d29877
Reviewed-on: http://review.whamcloud.com/15552
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7050 llog: record the minimum record size 03/16103/6
wang di [Mon, 24 Aug 2015 17:28:03 +0000 (10:28 -0700)]
LU-7050 llog: record the minimum record size

Remember the minimum record size in llog header, so in
llog_skip_over, it can skip the records properly. In current
implementation, it will use LLOG_MIN_REC_SIZE, only 24 bytes,
which too less for update records(usually more than 1000 bytes),
and cause update recovery reading a lot useless update records
from other MDTs.

The minimum record size will be recorded in llh_size, which is
only used by fixed size record llog now, and also add another
flag LLOG_F_IS_FIXSIZE to indicate the fix size record llog.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ia62684d1fb744e3aca74107f22683b2ee63a2d16
Reviewed-on: http://review.whamcloud.com/16103
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6785 utils: compatibility fix for lfs migrate 38/16238/4
Henri Doreau [Fri, 4 Sep 2015 08:17:53 +0000 (10:17 +0200)]
LU-6785 utils: compatibility fix for lfs migrate

Make lfs migrate able to operate against servers that support
file lease but not atomic swap/close (as added in LU-4840).

Make blocking mode the default and add a --non-block switch to
lfs accordingly.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I7d3cdccfcc5bec78e69c69615ee29cac11f6f31f
Reviewed-on: http://review.whamcloud.com/16238
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
8 years agoLU-7015 ofd: Fix wanted grant calculation 16/16216/3
Oleg Drokin [Sat, 5 Sep 2015 17:37:06 +0000 (10:37 -0700)]
LU-7015 ofd: Fix wanted grant calculation

When clients sends a "we want this much grant number", the value
is a total amount of space client wants including whatever it has.
So in order to properly reconcile this on the server we need
to substract what the client alreay has to see how much we grant back.
This will still overshoot some due to multiple RPCs in flight,
but at least it should not be as bad anymore.

Change-Id: I94cec016656b005891694dd70e6a7bab123cd690
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/16216
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-7061 osd-ldiskfs: NULL pointer dereference in osd_scrub_refresh_mapping 38/16138/2
Andriy Skulysh [Mon, 31 Aug 2015 08:31:02 +0000 (11:31 +0300)]
LU-7061 osd-ldiskfs: NULL pointer dereference in osd_scrub_refresh_mapping

id can be NULL for DTO_INDEX_DELETE operation.

Change-Id: I0ead24b8d9112d65b48b8d96d93181fa17d04c49
Xyratex-bug-id: MRP-2431
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: http://review.whamcloud.com/16138
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
8 years agoLU-6998 mdt: do not lock stripe0 object 73/15973/5
wang di [Tue, 11 Aug 2015 12:15:17 +0000 (05:15 -0700)]
LU-6998 mdt: do not lock stripe0 object

Do not lock stripe 0 for migrating object in
mdt_lock_slaves(), because stripe0 and master
object are the same object, which has been locked
before mdt_lock_slaves().

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I8322061b9b8d310a17fdd6bd8265a3781b14dc9d
Reviewed-on: http://review.whamcloud.com/15973
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6142 ldlm: remove ldlm typedefs from code 01/15301/8
Andreas Dilger [Tue, 12 May 2015 21:21:31 +0000 (15:21 -0600)]
LU-6142 ldlm: remove ldlm typedefs from code

Remove typedefs ldlm_mode_t, ldlm_type_t, ldlm_policy_data_t,
ldlm_wire_policy_data_t, ldlm_error_t, ldlm_side_t, ldlm_appetite_t,
ldlm_ns_type_t, and ldlm_cancel_flags_t now that they are unused.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I3a1db9a3f3d609d85863547b0d1b30d125bcab07
Reviewed-on: http://review.whamcloud.com/15301
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-4865 zfs: grow block size by write pattern 27/15127/12
Jinshan Xiong [Wed, 3 Jun 2015 07:06:19 +0000 (00:06 -0700)]
LU-4865 zfs: grow block size by write pattern

This patch grows the block size by write RPC. The osd-zfs blocksize
used to be fixed at 128KB, which is too big for random write and
too small for seqential write.

This patch decides the block size by the first few RPCs. If the first
few RPCs are sequential, mostly it will use bigger block size;
otherwise, smaller block size will be used.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I6cf8fa8eca998e73bbb99f66eb1323c3abcf39f0
Reviewed-on: http://review.whamcloud.com/15127
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7079 ptlrpc: imp_peer_committed_transno should increase 61/16161/5
Alex Zhuravlev [Tue, 1 Sep 2015 14:28:46 +0000 (17:28 +0300)]
LU-7079 ptlrpc: imp_peer_committed_transno should increase

imp_peer_committed_transno should not decrease as this can
confuse the users if imp_peer_committed_transno is used to
check commit status.

Change-Id: I8a1fdc651d837987bbe9aecc859b36849f9ee0a7
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/16161
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5718 o2iblnd: avoid intensive reconnecting 00/14600/6
Liang Zhen [Tue, 25 Aug 2015 16:25:34 +0000 (12:25 -0400)]
LU-5718 o2iblnd: avoid intensive reconnecting

When there is connection race between two nodes and one side of
connection is rejected by remote side, o2iblnd will reconnect
immediately, this is going to generate a lot of memory pressure and
even cause OOM if remote side is slow and can't complete connecting
request in short time.

This patch resolves this issue by reconnecting after rejected
connection has been destroyed by connd, so there is no more than
one zombie connection for each peer.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I78d3b00be70231d576572832b9b0fba2df3d3c12
Reviewed-on: http://review.whamcloud.com/14600
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7059 mdt: reset rc=0 in mdt_lock_objects_in_linkea 31/16131/2
wang di [Thu, 27 Aug 2015 17:28:19 +0000 (10:28 -0700)]
LU-7059 mdt: reset rc=0 in mdt_lock_objects_in_linkea

reset rc to 0 in mdt_lock_objects_in_linkea, otherwise
it might cause migration failure for mulitple link file.

Add sanity.sh 230e to verify the case.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I063a6e461e2fe427105e8063720f59df42a8eda3
Reviewed-on: http://review.whamcloud.com/16131
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-7072 tests: Fix and re-enable test 78 in sanityn 78/16178/3
Henri Doreau [Wed, 2 Sep 2015 08:55:40 +0000 (10:55 +0200)]
LU-7072 tests: Fix and re-enable test 78 in sanityn

Early NRS policy tunings can fail for the following reasons:
  - Policy not started (ENODEV)
  - Policy not fully initialized (EAGAIN)

Make test_78 of sanityn handle both properly and re-enable it.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I1d68ad709d0ac1c8ee9dabebf565c786d7c904da
Reviewed-on: http://review.whamcloud.com/16178
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6853 build: Add python-docutils to dkms.spec 63/16163/2
Nathaniel Clark [Tue, 1 Sep 2015 18:20:45 +0000 (14:20 -0400)]
LU-6853 build: Add python-docutils to dkms.spec

Require python-docutils for rst2man during build of lustre.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I1235c9296c6b1fc5a309cd3018c9fcb3eea452e9
Reviewed-on: http://review.whamcloud.com/16163
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6766 build: add support for arm64 95/15395/3
Arnaud Guignard [Fri, 19 Jun 2015 08:51:24 +0000 (10:51 +0200)]
LU-6766 build: add support for arm64

Expand lustre to support the ARM64 platform.

The architecture is reported as aarch64 so add that support to
lustre-build-linux.m4.

For the Red Hat/Fedora packaging, strip the aarch64 suffix for the
required kernel.

Add definitions for lstat_t, lstat_f, fstat_f and fstatat_f for aarch64
architecture in lustre/include/lustre/lustre_user.h.

Change-Id: I2d4a9e7be4d4c32ab99da802f1b2318764e4386e
Signed-off-by: Arnaud Guignard <arnaud.guignard@cea.fr>
Reviewed-on: http://review.whamcloud.com/15395
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5977 ofd: Removed correction for bad timestamps 77/16077/3
Giuseppe Di Natale [Wed, 19 Aug 2015 22:52:56 +0000 (15:52 -0700)]
LU-5977 ofd: Removed correction for bad timestamps

Removed a correction made to handle a bug with negative
timestamps in Lustre 2.1.0.

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: I8bddd4370ac907a794b4b1c41062de482bee42f4
Reviewed-on: http://review.whamcloud.com/16077
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
8 years agoLU-5974 ptlrpc: Removed checksum compatibility with 1.8 76/16076/4
Giuseppe Di Natale [Fri, 21 Aug 2015 22:57:40 +0000 (15:57 -0700)]
LU-5974 ptlrpc: Removed checksum compatibility with 1.8

Removed version checks which enabled checksum compatibility
with Lustre version 1.8

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: I15895cd7236c4c864a8597faf2c43d1548cfcfb2
Reviewed-on: http://review.whamcloud.com/16076
Reviewed-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
8 years agoLU-6142 ldlm: remove ldlm typedef usage from code 00/15300/8
Andreas Dilger [Wed, 6 May 2015 21:53:51 +0000 (15:53 -0600)]
LU-6142 ldlm: remove ldlm typedef usage from code

Replace usage of ldlm_mode_t, ldlm_type_t, ldlm_policy_data_t,
ldlm_wire_policy_data_t, ldlm_error_t, ldlm_side_t, ldlm_appetite_t,
ldlm_ns_type_t, ldlm_cancel_flags_t, ldlm_policy_res_t, and
ldlm_ns_hash_def with named enums to conform to upstream coding style.

Fix users of flags that were using "int" instead of named enum.
Rename some "flags" variables to distinguish between different flags.

Rename LDLM_CANCEL_* flags (used with enum ldlm_lru_flags) to
LDLM_LRU_FLAGS_* to avoid confusion with enum ldlm_cancel_flags.

Remove unused write-only field lr_most_restr from ldlm_resource.

Add deprecated typedefs into checkpatch.pl so that they generate
warnings for new patches.

Because these fields are so widely used, removing the typedefs
entirely is put into a second patch that can be landed later,
after other in-flight patches using these typedefs have been landed,
or refreshed to remove their use.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibdba36496953017c406b41c6e0b6986dfa3cab07
Reviewed-on: http://review.whamcloud.com/15300
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6401 headers: Create single .h for lu_seq_range 52/15952/8
Ben Evans [Thu, 20 Aug 2015 14:07:07 +0000 (09:07 -0500)]
LU-6401 headers: Create single .h for lu_seq_range

Put lu_seq_range related functions into a single .h.
Include directly from files which use it, and remove definitions from
lustre_idl.h

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I2e8912688bc5b9fd77fd7b1c85d2dee27cfd825c
Reviewed-on: http://review.whamcloud.com/15952
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6215 o2iblnd: handle new struct ib_cq_init_attr 18/16118/2
James Simmons [Thu, 27 Aug 2015 22:14:32 +0000 (18:14 -0400)]
LU-6215 o2iblnd: handle new struct ib_cq_init_attr

For linux kernel version 4.2 the infiniband layer
created a new structure ib_cq_init_attr to pass to
ib_create_cq(). This patch handles this new case.
See linux commit 8e37210b38fb7d6aa06aebde763316ee955d44c0

Change-Id: I0db25c8bf6a4fb11a120607a45f8f1e546c375d6
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16118
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6215 llite: file->f_dentry no longer exist 19/16119/2
James Simmons [Thu, 27 Aug 2015 22:19:55 +0000 (18:19 -0400)]
LU-6215 llite: file->f_dentry no longer exist

In newer kernels file->f_dentry no long exist.
Convert the recent changes that used file->f_dentry
to use the proper file_path.dentry. This time
add a checkpatch warning so this can be avoided
in the future.

Change-Id: I5b0c54f3fd80d548c5fa527a3edf95ef03f97122
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16119
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7057 utils: use stronger flags when opening volatile files 26/16126/2
John L. Hammond [Fri, 28 Aug 2015 18:03:52 +0000 (13:03 -0500)]
LU-7057 utils: use stronger flags when opening volatile files

Existing files with volatile-ish names may be accidentally opened by
llapi_create_volatile(). This is not the intent so disallow this
behavior by adding O_EXCL and O_NOFOLLOW to the flags to open().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4246ec7660b154ea2aeca6c28a4704ddd9d429f8
Reviewed-on: http://review.whamcloud.com/16126
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
8 years agoLU-7072 tests: disable sanityn test 78 64/16164/4
Oleg Drokin [Tue, 1 Sep 2015 18:23:18 +0000 (14:23 -0400)]
LU-7072 tests: disable sanityn test 78

It looks there is a race in this test that makes it to fail often.
The fix itself is useful so I am disabling the test for now
and hope for a quick fix to the test itself.

Change-Id: Iee70b59d0d2dc98bc8542b8e8848da9bd964c841
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/16164
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6968 llog: Only update necessary part of header 05/15905/6
wang di [Wed, 5 Aug 2015 08:03:42 +0000 (01:03 -0700)]
LU-6968 llog: Only update necessary part of header

During llog_cancel_rec(), only update the part of header,
instead of the whole header, otherwise it might need pack
the whole header (32KB) into the RPC for each record
cancellation.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I1e6e04b5b725ca8ed500b6c4d767719d7ff5f658
Reviewed-on: http://review.whamcloud.com/15905
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7049 osp: Not attr_get for new OSP object 02/16102/2
wang di [Tue, 25 Aug 2015 11:42:46 +0000 (04:42 -0700)]
LU-7049 osp: Not attr_get for new OSP object

Do not do attr_get for new OSP object, to save
RPC between MDTs.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Iecc0fde64f076b28c752294c8b403693fe26e43a
Reviewed-on: http://review.whamcloud.com/16102
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6215 client: cancel_dirty_page revival 69/16069/4
James Simmons [Tue, 25 Aug 2015 22:12:10 +0000 (18:12 -0400)]
LU-6215 client: cancel_dirty_page revival

For linux kernel version 4.2 we see the return of the
function cancel_dirty_page() except it does not take
the second argument anymore. This happened in linux
commit 11f81becca04bb7d2826a9b65bb8d27b0a1bb543.

Change-Id: If3156dddcc2f104f128ce5b76ed9839d97054448
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16069
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6356 ptlrpc: do not switch out-of-date context 08/15708/3
Sebastien Buisson [Thu, 23 Jul 2015 11:37:37 +0000 (13:37 +0200)]
LU-6356 ptlrpc: do not switch out-of-date context

When trying to replace a dead sec context with a new one, we must
ensure the new context is already up-to-date.
If it is not the case, just return from sptlrpc_req_replace_dead_ctx()
and come later when the new context has been updated.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I3b0862f838b917b568e08d46a24581a39c9459c1
Reviewed-on: http://review.whamcloud.com/15708
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6999 osp: disable xattr cache for mdt obj 74/15974/4
wang di [Tue, 11 Aug 2015 12:23:34 +0000 (05:23 -0700)]
LU-6999 osp: disable xattr cache for mdt obj

Because ldlm lock is missing for xattr cache on OSP obj,
let's Disable xattr cache for remote MDT object.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4a7fa5f13791d531309f380f9e9303d04816c6a9
Reviewed-on: http://review.whamcloud.com/15974
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@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>
8 years agoNew tag 2.7.59 2.7.59 v2_7_59 v2_7_59_0
Oleg Drokin [Tue, 1 Sep 2015 01:32:56 +0000 (21:32 -0400)]
New tag 2.7.59

Change-Id: I98e4ec8cc33ab31ab36e386884748770b0850fde
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6974 util: set max_sectors_kb properly 16/16116/5
Andreas Dilger [Fri, 28 Aug 2015 19:48:28 +0000 (13:48 -0600)]
LU-6974 util: set max_sectors_kb properly

Reduce max_sectors_kb to avoid crash on some special block devices.

Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes,ENABLE_QUOTA=yes  mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs  ostfilesystemtype=ldiskfs clientdistro=el7 ossdistro=el7  mdsdistro=el7 mdtcount=1 testlist=runtests
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ifc7efd169f0db0b54c3f727fc65716c203930e29
Reviewed-on: http://review.whamcloud.com/16116
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6903 lov: call lov_object_find_cbdata() inside lock 48/15748/3
Jinshan Xiong [Mon, 27 Jul 2015 17:52:13 +0000 (10:52 -0700)]
LU-6903 lov: call lov_object_find_cbdata() inside lock

It should be called inside layout type lock otherwise the layout may
change and hit assertion.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I61d8c2a4f770ee0b05428ac763fc0d0db833f289
Reviewed-on: http://review.whamcloud.com/15748
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6749 lod: properly remove proc entry 11/16011/2
Bobi Jam [Tue, 18 Aug 2015 04:34:52 +0000 (12:34 +0800)]
LU-6749 lod: properly remove proc entry

After remove lod_device::lod_symlink proc entry, reset it to NULL.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4b4a871a7c6d9b5b3913d18c8d392a9c0345f919
Reviewed-on: http://review.whamcloud.com/16011
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6667 llite: improve ll_getname 89/15089/11
Oleg Drokin [Mon, 24 Aug 2015 15:40:08 +0000 (11:40 -0400)]
LU-6667 llite: improve ll_getname

strncpy_from_user could return negative values on error,
so need to take those into account.
Since ll_getname is used to get a single component name from userspace
to transfer to server as-is, there's no need to allocate 4k buffer
as done by __getname. Allocate NAME_MAX+1 buffer instead to ensure
we have enough for a null terminated max valid length buffer.

Change-Id: I9ce50d33864c7efd6fd019b592199f4fcf75410c
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/15089
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
8 years agoLU-6215 libcfs: handle topology_thread_cpumask rename 49/16049/3
James Simmons [Tue, 25 Aug 2015 19:24:56 +0000 (15:24 -0400)]
LU-6215 libcfs: handle topology_thread_cpumask rename

For linux kernel version 4.2 we see topology_thread_cpumask get
renamed in commit 06931e62246844c73fba24d7aeb4a5dc897a2739.
This patch handles this rename.

Change-Id: I7437be9a086a38762346e271b346059ccfa13a8c
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/16049
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6245 libcfs: remove linux-utils.c 10/15910/5
James Simmons [Mon, 24 Aug 2015 20:49:25 +0000 (16:49 -0400)]
LU-6245 libcfs: remove linux-utils.c

The source file linux-utils.c contains only empty
functions of features that were never implemented.
We can delete this unused code.

Change-Id: Id5820a94d15b055096544120fb14b987604e733c
Signed-off-by: frank zago <fzago@cray.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/15910
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6912 lnet: rework autoconf rules for external OFED 11/15811/4
Dmitry Eremin [Thu, 30 Jul 2015 20:44:38 +0000 (23:44 +0300)]
LU-6912 lnet: rework autoconf rules for external OFED

Remove extra checks for OFED development headers location because of
issue on Ubuntu.

Check for O2IBPATH/include/linux/compat_autoconf.h in modern OFEDs and
automatically generate CONFIG_COMPAT_RHEL_*_* for RHEL distributive if
it absent.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I6d21266bceca61504c0cca2d981f55ba22a85451
Reviewed-on: http://review.whamcloud.com/15811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5683 llite: Inform copytool of dataversion changes 77/14377/2
Henri Doreau [Tue, 7 Apr 2015 13:10:12 +0000 (15:10 +0200)]
LU-5683 llite: Inform copytool of dataversion changes

Notify copytool that a file could not be archived due to dataversion
change. This does not introduce any functional change but ensures
that errors are consistently reported in copytool logs.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I0608a0ed06cf5d45eb140ac3e32e2b58baafdf0e
Reviewed-on: http://review.whamcloud.com/14377
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6673 ptlrpc: Forbid too early NRS policy tunings 04/15104/9
Henri Doreau [Tue, 2 Jun 2015 15:48:32 +0000 (17:48 +0200)]
LU-6673 ptlrpc: Forbid too early NRS policy tunings

Wait for a NRS policy to be fully started before allowing
to apply related tunings, so that all fields are properly
initialized.

Add corresponding test to sanityn.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I92df8f55aebd173a26979e9a506c45f985107d8a
Reviewed-on: http://review.whamcloud.com/15104
Tested-by: Jenkins
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6158 mdt: always shrink_capsule in getxattr_all 24/13524/9
Sergey Cheremencev [Fri, 23 Jan 2015 13:52:01 +0000 (17:52 +0400)]
LU-6158 mdt: always shrink_capsule in getxattr_all

When mdt_getxattr_one returns error, capsule should be
shrunk to zero before exit in mdt_getxattr_all.

Change-Id: I060fd74177b5d7647581bda9cdb83937ab6a74a8
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Xyratex-bug-id: MRP-2340
Reviewed-on: http://review.whamcloud.com/13524
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-4647 tests: clean up sanity-sec code style issues 69/14769/6
Andreas Dilger [Mon, 11 May 2015 23:54:26 +0000 (17:54 -0600)]
LU-4647 tests: clean up sanity-sec code style issues

Minor cleanups in sanity-sec coding style seen during code review:
- fix indentation to use tabs
- don't continue strings with open quotes (adds indent to string)
- remove unnecessary linefeed escapes
- replace subshells with backquotes `...` to use $(...)

Remove no-op test_3(), as it is superceded by nodemaps.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If96e3ddee723747987ca5309e982e36af202fb26
Reviewed-on: http://review.whamcloud.com/14769
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
8 years agoLU-4340 tests: Correct conf-sanity test 69 66/15966/11
James Nunez [Wed, 12 Aug 2015 17:43:47 +0000 (11:43 -0600)]
LU-4340 tests: Correct conf-sanity test 69

conf-sanity test 69 can fail due to creating more files than
available inodes on the first OST. We need to create the same number
of files, but in small numbers and remove them after creation.
Removing the newly created files will help in small OST environments
like the conf-sanity environment. If the LAST_ID is already greater
than 5 * OST_MAX_PRECREATE, just perform the OST replacement.

Test-Parameters: envdefinitions=SLOW=yes testlist=conf-sanity

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I565b7d81c1817e4ee14f85314990b85ba8c844f1
Reviewed-on: http://review.whamcloud.com/15966
Tested-by: Jenkins
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
8 years agoLU-6873 lod: duplicate mutex unlock 67/16067/2
wang di [Sat, 22 Aug 2015 21:14:07 +0000 (14:14 -0700)]
LU-6873 lod: duplicate mutex unlock

Remove duplicate mutex unlock in lod_add_device().

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ibe73bf39a18ef96ecab10605d479e7b6ed97b397
Reviewed-on: http://review.whamcloud.com/16067
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
8 years agoLU-6210 lnet: Use C99 initializers for struct netstrfns 88/15088/13
James Simmons [Mon, 24 Aug 2015 14:59:29 +0000 (10:59 -0400)]
LU-6210 lnet: Use C99 initializers for struct netstrfns

Update struct netstrfns to use C99 initializers.

Remove old LND types from the netstrfns table, as they are
long obsolete and shouldn't be needed even for interop anymore.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I22cd2d770e0872de343af249d13bf0f56f8a4a7d
Reviewed-on: http://review.whamcloud.com/15088
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6970 llog: free thandle if declare failed 51/15951/2
Hongchao Zhang [Tue, 19 May 2015 20:38:24 +0000 (04:38 +0800)]
LU-6970 llog: free thandle if declare failed

in llog_osd_put_cat_list, the "thandle" should be cleaned up
if the following "declare" operation failed.

Change-Id: I0befba0068cb91fe685502f1e833c2fb6d6477bd
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/15951
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-3534 tests: a few tests cases for async update. 63/15163/14
wang di [Fri, 31 Jul 2015 11:55:19 +0000 (04:55 -0700)]
LU-3534 tests: a few tests cases for async update.

1 Add update migrate test case in conf-sanity.sh 32c.
2. add replay-dual.sh 26 to failover during tar and dbench.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I1431bfe8d076a16802d9bba7ca3a7b9d47745f5c
Reviewed-on: http://review.whamcloud.com/15163
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6880 update: after reply move dtrq to finish list 82/15682/8
wang di [Mon, 20 Jul 2015 17:36:52 +0000 (10:36 -0700)]
LU-6880 update: after reply move dtrq to finish list

update replay request (dtrq) will be moved to a replay
finish list after update replay is finished, so if
client send the replay request with the same transno,
it can check if the request has been redone by update
replay.

And same as normal replay, update replay should also
update obd_next_recovery_transno.

Add 70c replay single test cases to verify this.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I2fae2a6f8264f55d069997e23a50e71b6a9f39db
Reviewed-on: http://review.whamcloud.com/15682
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6840 target: update reply data after update replay 76/15576/13
wang di [Mon, 20 Jul 2015 17:45:58 +0000 (10:45 -0700)]
LU-6840 target: update reply data after update replay

Set correct value to tgt_session_info, so tgt_txn_stop_cb()->
tgt_last_rcvd_update() can be called during update replay, and
the reply and and last_rcvd can be updated during update
replay.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I32e5b2a7d30aecfb1a20b8d31a0054a3c28ccd50
Reviewed-on: http://review.whamcloud.com/15576
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6947 ptlrpc: Remove stray comment in ptlrpc_start_pinger 38/15838/2
Oleg Drokin [Tue, 4 Aug 2015 01:05:17 +0000 (21:05 -0400)]
LU-6947 ptlrpc: Remove stray comment in ptlrpc_start_pinger

The comment references cfs_daemonize times when daemonize took
process clone flags. There's no such thing anymore, so
let's drop the comment to not to cause any additional confusion.

Change-Id: I9398f97f604cb70486f6a9b3f9d80360a66c1555
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/15838
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6356 ptlrpc: do not sleep if encpool reached max capacity 70/15070/4
Sebastien Buisson [Fri, 29 May 2015 13:20:41 +0000 (15:20 +0200)]
LU-6356 ptlrpc: do not sleep if encpool reached max capacity

When using krb5p Kerberos flavor, RPCs are encrypted just before being
sent. This encryption requires allocating memory in the encoding pool.
The current implementation in sptlrpc_enc_pool_get_pages() is
deadlock-prone. Indeed, if there is no more free pages in the pool,
all ptlrpcd threads can end up waiting in a queue, so there is no
thread available to process other requests. It means client is not
able to process replies from servers that yet contain last committed
transno useful to release memory allocated by previous requests,
including enc_pool pages.

To fix this, in sptlrpc_enc_pool_get_pages(), do not make ptlrpcd
threads wait in queue if encoding pool has already reached its maximum
capacity. Instead, return -ENOMEM. If functions calling ptl_send_rpc()
get -ENOMEM, then put back request in queue by moving it back to
RQ_PHASE_NEW phase.
As an optimization, do not call ptl_send_rpc() again for requests that
already failed to allocate in the enc_pool, as long as there is not
enough memory in the enc_pool to satisfy theirs needs.

In /proc/fs/lustre/sptlrpc/encrypt_page_pools, add a new 'out of mem'
stat to track how many requests fail to allocate memory in the
enc_pool.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ie4217bb15c8514d28d360e50a9be7716b52f5147
Reviewed-on: http://review.whamcloud.com/15070
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6400 osd: initialize variable before use 08/16008/4
Yang Sheng [Tue, 25 Aug 2015 08:35:36 +0000 (16:35 +0800)]
LU-6400 osd: initialize variable before use

ldisk_bread use a pointer return error value. But not
initialized it. So maybe return a random value even in
normal case.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I2ab424b285003c85b63dbea0b787b606fc368245
Reviewed-on: http://review.whamcloud.com/16008
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7028 tgt: initialize spin lock in tgt_init() 45/16045/2
Ashish Purkar [Thu, 20 Aug 2015 20:17:24 +0000 (05:17 +0900)]
LU-7028 tgt: initialize spin lock in tgt_init()

The spin lock lut_client_bitmap_lock was not initialized in
tgt_init().

Signed-off-by: Ashish Purkar <ashish.purkar@seagate.com>
Change-Id: I3118bc1c007d0f2b9919be17f4a429ed164f7c6c
Reviewed-on: http://review.whamcloud.com/16045
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Grégoire Pichon <gregoire.pichon@bull.net>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6742 mdd: remove legacy compatibility code 95/13395/9
Alex Zhuravlev [Wed, 14 Jan 2015 06:30:14 +0000 (09:30 +0300)]
LU-6742 mdd: remove legacy compatibility code

that specific code was needed to upgrade from Orion-formatted
filesystem.

Change-Id: I2b01244a8d706f1acd6b32bcf69ffb2f0e498cd8
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/13395
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-5623 osd-ldiskfs: fix typo in lost+found repair item 25/16025/2
Andreas Dilger [Wed, 19 Aug 2015 03:00:40 +0000 (21:00 -0600)]
LU-5623 osd-ldiskfs: fix typo in lost+found repair item

Fix a typo in lr_repaired (was lr_reparied) and fix the test script
that checks it to allow both spellings for interop testing with
older servers.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: If1c4c6246143f874a0d2de6434f5c89c67469053
Reviewed-on: http://review.whamcloud.com/16025
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6990 lproc: set parameter nosquash_nids correctly 85/15985/2
Emoly Liu [Thu, 13 Aug 2015 12:23:59 +0000 (20:23 +0800)]
LU-6990 lproc: set parameter nosquash_nids correctly

Fix the code to set parameter nosquash_nids correctly by echo command,
no matter with "-n" option or not.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ia4bf1ce32d76d4acd90aab5b799780e5e256cc29
Reviewed-on: http://review.whamcloud.com/15985
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6962 lnet: remove old unsupported OFEDs checks 64/15864/4
Dmitry Eremin [Wed, 5 Aug 2015 15:41:50 +0000 (18:41 +0300)]
LU-6962 lnet: remove old unsupported OFEDs checks

remove checks that are always true for supported OFEDs.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I904dca06f3136334bb317de1288852e6ac4f92c7
Reviewed-on: http://review.whamcloud.com/15864
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6913 test: fix conf-sanity test_30b defect 72/15772/4
Elena Gryaznova [Tue, 28 Jul 2015 13:56:27 +0000 (16:56 +0300)]
LU-6913 test: fix conf-sanity test_30b defect

test_30b does not take into account a failover nid set
before test started, which leads test always fails
on the setup with $ost1failover_HOST != $ost1_HOST;
Patch fixes this defect.

Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Seagate-bug-id: MRP-2749
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Change-Id: I2f7f163b84e4203ffa0ab12bc18b9d7ac535ec37
Reviewed-on: http://review.whamcloud.com/15772
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
8 years agoLU-6875 update: set st to NULL in error handler 91/15691/8
wang di [Tue, 21 Jul 2015 13:27:24 +0000 (06:27 -0700)]
LU-6875 update: set st to NULL in error handler

In thandle_get_sub_by_dt, if create sub thandle fails,
it should reset st to NULL, otherwise st, whose value
is ERR_PTR(rc), might be freeed incorrectly in the
following error handler path.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I7262593fa5aa6bc3f0ed418aaa5637e84077088b
Reviewed-on: http://review.whamcloud.com/15691
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5319 tests: testcases for multiple modify RPCs feature 61/14861/17
Gregoire Pichon [Thu, 30 Jul 2015 06:27:34 +0000 (23:27 -0700)]
LU-5319 tests: testcases for multiple modify RPCs feature

This patch creates new testcases in the Auster test suite to
test the support of multiple modify RPCs in flight feature.

Two new OBD_FAIL codes are added to allow several failure occurences
of the reint requests or replies. This is needed because the current
fail checks impose the OBD_FAIL_ONCE flag.

Added testcases are :
- sanity         245
- conf-sanity    90a 90b 90c 90d
- replay-single  102a 102b 102c 102d

This patch also removes replay-single tests 53a and 53b
from the ALWAYS_EXCEPT list.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I3cd233d5ef67a696e830c77b154dcc01520bb3d2
Reviewed-on: http://review.whamcloud.com/14861
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
8 years agoLU-6480 o2iblnd: leak cmid in kiblnd_dev_need_failover 03/14603/2
Liang Zhen [Mon, 27 Apr 2015 02:49:41 +0000 (10:49 +0800)]
LU-6480 o2iblnd: leak cmid in kiblnd_dev_need_failover

cmid created by kiblnd_dev_need_failover should always be destroyed,
however it is not the case in current implementation and we will leak
cmid when this function detected a device failover.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Icc567593f50fd557d5a7d1642a65d4fe49e8b4c2
Reviewed-on: http://review.whamcloud.com/14603
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6213 llite: add LL_IOC_FUTIMES_3 65/13665/5
John L. Hammond [Thu, 5 Feb 2015 23:35:08 +0000 (17:35 -0600)]
LU-6213 llite: add LL_IOC_FUTIMES_3

Add a new regular file ioctl LL_IOC_FUTIMES_3 similar to futimes() but
which allows setting of all three inode timestamps. Use this ioctl
during HSM restore to ensure that the volatile file has the same
timestamps as the file to be restored. Strengthen sanity-hsm test_24a
to check that archive, release, and restore do not change a file's
ctime. Add sanity-hsm test_24e to check that tar will succeed when it
encounters a HSM released file.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I98a4913048f902892fdafc514547bbe4d51523d7
Reviewed-on: http://review.whamcloud.com/13665
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-5149 utils: Create debug upcall to dump ldlm namespaces 17/10617/6
Ryan Haasken [Thu, 5 Jun 2014 21:51:59 +0000 (16:51 -0500)]
LU-5149 utils: Create debug upcall to dump ldlm namespaces

Created a script to be used as the debug_log_upcall which will dump
ldlm namespace information in raw/binary format and append it to the
given debug log file.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I69f08f1b9563024c962f0213fd47a95b33b7da23
Reviewed-on: http://review.whamcloud.com/10617
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6600 obdclass: race lustre_profile_list 96/14896/7
Hiroya Nozaki [Thu, 20 Aug 2015 05:37:23 +0000 (14:37 +0900)]
LU-6600 obdclass: race lustre_profile_list

running multiple mounts at the same time results in
lustre_profile_list corruption when adding a new profile.

This patch adds a new spin_lock to protect the list and
avoid the bug

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Change-Id: I0d6ef47e9fa3dd9de8bd33d426112242136a9e26
Reviewed-on: http://review.whamcloud.com/14896
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6819 update: update transno of replay properly 94/15594/9
wang di [Mon, 20 Jul 2015 18:19:33 +0000 (11:19 -0700)]
LU-6819 update: update transno of replay properly

Do not update master transno when the update request
in the replay list, otherwise it will affect the order
of the replay list.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I73709be714724c36f34ff64f8eabf4c2bec1112d
Reviewed-on: http://review.whamcloud.com/15594
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-589 auster: Export 'CONFIG' environment variable. 51/2051/4
Chris Horn [Wed, 16 Apr 2014 14:39:01 +0000 (09:39 -0500)]
LU-589 auster: Export 'CONFIG' environment variable.

The 'CONFIG' variable defines the accsm configuration file. This
variable needs to be exported so that test-suite scripts use the
appropriate accsm configuration.

Change-Id: Ia0fdb4014d6eeefc3e08dced3d843427756c8587
Signed-off-by: Chris Horn <hornc@cray.com>
Reviewed-on: http://review.whamcloud.com/2051
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
8 years agoLU-4499 nrs: adjust the order of REQ NRS initilization 43/15943/5
Jinshan Xiong [Tue, 11 Aug 2015 02:14:21 +0000 (19:14 -0700)]
LU-4499 nrs: adjust the order of REQ NRS initilization

NRS block of ptlrpc_request must be initialized before it is added
into exp_{hp,reg}_list; otherwise ptlrpc_nrs_req_hp_move() may access
uninitialized NRS block. Code cleanup.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ide1d7edfa5e09bf498baaa60023dbccf3fb152dc
Reviewed-on: http://review.whamcloud.com/15943
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6757 ldiskfs: acquire i_mutex lock for ext4_update_i_disksize 12/16012/3
Jian Yu [Mon, 24 Aug 2015 06:03:02 +0000 (23:03 -0700)]
LU-6757 ldiskfs: acquire i_mutex lock for ext4_update_i_disksize

For RHEL 7.1 kernel version 3.10.0, i_mutex lock needs to be acquired
before calling ext4_update_i_disksize() to avoid races with truncate.

i_size_write() also needs locking around it (normally i_mutex), otherwise
on 32bit/SMP an update of i_size_seqcount can be lost, resulting in
subsequent i_size_read() calls spinning forever.

For large EA support, ext4_xattr_check_names() will return -EIO. This
patch fixes that by checking whether the large EA value is saved in an
external EA inode or not.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I095246cc1f7457defe87ca246edf98bbc051bc29
Reviewed-on: http://review.whamcloud.com/16012
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
8 years agoLU-6894 kernel: new kernel RHEL6.7 [2.6.32-573.3.1.el6] 01/15701/11
Bob Glossman [Wed, 22 Jul 2015 18:45:13 +0000 (11:45 -0700)]
LU-6894 kernel: new kernel RHEL6.7 [2.6.32-573.3.1.el6]

Add target and config files for new kernel in RHEL 6.7
Revise lbuild to add RHEL 6.7
Add new ldiskfs patch series for RHEL 6.7,
similar to 6.6 but without the
ext4-drop-inode-from-orphan-list-if-ext4_delete_inode-fails.patch
That change is now already present in the 6.7 version of ext4.

Test-Parameters: mdsdistro=el6.7 ossdistro=el6.7 \
  clientdistro=el6.7 mdsfilesystemtype=ldiskfs \
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs \
  testgroup=review-ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I09496b03b030fc678422a8d027ee185b8a660611
Reviewed-on: http://review.whamcloud.com/15701
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7033 utils: Add missing calls to wirecheck 59/16059/2
Henri Doreau [Mon, 24 Aug 2015 09:08:12 +0000 (11:08 +0200)]
LU-7033 utils: Add missing calls to wirecheck

The following functions were defined but never called:
    check_update_params
    check_update_op
    check_update_ops
    check_update_records
    check_llog_update_record

Change-Id: Ic1d12f5f422a01cf886432348d5c6c80ab19d1a5
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: http://review.whamcloud.com/16059
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-7025 lfsck: Invalid return value assignment 42/16042/2
Fan Yong [Wed, 15 Jul 2015 03:24:47 +0000 (11:24 +0800)]
LU-7025 lfsck: Invalid return value assignment

In lfsck_layout_scan_stripes(), the following code section:
                if (lso == NULL) {
                        struct lu_attr *attr = &info->lti_la;

                        rc = dt_attr_get(env, parent, attr);
                        if (rc != 0) {
                                rc = PTR_ERR(lso);
                                goto next;
                        }
                        ...
                }
When dt_attr_get() returns failure, we should NOT assign the
"rc" as "PTR_ERR(lso)", instead, just use the current "rc".

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8237e1f79588b54c73398f20bd833e81787bf4a6
Reviewed-on: http://review.whamcloud.com/16042
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
8 years agoLU-6997 mdt: enqueue nonblocking locks in migration 70/15970/4
wang di [Wed, 12 Aug 2015 06:37:20 +0000 (23:37 -0700)]
LU-6997 mdt: enqueue nonblocking locks in migration

During migration, it needs to lock all of parent objects
in the linkea of the migrating object, so these parent
objects can change the name entry after the migration.

But it is not easy to order these objects(in linkEA) in
parent-child order. To avoid deadlock, let's use
mdt_object_lock_try(), which will enqueue nonblocking
locks, i.e. once there are conflicting locks, the
migration will release all of locks then return -EBUSY.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id657cfd9d9caefaa7c699d5a5ca90604cf707ac0
Reviewed-on: http://review.whamcloud.com/15970
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>