Whamcloud - gitweb
fs/lustre-release.git
9 years agoLU-4830 tests: only deactivate MDTs of Lustre FSNAME 43/9843/4
Bruno Faccini [Fri, 28 Mar 2014 15:15:25 +0000 (16:15 +0100)]
LU-4830 tests: only deactivate MDTs of Lustre FSNAME

Problem has been discovered using a very specific copytool Lustre
root/archive usage. All MDCs, including archive one, were
deactivated.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I359e001e001b931e0a8ed773e0d476ffc3ea44db
Reviewed-on: http://review.whamcloud.com/9843
Reviewed-by: James Nunez <james.a.nunez@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>
9 years agoLU-4681 utils: Fix error message when using hostname 48/9848/4
Bobbie Lind [Fri, 28 Mar 2014 21:30:48 +0000 (15:30 -0600)]
LU-4681 utils: Fix error message when using hostname

When running llmount.sh for setting up and testing a filesystem
if the system does not have an accurate line in /etc/hosts the build
fails with a cryptic error message.

This patch adds a little more information to the error message
directing the admin to fix the /etc/hosts error.

Signed-off-by: Bobbie Lind <bobbie.j.lind@intel.com>
Change-Id: I426c1f05d2ab5dedc56bd587072882cf78c1bd43
Reviewed-on: http://review.whamcloud.com/9848
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4934 tests: Account for slow ZFS in sanity-lfsck/9a-b 40/10140/2
Nathaniel Clark [Mon, 28 Apr 2014 22:14:06 +0000 (18:14 -0400)]
LU-4934 tests: Account for slow ZFS in sanity-lfsck/9a-b

Allow lfsck speed to be too slow with ZFS due to it's performance
issues.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id39d9468327a02b648ba2c8b4b131250946a04b1
Reviewed-on: http://review.whamcloud.com/10140
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@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>
9 years agoLU-4849 lfs: Avoid double closedir() on err from cb_mv_init() 05/9905/2
Swapnil Pimpale [Mon, 7 Apr 2014 17:19:09 +0000 (13:19 -0400)]
LU-4849 lfs: Avoid double closedir() on err from cb_mv_init()

In cb_mv_init(), set *dirp to NULL if the parent cannot be opened.
This will avoid a double free when closedir() is called a second
time on the way out of llapi_semantic_traverse()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I115137f01cd4e370f4ef766028ad9269e85ed10a
Reviewed-on: http://review.whamcloud.com/9905
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-4952 osd: wrong paramters for dmu_tx_hold_write 79/10079/2
Liang Zhen [Thu, 24 Apr 2014 12:19:53 +0000 (20:19 +0800)]
LU-4952 osd: wrong paramters for dmu_tx_hold_write

osd_declare_write_commit may pass wrong parameters to
dmu_tx_hold_write when there are multiple IO fragments.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Ic7bd5ce1f42e7777c1a07eb4b9d19f8477da66a0
Reviewed-on: http://review.whamcloud.com/10079
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
9 years agoLU-4951 scripts: report modules changes in dkms RPM config 90/10090/2
Bruno Faccini [Thu, 24 Apr 2014 22:17:38 +0000 (00:17 +0200)]
LU-4951 scripts: report modules changes in dkms RPM config

lvfs.ko and nodemap.ko have been respectively removed and added
from/to distro, so this needs to be accordingly reported into
the script that generates DKMS RPM configuration statically.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I917f79b134fb1d6be48b89c10faf531697fe1a9c
Reviewed-on: http://review.whamcloud.com/10090
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
9 years agoLU-3953 build: fix AC_LANG_SOURCE autoconf warnings 58/10158/2
Jeff Mahoney [Wed, 30 Apr 2014 02:58:52 +0000 (22:58 -0400)]
LU-3953 build: fix AC_LANG_SOURCE autoconf warnings

This fixes several places where the autoconf rules generate the
following warning:

configure.ac:23: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE
call detected in body

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: Ib6a54310853b1e9aa34155e8bec9aae410278f25
Reviewed-on: http://review.whamcloud.com/10158
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4629 lov: fix sscanf format specification 91/9391/4
Dmitry Eremin [Tue, 25 Feb 2014 21:06:20 +0000 (01:06 +0400)]
LU-4629 lov: fix sscanf format specification

sscanf format specification '%d' expects type 'int *' for 'd',
but parameter 3 has a different type '__u32*'

Length of format string "o%.5d" is 11 but array 'oname' of size 10.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I132ba4c4865cc12f831638edddb8d41e5fa2d273
Reviewed-on: http://review.whamcloud.com/9391
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>
9 years agoLU-4817 osd: fix some leXX_to_cpu() usage issues 25/9825/4
John L. Hammond [Thu, 27 Mar 2014 19:15:26 +0000 (14:15 -0500)]
LU-4817 osd: fix some leXX_to_cpu() usage issues

In osd fix some endianness conversion issues, like applying
le16_to_cpu() to an integer literal and calling le64_to_cpu() with a
32-bit value.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5c4b9b0c6f5695e1c34f8deac25f8a0c5d547e23
Reviewed-on: http://review.whamcloud.com/9825
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4676 hsm: Fix return value error of ct_run() 12/9412/3
Li Xi [Thu, 27 Feb 2014 07:58:18 +0000 (15:58 +0800)]
LU-4676 hsm: Fix return value error of ct_run()

ct_run() returns 0 after find out that fs_name is invalid.
lhsmtool_posix will exists with 0 after that error happens.
That might mislead scripts calling lhsmtool_posix.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: If167b38ffee0faff9d8eeb603c55b4972ba322d8
Reviewed-on: http://review.whamcloud.com/9412
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4930 llite: add error handler in inode prepare phase 70/10170/6
wang di [Wed, 30 Apr 2014 12:09:13 +0000 (05:09 -0700)]
LU-4930 llite: add error handler in inode prepare phase

Add error handler during inode inialization, so inode will
become bad inode if something bad happens during inode prepare
phase, otherwise the striped directory will not get its layout
and being mis-regarded as normal directory.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I1a08a18f28d4eec1ab7dc7e13fa39585ff65deeb
Reviewed-on: http://review.whamcloud.com/10170
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4423 style: Change comment to fit within 80 columns 21/10121/2
Oleg Drokin [Sun, 27 Apr 2014 01:43:31 +0000 (21:43 -0400)]
LU-4423 style: Change comment to fit within 80 columns

A statahead commend had too long lines. This needed to be
fixed in order to get the patch upstream

Change-Id: I4a899a36d83591195727847712232dfca26f2d35
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10121
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
9 years agoLU-4423 gss: fix checkpatch warning 18/10118/3
Oleg Drokin [Sat, 26 Apr 2014 20:40:06 +0000 (16:40 -0400)]
LU-4423 gss: fix checkpatch warning

sizeof *null_context_new is a bad coding style.

Change-Id: Ie71803940347bd4b92d502a547d046a065bb4387
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10118
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4944 osd: support for zfs-0.6.3 64/10064/6
Alex Zhuravlev [Wed, 23 Apr 2014 10:47:41 +0000 (14:47 +0400)]
LU-4944 osd: support for zfs-0.6.3

dsl_sync_task_nowait() replaces dsl_sync_task_do_nowait() and we have
to support the both versions: 0.6.2 and 0.6.3

Change-Id: I4e2e91eae40358e2cd68ab26107e51037c8fb09c
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/10064
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4981 tests: remount FS after writes to /proc 74/10174/6
wang di [Thu, 1 May 2014 11:20:12 +0000 (04:20 -0700)]
LU-4981 tests: remount FS after writes to /proc

We should remount FS after writes all proc entry in 133g,
because some upcall value under /proc will be assigned to
some gabarge value, which will cause failures in the
following test.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic120e19651a4a7897a6329a93feff1644c778286
Reviewed-on: http://review.whamcloud.com/10174
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoRevert "LU-2675 obd: decruft md_enqueue() and md_intent_lock()" 03/10203/2
Oleg Drokin [Sat, 3 May 2014 22:53:15 +0000 (22:53 +0000)]
Revert "LU-2675 obd: decruft md_enqueue() and md_intent_lock()"

This reintroduced back LU-4805, so reverting.

This reverts commit a2877f1f6c0fd0ec5ece836a216f42af3ef913da.

Change-Id: Id6728d4fa6a322a45579f0ce744d4c7161ac9d69
Reviewed-on: http://review.whamcloud.com/10203
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 obd: decruft md_enqueue() and md_intent_lock() 50/9850/4
John L. Hammond [Fri, 28 Mar 2014 23:38:37 +0000 (18:38 -0500)]
LU-2675 obd: decruft md_enqueue() and md_intent_lock()

Remove the lmm and lmmsize parameters from both functions, storing
that data in md_op_data when needed. Remove the unused lookup_flags
parameter from md_intent_lock(), and the unused reqp parameter from
md_enqueue(). Add a union ldlm_policy_data * parameter to
md_enqueue(). Remove the unused function lmv_enqueue_remote().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5c216b24d8ac824b9487c3296f18b7a8511285e3
Reviewed-on: http://review.whamcloud.com/9850
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4961 lustre: move ioctls to lustre_ioctl.h 39/10139/2
John L. Hammond [Mon, 28 Apr 2014 22:06:40 +0000 (17:06 -0500)]
LU-4961 lustre: move ioctls to lustre_ioctl.h

Move ioctl definitions and related functions from lustre_dlm.h,
lustre_lib.h, obd.h, to lustre_ioctl.h. Replace the definitions of
retired ioctls with comment. Remove inclusions of lustre_dlm.h,
lustre_lib.h, and obd.h in userspace, adding lustre_ioctl.h where
needed. Remove the uses of lov_stripe_md from jt_obd_create() in
lustre/utils/obd.c. Remove the unused commands obdio and obdbarrier.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I076ac84084ae3166e9b4525f2813510482523dc9
Reviewed-on: http://review.whamcloud.com/10139
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
9 years agoLU-4423 ptlrpc: Fix function prototypes 20/10120/2
Oleg Drokin [Sun, 27 Apr 2014 01:41:23 +0000 (21:41 -0400)]
LU-4423 ptlrpc: Fix function prototypes

ptlrpc_request_cache_init and ptlrpc_request_cache_fini
added by request cache code did not include argument type
in the declaration which causes a checkpatch warning.

Change-Id: I41f4f96cfbc9e63417b6adbe6ba1902248494fbb
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10120
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4423 gss: Fix typo in sec_gss.c 19/10119/2
Oleg Drokin [Sat, 26 Apr 2014 20:43:33 +0000 (16:43 -0400)]
LU-4423 gss: Fix typo in sec_gss.c

This patch fixes spelling typos in comments within sec_gss.c

Came from upstream from Masanari Iida <standby24x7@gmail.com>
commit 08c4c90dc2cfb719b787b39fb9cab9880b60d779

Change-Id: Ibf3543745cc0932a3a560cc274edf95a7411198d
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10119
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4954 mdd: validate names before create, link, and rename 11/10111/2
John L. Hammond [Fri, 25 Apr 2014 23:00:48 +0000 (18:00 -0500)]
LU-4954 mdd: validate names before create, link, and rename

In lu_name_is_valid() check that the length of the ln_name is equal to
ln_namelen and check that there are no embedded slashes. Add
mdd_name_check() which calls lu_name_is_valid() and check against the
mdd ENAMETOOLONG limit. Call mdd_name_check() from
mdd_create_sanity_check(), mdd_link_sanity_check() and mdd_rename().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I66413b796177f042fc9bd87e98338de9e5125cae
Reviewed-on: http://review.whamcloud.com/10111
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-20 kernel: remove rest of obsolete kernel patches 99/9199/3
James Simmons [Mon, 10 Feb 2014 19:49:35 +0000 (14:49 -0500)]
LU-20 kernel: remove rest of obsolete kernel patches

Remove several patches that have not been used in some time.
The bio_add_page patch addressed an performance issue with
SLES11 SP1 1.8 servers with direct IO. All platforms have
support for 64 bit quota so we can remove the patch to enable
it on old SLES11 platforms. We no longer need the function
security_inode_unlink exported since the fsfilt layer has now
been removed.

Change-Id: I6a2d324950ba8e51f3d7785016d9834f6b26aafd
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9199
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
9 years agoLU-4008 mdt: update mdt_getattr comments about EA sizing 41/10141/2
Oleg Drokin [Tue, 29 Apr 2014 00:57:53 +0000 (20:57 -0400)]
LU-4008 mdt: update mdt_getattr comments about EA sizing

After landing previous patches, some comments became out of date
This patch tries to rectify the situation and also adds some
additional explanations.

Change-Id: Ic3fb33ec60f7ae083ecae84cd207d2c10b95f965
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10141
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
9 years agoLU-2177 ldlm: flock completion fixes. 05/10005/4
Vitaly Fertman [Fri, 25 Apr 2014 22:58:25 +0000 (02:58 +0400)]
LU-2177 ldlm: flock completion fixes.

move checks for FAILED, DESTROYED flags under ldlm spinlock,
destroy flock atomically with the check it is not destroyed yet.

do not put the granted flock into the resource if this is
UNLOCK, TEST, or DEADLOCK'ed flock.

a set of flock tests which races reply completion for
new flock request/test flock/unlock with namespace cleanup
on eviction.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I97fa040a26eda6c6728929d10b29c2316db663e3
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1588
Reviewed-on: http://review.whamcloud.com/10005
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4858 ofd: statfs small fixes 82/10082/2
Lai Siyao [Thu, 24 Apr 2014 13:14:15 +0000 (21:14 +0800)]
LU-4858 ofd: statfs small fixes

ofd_osd is valid in its life time because ofd is released before
osd, so it should never be cleared.

revive o_statfs for ofd_obd_ops which was mistakenly removed in
commit I5622e14bccacb809bca1c10499c23bcaf72e2a68.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3cb6d82b71b3018b4fc9e885eb6533b064179238
Reviewed-on: http://review.whamcloud.com/10082
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4717 llite: suppress non active IO error message 58/9658/7
Bobi Jam [Fri, 14 Mar 2014 07:44:10 +0000 (15:44 +0800)]
LU-4717 llite: suppress non active IO error message

Current CLIO does not support fadvise, suppress the error message.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Iab3133ecc08cf0890ab3aa55018565d3d9f96e07
Reviewed-on: http://review.whamcloud.com/9658
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3227 tests: fix for acl test 07/10007/3
Yang Sheng [Fri, 18 Apr 2014 03:49:52 +0000 (11:49 +0800)]
LU-3227 tests: fix for acl test

acl permission test will failed by a wrong system
message. Change script to adapt this issue.
Combined with other small change for lprocfs.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I42d1e02c0f0990500b02085d60e2dc47f93f1bcc
Reviewed-on: http://review.whamcloud.com/10007
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-992 doc: remove old kernels from lustre/ChangeLog 86/8186/10
Andreas Dilger [Thu, 24 Oct 2013 08:21:10 +0000 (02:21 -0600)]
LU-992 doc: remove old kernels from lustre/ChangeLog

Remove the old and obsolete kernels from the current list of
kernel versions that Lustre works with, since this is confusing
to list kernels that are no longer supported at all.

Update kernel patch documentation to make it clear which patches
should be applied.

Update recommended e2fsprogs version to include "or newer".

Move ldiskfs README file to top-level directory.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ia4859b3b2bf5a8aa9faabeb43d554130143ebbe5
Reviewed-on: http://review.whamcloud.com/8186
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4556 tests: speed up sanity-lfsck and sanity-scrub tests 04/9704/18
Fan Yong [Fri, 28 Mar 2014 17:55:20 +0000 (01:55 +0800)]
LU-4556 tests: speed up sanity-lfsck and sanity-scrub tests

1) drop unnecessary devices reformat.
2) drop unnecessary system stop/re-start.
3) replace 'sleep' with wait_update_facet to avoid idle wait.
4) drop unnecessary "-p" option for some "mkdir" cases.
5) replace "touch" with "createmany -m".
6) other code style changes and cleanup.

Test-Parameters: envdefinitions=SLOW=yes testlist=lfsck-performance
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I047c63b8793fa843fabe1a69b332c42f2f523f68
Reviewed-on: http://review.whamcloud.com/9704
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4895 lfsck: not create object to repair dangling by default 89/9989/8
Fan Yong [Fri, 28 Mar 2014 17:48:03 +0000 (01:48 +0800)]
LU-4895 lfsck: not create object to repair dangling by default

If the OST-object which is referenced by some MDT-object does not
exist, the layout LFSCK should not create the lost OST-object by
default; otherwise related application(s) may miss to be aware of
the bad file.

The LFSCK will allow the administrator to specify how to handle
the dangling reference case via a new option "-c" when trigger
the LFSCK:

[-coff] or [--create_ostobj=off]:
Report the inconsistency via log, but keep the dangling reference
there without repairing. (by default)

-c[on] or --create_ostobj[=on]:
Create the lost OST-object.

Change syntax for dryrun:
[-noff] or [--dryrun=off]:
Disable dryrun mode. (by default)

-n[on] or --dryrun[=on]:
Enable dryrun mode.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8fa1e5bbea63c7368e04052c88311a9ea0c6f969
Reviewed-on: http://review.whamcloud.com/9989
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@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>
9 years agoRevert "LU-4924 llite: Only kill SGID/SUID bits" 51/10151/2
Oleg Drokin [Tue, 29 Apr 2014 17:57:19 +0000 (17:57 +0000)]
Revert "LU-4924 llite: Only kill SGID/SUID bits"

Did not notice that this introduces 100% failure all in itself.

This reverts commit 70c37954649fbc4fc2d0820d5d422f96144071f9.

Change-Id: If27762e2ffa9afc3857446a733ee3a8751fe6292
Reviewed-on: http://review.whamcloud.com/10151
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4924 llite: Only kill SGID/SUID bits 71/10071/2
Nathaniel Clark [Wed, 23 Apr 2014 21:39:46 +0000 (17:39 -0400)]
LU-4924 llite: Only kill SGID/SUID bits

Check that attr mode is valid before using it when determining if to
clear SGID and SUID bits in ll_setattr.
Add regression test.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2b221e80a5bb167f8670f376ce97d62d720ad857
Reviewed-on: http://review.whamcloud.com/10071
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
9 years agoLU-4920 quota: always clear lqe_lockh on lock cancel 65/9965/4
Niu Yawei [Wed, 16 Apr 2014 04:22:06 +0000 (00:22 -0400)]
LU-4920 quota: always clear lqe_lockh on lock cancel

In the qsd_id_blocking_ast(), lqe_lockh should always be cleared,
otherwise, quota code will mistakenly assume the id lock is still
valid.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Iac73216d130aebe1b73226d260807f3a9cedc635
Reviewed-on: http://review.whamcloud.com/9965
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4941 lfsck: check LOV EA header properly 45/10045/4
Fan Yong [Fri, 28 Mar 2014 17:47:07 +0000 (01:47 +0800)]
LU-4941 lfsck: check LOV EA header properly

1) If the LFSCK does not recognize the magic, then check whether
   the magic's postfix match the LOV_MAGIC_MAGIC or not: if yes,
   then it is quite possible that the system was downgraded from
   a new release with new LOV magic, so it is better to keep the
   current LOV EA unchanged; otherwise, it is crashed LOV EA and
   should be repaired by the LFSCK.

2) Check the pattern with lov_pattern().

3) Drop redundant LOV EA header verification.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iad3a1d6fc50a5dfba977a534fdb253bc9f6373e5
Reviewed-on: http://review.whamcloud.com/10045
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>
9 years agoLU-3333 ptlrpc: Protect request buffer changing 74/10074/3
Oleg Drokin [Mon, 27 May 2013 18:06:09 +0000 (14:06 -0400)]
LU-3333 ptlrpc: Protect request buffer changing

*_enlarge_reqbuf class of functions can change request body location
for a request that's already in replay list, as such a parallel
traverser of the list (after_reply -> ptlrpc_free_committed) might
access freed and scrambled memory causing assertion.

Since all such users only can get to this request under imp_lock, take
imp_lock to protect against them in *_enlarge_reqbuf

Change-Id: I0fa690aabd8696a9f05b94c66e06e30eefb5c759
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10074
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>
9 years agoLU-4557 ext4: recalc percpu counters after journal 08/9908/3
Hongchao Zhang [Sun, 6 Apr 2014 02:12:18 +0000 (10:12 +0800)]
LU-4557 ext4: recalc percpu counters after journal

the percpu counters is initialized before replaying the journal,
but after the journal it should be recalculate to deal with the
possibility of the percpu counters getting updated by the journal
replay.

the issue has been fixed in the new kernels (RHEL6 2.6.32-431.5.1,
SLES11SP3 3.0.101-0.15), then it is not needed for these kernels.

Change-Id: I5dfa0696b5ccd404b1add9ad6e2b0877d86a35b2
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/9908
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4569 hsm: Specify import source by FID. 75/9075/4
Henri Doreau [Fri, 31 Jan 2014 08:51:12 +0000 (09:51 +0100)]
LU-4569 hsm: Specify import source by FID.

Make the posix CT also accept a FID as import source parameter (from
which the path can be rebuilt) to allow easy "undeletion" of archived
files:

lhsmtool_posix --import <fid> /mnt/lustre/undelete ...

This patch also fixes a typo and replaces a bulky path construction by
a single asprintf() statement.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Id6d92bea59a6cae628c2b3e5449d8dad3b06a364
Reviewed-on: http://review.whamcloud.com/9075
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-4374 mgs: No modify during set_param is not an error 67/8567/7
Bruno Faccini [Mon, 27 Jan 2014 15:04:06 +0000 (16:04 +0100)]
LU-4374 mgs: No modify during set_param is not an error

Non negative return code from mgs_modify(), and particularly
1 for no-modify because already set, is wrongly interpreted as
an error with associated msgs in debug log and at user-level.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ieb058df406fd5e176cfe177a43dad0e6ebfbe78a
Reviewed-on: http://review.whamcloud.com/8567
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4669 type: change "%llx" to "LPX64” 11/9811/4
Jian Yu [Wed, 16 Apr 2014 08:04:57 +0000 (16:04 +0800)]
LU-4669 type: change "%llx" to "LPX64”

This patch fixes the following compile errors by using "LPX64”:
error: format '%llx' expects type 'long long unsigned int',
       but argument 5 has type '__u64'
error: format '%#llx' expects type 'long long unsigned int',
       but argument 3 has type '__u64'

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ica703160923e5f2b987217d97e623fe16eb667ad
Reviewed-on: http://review.whamcloud.com/9811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-4669 type: change "%Lu" and "%Lx" to "LPU64” and "LPX64" 21/9921/2
Jian Yu [Wed, 9 Apr 2014 14:01:14 +0000 (22:01 +0800)]
LU-4669 type: change "%Lu" and "%Lx" to "LPU64” and "LPX64"

"%Lu" and "%Lx" are not supported by standard C. This patch
fixes these formats with "LPU64" and "LPX64".

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ic10346575161c55b299cce6576029c16d59fe60f
Reviewed-on: http://review.whamcloud.com/9921
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-4783 mgs: start params log during mgs initialization 37/9737/6
Emoly Liu [Tue, 15 Apr 2014 07:16:53 +0000 (15:16 +0800)]
LU-4783 mgs: start params log during mgs initialization

Params log was introduced by LU-3155 to set parameters permanently
with lctl "set_param -P" instead of "conf_param". But in a newly
mounted filesystem, the log won't be created automatically until "lctl
set_param -P" is called. This causes that the other servers can't make
a local copy successfully during their setup, and the misleading
console error message "LustreError: 13a-8: Failed to get MGS log
params and no local copy." is printed.
This patch is to start params log during mgs intialization so that the
error message is quieted.
Also, test_76b is added to conf-sanity.sh to verify params log setup.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ifc3abc1e35ef20230a1be1cdf1c4cc8f57b2788e
Reviewed-on: http://review.whamcloud.com/9737
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 liblustre: disable liblustre by default 56/9756/6
John L. Hammond [Sat, 22 Mar 2014 01:01:52 +0000 (20:01 -0500)]
LU-2675 liblustre: disable liblustre by default

liblustre is not used, nor is it tested, so don't build it by default.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie2369d0163963d6e691b3787495b1b2155fe6111
Reviewed-on: http://review.whamcloud.com/9756
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4442 tests: update version number in replay-vbr test 7g 86/9986/2
Jian Yu [Thu, 17 Apr 2014 06:00:52 +0000 (14:00 +0800)]
LU-4442 tests: update version number in replay-vbr test 7g

Since the following patch was landed on Lustre b2_5 branch,
we need change Lustre version number 2.5.52 to 2.5.1 in
replay-vbr test_7g():

Lustre-commit: 1eb9dbad0db49a4fb36d52f4141386b29baaedaf
Lustre-change: http://review.whamcloud.com/9213

Test-Parameters: envdefinitions=SLOW=yes,ONLY=7 testlist=replay-vbr
Test-Parameters: envdefinitions=SLOW=yes,ONLY=7 \
ossjob=lustre-b2_5 mdsjob=lustre-b2_5 \
ossbuildno=42 mdsbuildno=42 testlist=replay-vbr

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I28a4b2de285c92cc3d5934a77ef792e11fc897ed
Reviewed-on: http://review.whamcloud.com/9986
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3963 libcfs: remove the last of cfs_atomic 02/9902/3
James Simmons [Sun, 6 Apr 2014 22:24:52 +0000 (18:24 -0400)]
LU-3963 libcfs: remove the last of cfs_atomic

With all cfs_atomic wrappers removed from lustre and libcfs
this patch removes the last bits of the cfs_atomic wrappers.

Change-Id: I8ede88fe45b7ddd82036b2f2a7907e4eb1604a5e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9902
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4718 osp: clear oxe_ready on old oxe 72/9672/2
John L. Hammond [Fri, 14 Mar 2014 18:37:41 +0000 (13:37 -0500)]
LU-4718 osp: clear oxe_ready on old oxe

In osp_xattr_get() and osp_declare_xattr_set() avoid NULL pointer
deferences in the error handling cases by clearing oxe_ready on the
old xattr cache entries.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I54f69e2d3e6570528e5a26bc9dd6e079a773a1a8
Reviewed-on: http://review.whamcloud.com/9672
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: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4461 mdt: correct test in mdt_seq_fini_cli() 86/8786/5
John L. Hammond [Thu, 9 Jan 2014 18:42:11 +0000 (12:42 -0600)]
LU-4461 mdt: correct test in mdt_seq_fini_cli()

In mdt_seq_fini_cli() pass ss->ss_server_seq to seq_server_set_cli()
if it's *not* NULL.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I494219416b772a33838dd4fb9303d6b9519050f9
Reviewed-on: http://review.whamcloud.com/8786
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-2675 mdd: remove dead code 48/8548/3
John L. Hammond [Wed, 11 Dec 2013 21:09:55 +0000 (15:09 -0600)]
LU-2675 mdd: remove dead code

Remove the declarations of several undefined mdd functions. Remove
several unused functions. Remove the file mdd_lov.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ife0d13ee414bd43c42389d9e58d9dd97344cb33c
Reviewed-on: http://review.whamcloud.com/8548
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4802 tests: Create non-stripe dir for cross-MDT opration 89/9889/2
Wei Liu [Fri, 4 Apr 2014 21:33:22 +0000 (14:33 -0700)]
LU-4802 tests: Create non-stripe dir for cross-MDT opration

Create non-stripe dir for cross-MDT link and rename

Change-Id: Ic4b6f836cae0242bdd98c9a39ae6c4f93f597cba
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/9889
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4563 Fix unsafe userspace access in many proc files 59/9059/16
Oleg Drokin [Sun, 6 Apr 2014 02:38:30 +0000 (22:38 -0400)]
LU-4563 Fix unsafe userspace access in many proc files

Also add a test to make sure no new ones are added in the future

Change-Id: I2fe7d2cea5daef21f4279ce813ca35f6d91f68dc
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9059
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4862 doc: Update lctl man page for LFSCK phase 2 10/9910/5
James Nunez [Tue, 8 Apr 2014 14:40:26 +0000 (08:40 -0600)]
LU-4862 doc: Update lctl man page for LFSCK phase 2

Update the lctl man page with functionality and options
added by LFSCK phase 2. The lfsck_start and lfsck_stop
options are updated.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I535faf92feb40cd0a58c6532ef7ad2702213fdfb
Reviewed-on: http://review.whamcloud.com/9910
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4388 io: pass fsync() range through RPC/IO stack 26/8626/15
Andreas Dilger [Thu, 19 Dec 2013 20:11:09 +0000 (13:11 -0700)]
LU-4388 io: pass fsync() range through RPC/IO stack

The Linux VFS and Lustre OST_SYNC RPC are both capable of specifying
fsync() on a sub-extent of the file {start, end} instead of the full
file.  This allows less than the full amount of data to be flushed,
reducing or possibly eliminating the work needed before the syscall
can return.

However, the handling of sub-extent of the file for fsync was lost
with the move to CLIO on the client and OSD API on the server.  They
were ignoring the passed {start, end} and using {0, OBD_OBJECT_EOF}
instead.

Return the ability to pass a sub-extent for fsync() from the client,
to the specific stripes/OSTs that need the sync operation, and pass
it down to the OSD.  The ZFS OSD doesn't handle this yet, but there
is room for improvement in a separate patch.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id2c3ab7ab5283cdeece6b4986ab2dfbfb03ebbe5
Reviewed-on: http://review.whamcloud.com/8626
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4855 fld: refer to MDT0 for fld lookup in some cases 77/9877/2
wang di [Wed, 2 Apr 2014 16:57:00 +0000 (09:57 -0700)]
LU-4855 fld: refer to MDT0 for fld lookup in some cases

It is possible that when fld client is trying to lookup seq
on one of MDT, but the connection between the client and the MDT
is not being initialized yet, especially during striped dir creation,
because client will only send create req to the master MDT, then
master MDT will distribute the operation to all of other MDT, instead
of client distributing these requests, which will usually trigger
the connection.

In this case, we will send the fld request to MDT0, since it has
all of location information.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I577ada2a782ecbdc863d05e8d007c0914a1e7837
Reviewed-on: http://review.whamcloud.com/9877
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4808 tests: sanity cleanup to work on Xeon Phi 66/9766/9
Dmitry Eremin [Mon, 24 Mar 2014 18:03:25 +0000 (22:03 +0400)]
LU-4808 tests: sanity cleanup to work on Xeon Phi

* Made the test_74c robust to different platforms.
* Fix an issue with values more than 2^32 (for example 9.36473e+09).
* Fix an integer comparison in case of empty variable.
* Check for tools presents (rsync and getfattr).
* Check for CLIENTONLY mode.
* Remove "-x" options from grep (it's not always supported).
* Coding style cleanup.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I53671f9a6ca2efa0a8f3e5634bfe4d6e8d204078
Reviewed-on: http://review.whamcloud.com/9766
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@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>
9 years agoLU-4351 tests: skip loop test in SLES11 clients 55/9955/4
Bob Glossman [Mon, 14 Apr 2014 22:07:10 +0000 (15:07 -0700)]
LU-4351 tests: skip loop test in SLES11 clients

Avoid known failure in test 54c due to SLES specific
incompatible implementation flaw in kernel loop devices.

Test-Parameters: clientdistro=sles11sp3 testlist=sanity
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ia8b33f71ad77418f35db4e4640489d1ba4d3add1
Reviewed-on: http://review.whamcloud.com/9955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoRevert "LU-3333 ptlrpc: Protect request buffer changing" 52/10052/3
Oleg Drokin [Tue, 22 Apr 2014 17:06:19 +0000 (17:06 +0000)]
Revert "LU-3333 ptlrpc: Protect request buffer changing"

It turns out that sec_null message format is is not double wrapped
like sec_plain and sec_gss cases. As such a conversion from rq_buf
to rq_msg is different in those cases.
The older way of doing in-place locking seems to be the way to go
here I think.

This reverts commit b2bb3b247d1dc75e25f1b5c14a333905909b5e70.

Change-Id: Icd84a696aafed17a275d0576dad639b929618190
Reviewed-on: http://review.whamcloud.com/10052
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4687 obdclass: unified flow control interfaces 62/9562/13
Fan Yong [Tue, 25 Mar 2014 14:16:12 +0000 (22:16 +0800)]
LU-4687 obdclass: unified flow control interfaces

Unify the flow control interfaces for MDC RPC, FLD RPC and lfsck
remote update (via OSP). We allow to adjust the maximum inflight
RPCs count via /proc interface.

Rename some variables/functions to make them easily understood.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I096a1de17fe226bac2fe3a3c891365c2e2c51ef3
Reviewed-on: http://review.whamcloud.com/9562
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4927 scrub: rebuild stale OST OI mapping 06/10006/3
Fan Yong [Tue, 25 Mar 2014 14:01:54 +0000 (22:01 +0800)]
LU-4927 scrub: rebuild stale OST OI mapping

If the osd_oi_lookup() which is called by osd_scrub_check_update()
returns -ESTALE for an OST FID, then it means that the target FID
has invalid OI mapping, and should be rebuilt.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I4087da9d3c8e18aff14e314af49637134ee8d4ff
Reviewed-on: http://review.whamcloud.com/10006
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
9 years agoLU-4919 lfsck: record the first failure position 85/9985/3
Fan Yong [Sun, 23 Mar 2014 00:11:34 +0000 (08:11 +0800)]
LU-4919 lfsck: record the first failure position

The layout LFSCK should set lfsck_layout::ll_pos_first_inconsistent,
then we can know where the first object to be fixed or failed to be
checked, which can save some effort when switch LFSCK from dryrun to
repair mode.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icd8f4bce6b75c07b1daeac36062b6736bb66c7fc
Reviewed-on: http://review.whamcloud.com/9985
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4653 fid: only compare non-IDIF seq in lu_fid_diff 60/9560/6
wang di [Fri, 7 Mar 2014 20:30:02 +0000 (12:30 -0800)]
LU-4653 fid: only compare non-IDIF seq in lu_fid_diff

Because it will pack OST index into IDIF FID in 2.6, and
in 2.4/2.5, the OST index in IDIF FID is always 0. So we
only compare non-IDIF sequence in lu_fid_diff.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I430210819c1cd7257094f51ef364f50d5291361c
Reviewed-on: http://review.whamcloud.com/9560
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-3953 build: cache the results of configure between runs 82/9582/7
Dmitry Eremin [Thu, 6 Mar 2014 07:53:03 +0000 (11:53 +0400)]
LU-3953 build: cache the results of configure between runs

This modification allow configure script cache the results of
heavy (required compilation) configure tests run on this system
so they can be shared between configure scripts and configure
runs, see configure's option --config-cache. This is very useful
for several configurations on the same machine with different
--enable/disable options.

The time of first clean pass:
  time ./configure -C
  real    1m9.879s
  user    0m33.390s
  sys     0m30.392s

The time of second pass with cached results:
  time ./configure -C
  real    0m10.190s
  user    0m2.900s
  sys     0m4.832s

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I41b8091331e8f5260262829ad3e24f34ee34c76b
Reviewed-on: http://review.whamcloud.com/9582
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2600 osd-zfs: batched object accounting 57/7157/18
Alex Zhuravlev [Sun, 28 Jul 2013 18:12:29 +0000 (22:12 +0400)]
LU-2600 osd-zfs: batched object accounting

using dsl_sync_task_do_nowait() we can schedule the updates
to be executed in a closing txg. this way object accounting
can be done in memory and then updated in ZAPs once per txg.

Test-Parameters: fortestonly envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity-quota
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Iebe96c9847c6c53b8232295a44fd8044b1ae18b4
Reviewed-on: http://review.whamcloud.com/7157
Tested-by: Jenkins
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
9 years agoLU-4826 lmv: cleanup req in lmv_getattr_name() 63/9863/3
John L. Hammond [Tue, 1 Apr 2014 19:24:49 +0000 (14:24 -0500)]
LU-4826 lmv: cleanup req in lmv_getattr_name()

In lmv_getattr_name() don't return a freed request in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I64f3e2b30bebe4dfb5f58651a92a3f08108af17b
Reviewed-on: http://review.whamcloud.com/9863
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3319 procfs: update ldiskfs proc handling to seq_files 32/8232/13
James Simmons [Tue, 25 Mar 2014 16:37:41 +0000 (12:37 -0400)]
LU-3319 procfs: update ldiskfs proc handling to seq_files

Migrate all ldiskfs proc handling to using strictly
seq_files. Also include a fix with newer gcc complaining
certain variables are uninitialized.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia296a4682e2feda02bcfbe0100de8a89404cd731
Reviewed-on: http://review.whamcloud.com/8232
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3319 procfs: move mgs proc handling to seq_files 35/7935/10
James Simmons [Tue, 4 Mar 2014 15:45:30 +0000 (10:45 -0500)]
LU-3319 procfs: move mgs proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the mgs
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I1a12dd9b1fc8f139116a8f3a684956a5ba88f055
Reviewed-on: http://review.whamcloud.com/7935
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4819 tests: Lustre Sanity test_101b hangs for large OSTCOUNTs 88/9788/2
Parinay Kondekar [Wed, 26 Mar 2014 05:44:20 +0000 (11:14 +0530)]
LU-4819 tests: Lustre Sanity test_101b hangs for large OSTCOUNTs

sanity.sh test_101b hangs during Lustre sanity test. This
is happening especially in cases where the $OSTCOUNT is
greater than 100.

Due to OSTCOUNT of more than 100, the ITERATION parameter
results in '0', which causes the 'reads' utility to run
in infinite 'for' loop. Thus resulting in a hang on such
setups.

This change would make necessary changes in FILE_LENGTH in
test_101b and its related routines(setup_101bc, ra_check)
so that, the test won't hang and would proceed rightly.

Signed-off-by: Parinay Kondekar <parinay_kondekar@xyratex.com>
Change-Id: I0815dfd8777d3055cf5dd6de01b2a18d1bff96bf
Xyratex-bug-id: MRP-1362
Reviewed-on: http://review.whamcloud.com/9788
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4711 libcfs: Always clamp cdls_delay between min and max 03/9503/2
Ryan Haasken [Wed, 5 Mar 2014 15:23:07 +0000 (09:23 -0600)]
LU-4711 libcfs: Always clamp cdls_delay between min and max

In libcfs_debug_vmsg2, cdls_delay is only clamped between the minimum
and the maximum when it is increased by multiplying by the backoff
factor.  It is not clamped when it is decreased by dividing by the
backoff factor.  This allows it to achieve values less than the
minimum, which allows a console message to be printed that should have
been skipped.  This patch moves the clamping outside of the else
statement, ensuring that cdls_delay is always between the min and the
max after the first time through libcfs_debug_vmsg2.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I5e587292b73b4c61ef306908fa10d324da5ce069
Reviewed-on: http://review.whamcloud.com/9503
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Ann Koehler <amk@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-3498 kernel: remove uses of IS_ERR_VALUE() 59/6759/8
John L. Hammond [Mon, 24 Jun 2013 20:39:51 +0000 (15:39 -0500)]
LU-3498 kernel: remove uses of IS_ERR_VALUE()

Remove most uses of IS_ERR_VALUE(). This macro was often given an int
argument coming from PTR_ERR(). This invokes implementation defined
behavior since the long value gotten by applying PTR_ERR() to a kernel
pointer will usually not be representable as an int. Moreover it may
be just plain wrong to do this since the expressions IS_ERR(p) and
IS_ERR_VALUE((int) PTR_ERR(p)) are not equivalent for a general
pointer p.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib76592a1fc491539d28a51668c7f06347e988f9f
Reviewed-on: http://review.whamcloud.com/6759
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4619 llite: prevent buffer overflow in fiemap 34/9834/5
Bobi Jam [Fri, 18 Apr 2014 05:58:36 +0000 (13:58 +0800)]
LU-4619 llite: prevent buffer overflow in fiemap

lov_fiemap() does not take consider its @vallen parameter, which is
the max buffer size the caller can hold for the fiemap extents.

This patch fixes this and limits the max mapped fiemap extent count
to fit in the preallocted buffer.

This patch also fixes a memory out of bound write issue when the
fiemap call is only for detecting the number of existing extent.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I3a786837fbfec7d5b3f848c5d357b28b9967be85
Reviewed-on: http://review.whamcloud.com/9834
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4872 build: warn on LASSERT and CERROR in checkpatch.pl 14/9914/2
John L. Hammond [Tue, 8 Apr 2014 20:44:01 +0000 (15:44 -0500)]
LU-4872 build: warn on LASSERT and CERROR in checkpatch.pl

In contrib/scripts/checkpatch.pl emit a warning on new LASSERT
statements and new LCONSOLE*() messages. Also ask the submitter to
think hard before adding new CERROR, CWARN, CEMERG messages.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8ebcde6af64cdf1c0669bdc5fd0b0a9abeae6066
Reviewed-on: http://review.whamcloud.com/9914
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoNew tag 2.5.58 2.5.58 v2_5_58 v2_5_58_0
Oleg Drokin [Sat, 19 Apr 2014 07:39:38 +0000 (03:39 -0400)]
New tag 2.5.58

Change-Id: I3c640d9bd1e413971f5b97ac14b1414e87e0d63f

9 years agoLU-4669 ldiskfs: do not export static inline functions 01/9401/9
Jian Yu [Thu, 27 Mar 2014 09:57:18 +0000 (17:57 +0800)]
LU-4669 ldiskfs: do not export static inline functions

In ldiskfs/ldiskfs_extents.h, both ldiskfs_ext_store_pblock()
and ldiskfs_ext_pblock() are defined as static inline functions.
However, commit 49b06fba39e (http://review.whamcloud.com/4804)
exported these two functions in ldiskfs/extents.c, which is not
allowed by gcc and causes the following compile errors:

error: __ksymtab_ldiskfs_ext_pblock causes a section type conflict
error: __ksymtab_ldiskfs_ext_store_pblock causes a section type conflict

This patch fixes the above errors by not exporting the two functions.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I8969f95f144a59d5ae8033667136abd958dfe2ab
Reviewed-on: http://review.whamcloud.com/9401
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-2675 mdt: refactor mdt_getattr_name_lock() 61/9861/3
John L. Hammond [Tue, 1 Apr 2014 16:34:55 +0000 (11:34 -0500)]
LU-2675 mdt: refactor mdt_getattr_name_lock()

In mdt_getattr_name_lock(), concentrate the cross reference handling
code into one block. Remove assertions about the remoteness of parent.
Remove some set but unused local variables in mdt_handler.c. Declare
functions static where possible. Remove the unused structures
mdt_handler and mdt_opc_slice.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I3468e200130259cf7c760bb080c1bdff9e03fd8e
Reviewed-on: http://review.whamcloud.com/9861
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3254 llite: Update layout_gen only if layout change succeed 58/9858/2
Jinshan Xiong [Sun, 30 Mar 2014 02:14:05 +0000 (19:14 -0700)]
LU-3254 llite: Update layout_gen only if layout change succeed

Move layout generation update to ll_layout_conf() so that it will
change layout at LLITE only if layout update has succeeded.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I407d617be184b1c888d6b16b11f7e33bf10add80
Reviewed-on: http://review.whamcloud.com/9858
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4816 tests: Customer Wizard seems to be stuck on test 116 78/9778/4
Parinay Kondekar [Tue, 25 Mar 2014 15:56:34 +0000 (21:26 +0530)]
LU-4816 tests: Customer Wizard seems to be stuck on test 116

Due to large OST  size, the execution of test 116 takes huge time to
complete. In such cases it would be good to skip this tests execution.

The test attempts to write 2% above the qos_threshold_rr_level.
In scenarios where OST size is huge, during the first round of write
the count of 2MB file to be created is big, causing testt to take time
to comeplete the same.

This change checks to see if more space is available than expected,
and if so skips the test.

Signed-off-by: Parinay Kondekar <parinay_kondekar@xyratex.com>
Change-Id: Ifa101de2fffcaa3c182582496abd68ab6244d3a0
Xyratex-bug-id: MRP-1747
Reviewed-on: http://review.whamcloud.com/9778
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4131 mdd: Changelog not logging file truncate. 23/9723/2
rahul.deshmukh [Wed, 19 Mar 2014 05:37:15 +0000 (11:07 +0530)]
LU-4131 mdd: Changelog not logging file truncate.

Use of truncate(2) does not produce any change log entries,
and the action is invisible. This patch introduces CL_TRUNC
event and adds the corresponding changelog record when the
size has changed.

Signed-off-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Change-Id: I6621e726a82a8105a959b77b4f505f42990f5d64
Reviewed-on: http://review.whamcloud.com/9723
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4762 lctl: set_param should return error when value is null 38/9638/3
Emoly Liu [Thu, 20 Mar 2014 06:28:38 +0000 (14:28 +0800)]
LU-4762 lctl: set_param should return error when value is null

"lctl set_param" should return error when the parameter value is null.
For example: "lctl set_param debug_mb" or "lctl set_param fail_loc="

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I5572c7a16803f1c4ba4449056b4dd2c476106bde
Reviewed-on: http://review.whamcloud.com/9638
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3868 osc: Update inode timestamp for lockless IO as well 97/8797/2
Swapnil Pimpale [Fri, 10 Jan 2014 12:15:27 +0000 (17:45 +0530)]
LU-3868 osc: Update inode timestamp for lockless IO as well

Removed the checks for oi_lockless from osc_io_read_start() and
osc_io_write_start(). This patch also removes the unnecessary call to
cl_object_attr_get() in osc_io_write_start() before calling
cl_object_attr_set()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: Ic96694e84444cd19fafe0af72848250e5b1a3d14
Reviewed-on: http://review.whamcloud.com/8797
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3319 procfs: fix symlink handling 38/9038/13
James Simmons [Fri, 28 Mar 2014 15:19:07 +0000 (11:19 -0400)]
LU-3319 procfs: fix symlink handling

While working on symlink handling for seq files I noticed a
long outstanding bug. Code was developed to link osc obds
to target_obds of the lov layer. The target_obds directory
was never created for the symlinks. This patch enables this
long forgotten feature. Also addressed is the race condition
experinced with server side code ported to seq_files that
used symlinks. To avoid the race the handle obd_proc_private
was moved from struct obd_device to struct obd_type which
now allows earlier registeration that only happens once.
The second problem addressed is the module loading race.
Several modules share the same top proc directory entry which
can become a issue if a client exist on a server node since
the linux proc system allows multiple directories of the same
name. Original Lustre had a lprocfs_srch but that doesn't
work if you use the kernels internal cache for the proc
system so you need to keep track of who grabs the proc root
first and then use the first one registered for when the
next module loads.

Change-Id: Ib158ec4444ed7abc0f3c3e820ee4a333631a58d1
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9038
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
10 years agoLU-4397 utils: fix lfs_df loop for disconnected client 49/8949/3
Andreas Dilger [Tue, 21 Jan 2014 21:25:56 +0000 (14:25 -0700)]
LU-4397 utils: fix lfs_df loop for disconnected client

If the client is disconnected from the MDT on which "lfs df" is
run (typically MDT0 for the mountpoint), then the file open can
fail with -ESHUTDOWN, causing mntdf() to loop forever trying to
find other MDTs or OSTs to get statfs data from.

The caller of llapi_obd_statfs() cannot tell the difference between
an error from open() and ioctl(IOC_OBD_STATFS), so llapi_obd_statfs()
should return a fatal error if the open failed since all of the
later opens will fail as well.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I05d48d5b6680c382c9e05c02fd82a9a200500c1e
Reviewed-on: http://review.whamcloud.com/8949
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4915 kernel: kernel update [SLES11 SP3 3.0.101-0.21] 81/9981/2
Bob Glossman [Wed, 16 Apr 2014 17:08:11 +0000 (10:08 -0700)]
LU-4915 kernel: kernel update [SLES11 SP3 3.0.101-0.21]

update target and config files for new version

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I09a9837b5338250da8b3dea548ef15d873e313a9
Reviewed-on: http://review.whamcloud.com/9981
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4199 libcfs: remove assertion of spin_is_locked() 44/8144/20
Li Xi [Thu, 10 Apr 2014 13:30:54 +0000 (09:30 -0400)]
LU-4199 libcfs: remove assertion of spin_is_locked()

spin_is_locked() is always false when the platform is
uniprocessor and CONFIG_DEBUG_SPINLOCK is not enabled.
This patch replaces its assertion by assert_spin_locked().

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id8a7207b6fb08f10ccd4447263fec805df31ed67
Reviewed-on: http://review.whamcloud.com/8144
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-4917 lfsck: dump layout lfsck correctly 84/9984/3
Fan Yong [Sun, 23 Mar 2014 00:10:59 +0000 (08:10 +0800)]
LU-4917 lfsck: dump layout lfsck correctly

We used the phase1 statistics by wrong for the phase2 status.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I61565c22218728f3e8507f8850a2ed7970146046
Reviewed-on: http://review.whamcloud.com/9984
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>
10 years agoLU-4879 lfsck: avoid check exp_connect_flags before connected 45/9945/2
Fan Yong [Thu, 20 Mar 2014 13:48:41 +0000 (21:48 +0800)]
LU-4879 lfsck: avoid check exp_connect_flags before connected

It is possible that the connection among some MDTs and OSTs are not
ready yet when the LFSCK wants to start the scanning globally. Under
such case, the LFSCK RPC should trigger related initial connection or
recovery connection, but not check the exp_connect_flags() directly.

On the other hand, it is not important to check whether the remote
server to support the OBD_CONNECT_LFSCK or not, because if the peer
does not support the LFSCK, the lfsck_start RPC will get failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3b881dea23ccb7695d57ec422538f731fc77e657
Reviewed-on: http://review.whamcloud.com/9945
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>
10 years agoLU-2675 llite: remove dead code 67/9767/4
John L. Hammond [Mon, 24 Mar 2014 20:24:35 +0000 (15:24 -0500)]
LU-2675 llite: remove dead code

In llite remove unused declarations, parameters, types, and unused,
get-only, or set-only structure members. Add static and const
qualifiers to declarations where possible.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If710247d11debd748d2efe80e400f208066cbafa
Reviewed-on: http://review.whamcloud.com/9767
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4860 lov: Handle the case of stripe size is not power 2 82/9882/3
Jinshan Xiong [Fri, 21 Mar 2014 18:49:41 +0000 (11:49 -0700)]
LU-4860 lov: Handle the case of stripe size is not power 2

Calculate the end of current stripe correctly when the stripe size
is not power 2.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ic250298b668d3bc32ed14d8390b897578a9c89a2
Reviewed-on: http://review.whamcloud.com/9882
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4838 osd: object iterator in zfs to sync before iteration 38/9838/4
Alex Zhuravlev [Fri, 28 Mar 2014 06:39:52 +0000 (10:39 +0400)]
LU-4838 osd: object iterator in zfs to sync before iteration

The issue with dmu_object_next() is that it doesn't expose
non-committed blocks in the metadnode. Therefore the iterator
doesn't find dnodes allocated in the current (non-committed)
txg which breaks testing and may affect LFSCK. As a short-term
solution, osd_zfs_otable_it_init() ensures the current txg
is committed.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I639f37ced5790d1e1514c3e24594e360fcd6c1a8
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/9838
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-4847 mdc: use cl_max_mds_md to pack getattr RPC 62/9862/5
wang di [Tue, 1 Apr 2014 10:19:31 +0000 (03:19 -0700)]
LU-4847 mdc: use cl_max_mds_md to pack getattr RPC

In some cases, cl_default_mds_easize might be zero, especially for
MDC connected to non-MDT0, then mdc might pack getattr RPC with
zero eadatasize.

If client is trying to access remote striped directory with
zero eadatasize, MDT will not return layout information of the
striped direcotry, which will be mis-regarded as non-striped
directory.

So we should use cl_max_mds_easize if cl_default_mds_easize is zero.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ia2939a6c8a724c37303eeeda46a4e3d94360353c
Reviewed-on: http://review.whamcloud.com/9862
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>
10 years agoLU-4558 clio: Solve a race in cl_lock_put 81/9881/3
Jinshan Xiong [Thu, 3 Apr 2014 00:35:45 +0000 (17:35 -0700)]
LU-4558 clio: Solve a race in cl_lock_put

It's not atomic to check the last reference and state of cl_lock
in cl_lock_put(). This can cause a problem that an using lock is
freed, if the process is preempted between atomic_dec_and_test()
and (lock->cll_state == CLS_FREEING).

This problem can be solved by holding a refcount by coh_locks. In
this case, it can be sure that if the lock refcount reaches zero,
nobody else can have any chance to use it again.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I08b81bcd6a4040ea9608db97d60aa6706405ee8c
Reviewed-on: http://review.whamcloud.com/9881
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3963 Remove unused lvfs_callback_ops 79/9979/3
Oleg Drokin [Wed, 16 Apr 2014 18:41:14 +0000 (14:41 -0400)]
LU-3963 Remove unused lvfs_callback_ops

This was acidentally reintroduced back by commit
001b8dbfacb747f1649a2eb047a5f118ce32fdc7

Change-Id: I26fc2ea7b330b9b69dfc5693c4d5c16f5aede194
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9979
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
10 years agoLU-3333 ptlrpc: Protect request buffer changing 67/6467/5
Oleg Drokin [Mon, 27 May 2013 18:06:09 +0000 (14:06 -0400)]
LU-3333 ptlrpc: Protect request buffer changing

*_enlarge_reqbuf class of functions can change request body location
for a request that's already in replay list, as such a parallel
traverser of the list (after_reply -> ptlrpc_free_committed) might
access freed and scrambled memory causing assertions.

Separate out the common code in ptlrpc_enlarge_req_buffer and
protect the buffer replacement by imp_lock since all users
that can get to this request must be holding this lock themselves
first.

Change-Id: I051d96196b44faafc15c58e0b2127856929f0ba7
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/6467
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
10 years agoLU-3963 Revert bitops changes 78/9978/3
Oleg Drokin [Wed, 16 Apr 2014 18:37:53 +0000 (14:37 -0400)]
LU-3963 Revert bitops changes

This reverts bitops portions of http://review.whamcloud.com/7803
commit 001b8dbfacb747f1649a2eb047a5f118ce32fdc7

The uncovered problem is such that previously used fls returned 0
for the case of no bits set where as __fls return value
for such a case is undefined in the case of at least Linux kernel.

Change-Id: I993674161b08791157781a2b1da0872b12358bb1
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9978
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
10 years agoLU-4803 ofd: skip orphan cleanup when inject OI error 59/9759/4
Fan Yong [Mon, 10 Mar 2014 04:16:51 +0000 (12:16 +0800)]
LU-4803 ofd: skip orphan cleanup when inject OI error

When inject OI error for simulating some failure cases, the object
may be mapped to invalid local target (inode for ldiskfs), so skip
the orphan cleanup in OSP to avoid unexpected warning or destroy.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8e0a8a9bb4ae584fc8f40f894a19e8f10aa24c10
Reviewed-on: http://review.whamcloud.com/9759
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4873 llite: avoid a deadlock in page write 28/9928/2
Jinshan Xiong [Thu, 10 Apr 2014 15:40:49 +0000 (11:40 -0400)]
LU-4873 llite: avoid a deadlock in page write

For a partial page write, it will have to issue a READ RPC firstly
to get a full uptodate page. If another page is already locked by
this thread it can easily cause deadlock.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I3bf01b51c8842666dfb923b9df073acbcc533950
Reviewed-on: http://review.whamcloud.com/9928
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4796 osd: NOT inject OBD_FAIL_FID_LOOKUP on dotdot 48/9748/3
Fan Yong [Sat, 8 Mar 2014 15:55:51 +0000 (23:55 +0800)]
LU-4796 osd: NOT inject OBD_FAIL_FID_LOOKUP on dotdot

The namespace LFSCK may cannot rebuild the FID-in-dirent for dotdot
entry after the MDT restored from file-level backup, because there
is not enough space in the directory head area.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I06e8a56dc0a6522e12fd0dfd5b513c1dbf0a80f4
Reviewed-on: http://review.whamcloud.com/9748
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4008 mdt: Use actual size for layout lock intents 71/9571/6
Matt Ezell [Tue, 25 Mar 2014 12:31:56 +0000 (08:31 -0400)]
LU-4008 mdt: Use actual size for layout lock intents

The intent for layout looks up the size of the lov xattr. That size
should be used for the reply buffer instead of the maximum size ever
seen.

Signed-off-by: Matt Ezell <ezellma@ornl.gov>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9550aa47313502288b018f5cac0d59931ce76d21
Reviewed-on: http://review.whamcloud.com/9571
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
10 years agoLU-4008 mdt: Shrink default LOVEA reply buffers 22/9322/10
Oleg Drokin [Thu, 20 Feb 2014 05:00:15 +0000 (00:00 -0500)]
LU-4008 mdt: Shrink default LOVEA reply buffers

Instead of allocating maximum possible LOVEA for intent requests,
allocate a sane default to fit up to 100 stripes, should the size
be bigger, the buffer reallocation code will kick in.

Additionally, since quite awhile ago we no longer send
unlink cookies or EA data to the clients from unlinks/renames,
so we no longer need to allocate reply buffer for them in
mdt_close() and other such places.
Also clean up unused fields related to these buffers in
md_attr structure.

Change-Id: I4c5bfb5f2d39653d5612c90967d5e1ac83d441e6
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9322
Tested-by: Jenkins
Reviewed-by: Matt Ezell <ezellma@ornl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
10 years agoLU-4707 build: Don’t deploy the "lustre" init script on clients 35/9535/9
Dmitry Eremin [Thu, 6 Mar 2014 17:52:40 +0000 (21:52 +0400)]
LU-4707 build: Don’t deploy the "lustre" init script on clients

Don’t deploy init scripts if they are not supported,
for example on none RedHat systems.

Don’t deploy the "lustre" and "ha.d" init scripts on clients.

Fix typo in lustre/scripts/lnet script.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I10be8e9e27ecfd2426d3e1ae8f40e1f7bf6d725d
Reviewed-on: http://review.whamcloud.com/9535
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3963 cleanup: C89 and build cleanups 03/7803/29
Alexey Lyashkov [Mon, 30 Sep 2013 10:38:10 +0000 (13:38 +0300)]
LU-3963 cleanup: C89 and build cleanups

use C99 initialization for a types, remove some platform depended code
and use POSIX compatible instead.
don't build a lhsmtool is none utils allowed.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I6e2837953902520240e9ceb251c92329d328d715
Reviewed-on: http://review.whamcloud.com/7803
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-4423 o2iblnd: use is_vmalloc_addr to check for vmalloc address 53/8953/4
Oleg Drokin [Wed, 22 Jan 2014 02:10:47 +0000 (21:10 -0500)]
LU-4423 o2iblnd: use is_vmalloc_addr to check for vmalloc address

Instead of manually checking the bounds of VMALLOC_START and
VMALLOC_END, just use is_vmalloc_addr. That's what the function
was designed for.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ic12fbac092305900d51f29569a079eea747cea34
Reviewed-on: http://review.whamcloud.com/8953
Tested-by: Jenkins
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
10 years agoLU-3963 libcfs: convert llite/lmv/lod/lov cfs_atomic primitive 73/7073/13
Peng Tao [Fri, 4 Apr 2014 12:13:57 +0000 (08:13 -0400)]
LU-3963 libcfs: convert llite/lmv/lod/lov cfs_atomic primitive

This patch convers all cfs_atomic primitives in
llite, lmv, lod and lov.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I24db8a4c9ee6e7e05ccb63bf3d278a2df9125510
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/7073
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>