Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-9967 tests: run-llog to cleanup properly 66/29366/2
Alex Zhuravlev [Mon, 18 Sep 2017 20:17:29 +0000 (23:17 +0300)]
LU-9967 tests: run-llog to cleanup properly

move ignore_errors so that setup's error is ignored, the script
continues with detach command needed to release the module.

Lustre-change: https://review.whamcloud.com/29057
Lustre-commit: e3921c4727c1d2e9866e0013fd37a7a4d4616621

Change-Id: I899de7a321fa927ca9884a6e4f9e8785bbc46f7c
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29366
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9887 lfsck: calculate LFSCK speed properly 94/29294/3
Fan Yong [Tue, 19 Sep 2017 15:55:59 +0000 (11:55 -0400)]
LU-9887 lfsck: calculate LFSCK speed properly

Originally, we used do_div(a,b) to calculate the LFSCK average
speed, and got the result from the parameter @a. But later, we
replaced do_div(a,b) with div_u64(a,b). The latter one doesn't
stores the quotient in the parameter @a, instead, the quotient
is returned via the function return value. The patch fixes the
LFSCK logic to obtain the LFSCK average speed from div_u64(a,b)
return value.

Lustre-change: https://review.whamcloud.com/28617
Lustre-commit: cf800c062c8c6424c442509139297095f8a708db

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I442fb8f7e6c51a4853ea37694e3c221f97e26b19
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29294
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9963 test: add parallel-scale tests to ALWAYS_EXCEPT 46/29146/2
dilip krishnagiri [Fri, 8 Sep 2017 18:30:57 +0000 (12:30 -0600)]
LU-9963 test: add parallel-scale tests to ALWAYS_EXCEPT

add the following parallel-scale tests

parallel_grouplock :
       test_parallel_grouplock: test failed to respond and timed out
Associated Jira ticket LU-9429 is in open state.
to ALWAYS_EXCEPT list.

Test-Parameters: trivial testlist=parallel-scale

Lustre-change: https://review.whamcloud.com/28914
Lustre-commit: 38c78e21ca7abe4bd6e6500d88a692e7a56a7712

Change-Id: I25709af1ab49a30498a89e5369521582c5ab6cf8
Signed-off-by: dilip krishnagiri <dilipx.krishnagiri@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: James Casper <jamesx.casper@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9802 pfl: swapping lcm_entry_count correctly 41/29141/2
Jinshan Xiong [Thu, 27 Jul 2017 16:49:42 +0000 (09:49 -0700)]
LU-9802 pfl: swapping lcm_entry_count correctly

It's a u16 integer so it should use le16_to_cpu() instead of
le32_to_cpu().

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/28256
Lustre-commit: 21ea1f7629535090d64ee3355c491a9e35256f23

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I43c31a76d78aa294a3e3296a1bb69f4d6fb1423d
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29141
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10023 kernel: kernel update [SLES12 SP3 4.4.82-6.9] 16/29716/2
Bob Glossman [Fri, 22 Sep 2017 15:29:55 +0000 (08:29 -0700)]
LU-10023 kernel: kernel update [SLES12 SP3 4.4.82-6.9]

Update target and kernel_config files for new version

Test-Parameters: clientdistro=sles12sp3 testgroup=review-ldiskfs   mdsdistro=sles12sp3 ossdistro=sles12sp3   mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs
Change-Id: Ie65afb3d7356c4679f4f37f4af324e955261b5af
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
6 years agoLU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3] 53/28953/6
Bob Glossman [Thu, 7 Sep 2017 19:37:27 +0000 (12:37 -0700)]
LU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3]

Minor linux version upgrade, but SP2 and SP3 use linux 4.4 versions.
Some new kernel patches, a few revised ldiskfs patches.
All new target and config files.
Some autoconf changes to adapt to new or altered kernel APIs.

Test-Parameters: clientdistro=sles12sp3 testgroup=review-ldiskfs   mdsdistro=sles12sp3 ossdistro=sles12sp3   mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I99e2b6848197ea19402fa415fdb562d03e87d947

6 years agoLU-10119 scripts: Correct shebang/hashpling format 89/29689/2
Chris Horn [Fri, 13 Oct 2017 18:58:42 +0000 (13:58 -0500)]
LU-10119 scripts: Correct shebang/hashpling format

Shebang/hashpling should not have a space between the number sign and
exclamation mark.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/29605
Lustre-commit: dd23aa4a64c776784cee05f69560c00b36440dc7

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I4a31d7dd7579bfaf231284c678e4100acea77d9b
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29689
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9416 hsm: add kkuc before sending registration RPCs 87/29687/2
Henri Doreau [Wed, 23 Aug 2017 15:16:25 +0000 (17:16 +0200)]
LU-9416 hsm: add kkuc before sending registration RPCs

This avoids a situation where the registration completes and the CDT
sends HSM actions just before the kkuc registration happens. In this
case the client drops the actions because there are no CT pipes in the
kkuc list.

Lustre-change: https://review.whamcloud.com/28751
Lustre-commit: bdb04079570dd2de3b9310221e0206d64efb9ecc

Change-Id: Icbd6575f04c0ca7e8f731ee8481ec72a9ff4f2e1
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29687
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9574 llite: pipeline readahead better with large I/O 16/29016/3
Jinshan Xiong [Thu, 1 Jun 2017 19:53:35 +0000 (12:53 -0700)]
LU-9574 llite: pipeline readahead better with large I/O

Fixed a bug where next readahead is not set correctly when
appplication issues large I/O;
Extend the readahead window length to at least cover the size of
current I/O.

Lustre-change: https://review.whamcloud.com/#/c/27388/
Lustre-commit: e94dcdcf70526177633b71cfa1c6cb68c8f28ef0

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I43c5e4f25ea30d4a36263db2588bde0401122990
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29016
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10000 kernel: kernel update [SLES12 SP2 4.4.74-92.38] 69/29069/4
Bob Glossman [Mon, 18 Sep 2017 15:39:58 +0000 (08:39 -0700)]
LU-10000 kernel: kernel update [SLES12 SP2 4.4.74-92.38]

Update target and kernel_config files for new version

Test-Parameters: clientdistro=sles12sp2 testgroup=review-ldiskfs \
  mdsdistro=sles12sp2 ossdistro=sles12sp2 \
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I825369d9cafd4f75dc193f614d5adfe87769fcd1
Reviewed-on: https://review.whamcloud.com/29069
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 tests: add completion.h header to kinode.c 67/29567/2
James Simmons [Thu, 14 Sep 2017 13:40:56 +0000 (09:40 -0400)]
LU-9558 tests: add completion.h header to kinode.c

When building lustre on a ARM fedora box running a 4.11 kernel
kinode.c failed to build due to the completion.h header missing.
A simple including of this header fixes everything.

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/28998
Lustre-commit: 982d660edbcacd528579f25ed2a3ae076a0134f3

Change-Id: I2a193346b214616a6f5dee5049466fb55567e396
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/29567
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-7802 ldlm: No -EINVAL for canceled != unused 75/28975/4
Patrick Farrell [Mon, 18 Sep 2017 11:05:48 +0000 (06:05 -0500)]
LU-7802 ldlm: No -EINVAL for canceled != unused

If any locks are removed from or added to the lru, the
check of "number unused vs number cancelled" may be wrong.
This is fine - do not return an error or print debug in
this case.

Lustre-change: https://review.whamcloud.com/28560
Lustre-commit: a5081b7362e44b8d38aee1112f9a7d3aae1642c0

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I2ee9b8d86fbd6c9bd2c29e3472e3d410ee303374
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28975
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8276 ldlm: Make lru clear always discard read lock pages 64/29264/3
Patrick Farrell [Mon, 14 Aug 2017 10:09:35 +0000 (05:09 -0500)]
LU-8276 ldlm: Make lru clear always discard read lock pages

A significant amount of time is sometimes spent during
lru clearing (IE, echo 'clear' > lru_size) checking
pages to see if they are covered by another read lock.
Since all unused read locks will be destroyed by this
operation, the pages will be freed momentarily anyway,
and this is a waste of time.

This patch sets the LDLM_FL_DISCARD_DATA flag on all the PR
locks which are slated for cancellation by
ldlm_prepare_lru_list when it is called from
ldlm_ns_drop_cache.

The case where another lock covers those pages (and is in
use and so does not get cancelled by lru clear) is safe for
a few reasons:

1. When discarding pages, we wait (discard_cb->cl_page_own)
until they are in the cached state before invalidating.
So if they are actively in use, we'll wait until that use
is done.

2. Removal of pages under a read lock is something that can
happen due to memory pressure, since these are VFS cache
pages. If a client reads something which is then removed
from the cache and goes to read it again, this will simply
generate a new read request.

This has a performance cost for that reader, but if anyone
is clearing the ldlm lru while actively doing I/O in that
namespace, then they cannot expect good performance.

In the case of many read locks on a single resource, this
improves cleanup time dramatically.  In internal testing at
Cray with ~80,000 read locks on a single file, this improves
cleanup time from ~60 seconds to ~0.5 seconds.  This also
slightly improves cleanup speed in the case of 1 or a few
read locks on a file.

Lustre-change: https://review.whamcloud.com/20785
Lustre-commit: 6a369b59f3729513dd8e81c4964dc6183287b601

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I0c076b31ea474bb5f012373ed2033de3e447b62d
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8578 ldlm: ELC shouldn't wait on lock flush 63/29263/3
Andriy Skulysh [Fri, 2 Sep 2016 09:28:24 +0000 (12:28 +0300)]
LU-8578 ldlm: ELC shouldn't wait on lock flush

commit ad87adbff5148a74ac616dbc9bfa02a4e3814034
LU-5727 ldlm: revert the changes for lock canceling policy

but it removes the fix for LU-4300 when lru_resize is disabled.

Introduce ldlm_cancel_aged_no_wait_policy to be used by ELC.

Lustre-change: https://review.whamcloud.com/22286
Lustre-commit: 7ca60f338936465c534c2ac9a0ea467d276a7485

Change-Id: Ic74a6bce4a261dc96c8c0f6d8f7e20315def8c0e
Seagate-bug-id: MRP-3662
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29263
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9469 ldiskfs: add additional attach_jinode call 68/28968/9
Bob Glossman [Wed, 23 Aug 2017 18:51:24 +0000 (11:51 -0700)]
LU-9469 ldiskfs: add additional attach_jinode call

In some execution paths jinode data structures are not
getting initialized. Add an extra init call to fix that.

Test-Parameters: clientdistro=sles12sp2 testlist=conf-sanity \
  mdsdistro=sles12sp2 ossdistro=sles12sp2 testgroup=review-ldiskfs \
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Lustre-change: https://review.whamcloud.com/28665
Lustre-commit: 84f690eee28f3b9123b89249c568dd6255a4a348

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I087eb06b9c5122be1cfd0aabbc04ea1db7ec765a
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28968
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9908 tests: force umount client in test 70e, 41b, and 105 08/29108/4
Yang Sheng [Mon, 28 Aug 2017 19:30:13 +0000 (03:30 +0800)]
LU-9908 tests: force umount client in test 70e, 41b, and 105

In test_70e, import state may not update while
mds stopping. Since statfs will be invoked in sles12
before umounting, so umount with force flag to avoid
waitting a long time.
Add -f to stopall call in test-framework for the same reason,
to do umount with force flag.

Lustre-change: https://review.whamcloud.com/28767
Lustre-commit: 20787a89ad7dc99290c4d9cff8247b0a532e92b9

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I3d1e73b3501e98008ef18c05f7b5498d12cb46fb
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29108
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9929 nodemap: add default ACL unmapping handling 69/29369/2
Emoly Liu [Fri, 22 Sep 2017 03:31:28 +0000 (11:31 +0800)]
LU-9929 nodemap: add default ACL unmapping handling

This patch adds default ACL unmapping code to mdt_getxattr
functions so that clients can get a correctly unmapped id.
Also, test_23b is added to sanity-sec.sh to verify this fix.

Lustre-change: https://review.whamcloud.com/29010
Lustre-commit: 62fee20556a4c90361bd28edb903dc77c9540133

Change-Id: I6562372c58ca9772f16f7d6b0b98b45ada87971a
Test-Parameters: testlist=sanity-sec
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29369
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10088 kernel: kernel update RHEL6.9 [2.6.32-696.13.2.el6] 62/29362/2
Bob Glossman [Thu, 5 Oct 2017 21:31:27 +0000 (14:31 -0700)]
LU-10088 kernel: kernel update RHEL6.9 [2.6.32-696.13.2.el6]

Update RHEL6.9 kernel to 2.6.32-696.13.2.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iedd8e4fc71fabfd7f779804ce546b5e3173d23d6
Reviewed-on: https://review.whamcloud.com/29362
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9887 tests: ignore error sanity-lfsck test 9a,b 93/29293/3
James Nunez [Thu, 17 Aug 2017 20:04:14 +0000 (14:04 -0600)]
LU-9887 tests: ignore error sanity-lfsck test 9a,b

sanity-lfsck tests 9a and 9b are failing consistently on
checking that speed limiting LFSCK takes less time than the
user defined maximum speed. We should ignore these errors
for now and print the layout or namespace to help understand
this issue.

Test-Parameters: trivial testgroup=review-zfs-part-1
Test-Parameters: testgroup=review-dne-part-2

Lustre-change: https://review.whamcloud.com/28588
Lustre-commit: 6754b09335508ca4d977d10d1d05b5befd1a8aad

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I64cac59edd456e6fd519961a4055130c8dbc8a4a
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29293
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8541 ldlm: don't use jiffies as sysfs parameter 65/29265/3
James Simmons [Thu, 31 Aug 2017 20:17:42 +0000 (16:17 -0400)]
LU-8541 ldlm: don't use jiffies as sysfs parameter

The ldlm sysfs file handles lru_max_age in jiffies which is wrong
since jiffies are not consistent across machine since HZ is
configurable at compile time. Talking to most users they thought
lru_max_age was in seconds which is incorrect. The best way to
fix this is to move lru_max_age to millisecs since most systems
lustre deals with sets HZ to 1000. To make it clear it is in
milliseconds print out lru_max_age with "ms". Since users tend
to think in seconds allow passing in seconds besides milliseconds
and internally converting them to nanaseconds. Since we have to
support milliseconds move to ktime_t since we can't use time64_t.
Unfortunately, this makes a relatively large patch, but I could
not find a way to split it up some more without breaking atomicity
of the change.

Lustre-change: https://review.whamcloud.com/28370
Lustre-commit: 800ffd4711863e1067a693f1283bccf4edddf2a2

Change-Id: I0b1814fd9d903767f62fe141d2c95845b75fb95a
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29265
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9983 llog: skip non-exist log cancellation 38/29238/2
Di Wang [Wed, 27 Sep 2017 09:10:26 +0000 (05:10 -0400)]
LU-9983 llog: skip non-exist log cancellation

Let's skip the record cancellation if the llog does
not exist at all, which usually happens when remote
log creation failed.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I8b27978b725acf8dbffd1a743873a3854ee15efb
Reviewed-on: https://review.whamcloud.com/29238
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9980 tests: save specific facet in save_lustre_params() 47/29147/2
Elena Gryaznova [Wed, 13 Sep 2017 05:58:07 +0000 (22:58 -0700)]
LU-9980 tests: save specific facet in save_lustre_params()

In save_lustre_params(), while there are multiple server facets
having the same host, and the parameter has wildcard, duplicate
parameters with wrong facets will be saved.

This patch fixes the above issue by greping service name to save
the parameter with specific facet.

Test-Parameters: clientcount=4 osscount=2 mdscount=2 mdtcount=1 \
austeroptions=-R failover=true iscsi=1 testlist=replay-vbr

Lustre-change: https://review.whamcloud.com/28963
Lustre-commit: 7921d0d8db942057eb10042291d6d90448e5c197

Change-Id: Icba3fc532f4c67f02272c39e8e64d49325dad0e7
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29147
Tested-by: Jenkins
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9930 llite: only clear lli_sai if the setter 45/29145/3
Bruno Faccini [Wed, 30 Aug 2017 09:37:03 +0000 (11:37 +0200)]
LU-9930 llite: only clear lli_sai if the setter

Previous to this patch, start_statahead_thread() was
unconditionnally clearing lli->lli_sai upon error, leading
to crash upon racy scenario where it has just been set in/by
another thread context.
Now, only clear lli_sai if current thread has set it.

Lustre-change: https://review.whamcloud.com/28794
Lustre-commit: f4a0ebe28e88cbdd79061fad275cb9494fdba225

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I555febfad3494c9dd90eeb72d6dd9157428179ea
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29145
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9682 nodemap: delete nids range from nodemap correctly 38/29138/2
Emoly Liu [Fri, 15 Sep 2017 07:56:11 +0000 (15:56 +0800)]
LU-9682 nodemap: delete nids range from nodemap correctly

In function nodemap_del_range(), we should check if the current
nodemap has the specified range before delete it from global
range tree.
Also, test_10b is added to sanity-sec.sh to verify this patch.

Lustre-change: https://review.whamcloud.com/28922
Lustre-commit: 62ca9b823524ca44d3344b2555754890abc55a3b

Change-Id: Ibab79056509d14d52f99b1ebe3319c301dbe45d9
Test-Parameters: testlist=sanity-sec
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29138
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9996 build: include MOFED lib 18/29118/5
Minh Diep [Mon, 11 Sep 2017 17:02:19 +0000 (10:02 -0700)]
LU-9996 build: include MOFED lib

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/#/c/29020/
Lustre-commit: 81ebf59c99b1e58d05d6d9af1ce645b09ecf3792

Change-Id: Ia1b5a97f59d5055311786934c9165a81f2af7cae
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29118
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 llite: user enhanced getattr functionality in newer kernels 06/29006/2
James Simmons [Wed, 21 Jun 2017 21:37:04 +0000 (17:37 -0400)]
LU-9558 llite: user enhanced getattr functionality in newer kernels

Starting with the linux kernel 4.11 a new system call was added
to enhance the file info available. This new functionality has
changed the getattr functions in the linux kernel. This patch
only provides the most basic support for now.

Linux-commit: a528d35e8bfcc521d7cb70aaf03e1bd296c8493f

Lustre-commit: 57730260e846cd5011469fe2edc667ef73ad3bad
Lustre-change: https://review.whamcloud.com/27715

Change-Id: Iee1b02bb94dab05a3197866af9eedd6f35cac7c5
Signed-off-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: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/29006
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9870 build: handle SNMP missing on build box 87/28987/2
James Simmons [Fri, 11 Aug 2017 18:50:52 +0000 (14:50 -0400)]
LU-9870 build: handle SNMP missing on build box

Currently the lustre spec file doesn't handle the case when SNMP
is missing. So even if the user does configure --disable-snmp our
rpm build process will ignore this and fail to build rpms. Pass
to the rpm build process the missing SNMP case.

Lustre-commit: 574451a4402df65d26d7af96d94a7bf0875c86af
Lustre-change: https://review.whamcloud.com/28494

Test-Parameters: trivial

Change-Id: Ia6dcfd31b50f4f67afe7a4545fe417c32df6e559
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28987
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9733 obd: fix fsname parsing 14/28814/2
Wang Shilong [Mon, 3 Jul 2017 11:55:30 +0000 (19:55 +0800)]
LU-9733 obd: fix fsname parsing

Lustre support Lustre fsname started with numbers.
So here we should try fsname firstly, if it failed,
fall back to number parsing.

Lustre-change: https://review.whamcloud.com/27916
Lustre-commit: cae71501680330a38c9bb16c25bf9c85dc0ec4e0

Change-Id: Idd98b9fdc8375729faa61f51251caa101035dd93
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28814
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9417 mdc: excessive memory consumption by the xattr cache 23/28223/5
Andrew Perepechko [Fri, 28 Apr 2017 17:20:06 +0000 (20:20 +0300)]
LU-9417 mdc: excessive memory consumption by the xattr cache

The refill operation of the xattr cache does not know the
reply size in advance, so it makes a guess based on
the maxeasize value returned by the MDS.

In practice, it allocates 16 KiB for the common case and
4 MiB for the large xattr case. However, a typical reply
is just a few hundred bytes. Even worse, RHEL6 has a very
bad vmalloc()/vfree() design with global locks.

If we follow the conservative approach, we can prepare a
single memory page for the reply. It is large enough for
any reasonable xattr set and, at the same time, it does
not require multiple page memory reclaim, which can be
costly.

If, for a specific file, the reply is larger than a single
page, the client is prepared to handle that and will fall back
to non-cached xattr code. Indeed, if this happens often and
xattrs are often used to store large values, it makes sense to
disable the xattr cache at all since it wasn't designed for
such [mis]use.

Lustre-change: https://review.whamcloud.com/26887
Lustre-commit: 94f080b395d6517e8da06a945bb10b0bfe69ad78

Change-Id: I98d97ffea5c83bccbc9f254717af8d2c0ac4d77f
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28223
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoNew release 2.10.1. 2.10.1 v2_10_1
John L. Hammond [Tue, 3 Oct 2017 03:39:40 +0000 (22:39 -0500)]
New release 2.10.1.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id69eb38fd2bb3987005fb0f4ec0a6da460dd1a19

6 years agoNew tag 2.10.1-RC2. 2.10.1-RC2 v2_10_1_RC2
John L. Hammond [Fri, 29 Sep 2017 20:57:00 +0000 (15:57 -0500)]
New tag 2.10.1-RC2.

Second release candidate for 2.10.1 release.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I849387cd0dac7a3897fd83ae250062bbcea5fe32

6 years agoLU-10037 kernel: kernel update RHEL6.9 [2.6.32-696.10.3.el6] 48/29248/2
Bob Glossman [Wed, 27 Sep 2017 12:43:22 +0000 (05:43 -0700)]
LU-10037 kernel: kernel update RHEL6.9 [2.6.32-696.10.3.el6]

Update RHEL6.9 kernel to 2.6.32-696.10.3.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ic693e29056e099638ee49403b114f6872f7bc73f
Reviewed-on: https://review.whamcloud.com/29248
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9983 osp: align the OSP request size by 4k 08/29208/3
Di Wang [Tue, 26 Sep 2017 00:25:07 +0000 (20:25 -0400)]
LU-9983 osp: align the OSP request size by 4k

Let's align the OSP request size by 4k, otherwise OUT
might get incorrect out requests.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Id5c16b031dcb16d764c4e4f325f51b9ecf454533
Reviewed-on: https://review.whamcloud.com/29208
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoNew tag 2.10.1-RC1. 2.10.1-RC1 v2_10_1_RC1
John L. Hammond [Fri, 15 Sep 2017 17:57:09 +0000 (12:57 -0500)]
New tag 2.10.1-RC1.

First release candidate for 2.10.1 release.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie2149519d4e272ca1a170f33871b28243ca897da

6 years agoLU-9978 kernel: kernel update RHEL7.4 [3.10.0-693.2.2.el7] 02/29002/3
Bob Glossman [Fri, 15 Sep 2017 15:20:13 +0000 (11:20 -0400)]
LU-9978 kernel: kernel update RHEL7.4 [3.10.0-693.2.2.el7]

update RHEL 7.4 kernel to 3.10.0-693.2.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I2fe4e038f185f8d4acec74d9cc398da987bcad6b
Reviewed-on: https://review.whamcloud.com/29002
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9816 kernel: kernel upgrade RHEL7.4 [3.10.0-693.el7] 32/28532/7
Bob Glossman [Fri, 15 Sep 2017 15:11:42 +0000 (11:11 -0400)]
LU-9816 kernel: kernel upgrade RHEL7.4 [3.10.0-693.el7]

With this mod we switch our supported el7 version to RHEL 7.4

Lustre-change: https://review.whamcloud.com/#/c/28301/
Lustre-commit: b2a39555d1bd4a75017ee6ca2a9a6920a30bafa8

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ib0bcb3547fcf220e1b4665229930c6ff28c6906c
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28532
Tested-by: Jenkins
Tested-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9767 utils: validate filesystem name for mkfs.lustre 96/28996/2
James Simmons [Thu, 14 Sep 2017 01:21:22 +0000 (21:21 -0400)]
LU-9767 utils: validate filesystem name for mkfs.lustre

In an earlier LU-6401 patch various user land functions
used to validate poolnames and file system names were
removed. The checks instead were enforced on the kernel
side to ensure any possible user land software directly
interfacing to the kernel wouldn't be able to break
things badly. For the case of formating the backend
file system no kernel interaction doesn't happen until
it tries to mount the MDT/OST/MGT which is very late
in the process. So for this case lets add back the
file system name verification to mkfs.lustre to warn
users long before they try to mount anything.

Secondly we remove the verify_poolname() in lfs.c since
it really doesn't do much.

Test-Parameters: trivial

Lustre-commit: 28216a73f4c0b19ef45e3ec2d6949801f6b9f828
Lustre-change: https://review.whamcloud.com/28070

Change-Id: If094644e56a70b6dd8e6b0378adc8736911aeef1
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28070
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28996
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9979 kernel: kernel update RHEL6.9 [2.6.32-696.10.2.el6] 69/28969/2
Bob Glossman [Tue, 12 Sep 2017 16:36:41 +0000 (09:36 -0700)]
LU-9979 kernel: kernel update RHEL6.9 [2.6.32-696.10.2.el6]

Update RHEL6.9 kernel to 2.6.32-696.10.2.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie86a84fda1ec391c4e0b9ab18a82d4a5b0bd25d1
Reviewed-on: https://review.whamcloud.com/28969
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9960 osd-zfs: don't auto-upgrade quota 54/28954/2
Nathaniel Clark [Mon, 11 Sep 2017 14:14:18 +0000 (10:14 -0400)]
LU-9960 osd-zfs: don't auto-upgrade quota

To preserve the ability to down-grade from 0.7.x to 0.6.x,
don't auto-upgrade quotas.
Print warning if quotas haven't been upgraded when mouting with 0.7.0.
Do check based on zpool feature in sanity-quota instead of just
version.

Lustre-change: https://review.whamcloud.com/#/c/28924/
Lustre-commit: 0bbef0afc16081e1af3529642436864954a73e3c

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2b0dcba3a230c9b2dec3d07d1b4ca6f1a1717d47
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28954
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>
6 years agoLU-9907 build: add patchless server for lbuild 52/28952/2
Minh Diep [Wed, 23 Aug 2017 23:07:28 +0000 (16:07 -0700)]
LU-9907 build: add patchless server for lbuild

Adding lbuild support for building patchless server
Cleanup unused TARGET_ARCHS and BUILD_ARCHS

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/#/c/28672/
Lustre-commit: 7018f18957817afd5dcd3b6f173e7634b93101e9

Change-Id: I946352fa243c86d5729779406264e6ee37856145
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28952
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9347 ioctl: Add BLKSSZGET ioctl support 61/28861/2
Emoly Liu [Thu, 17 Aug 2017 07:36:49 +0000 (15:36 +0800)]
LU-9347 ioctl: Add BLKSSZGET ioctl support

Add BLKSSZGET ioctl and return PAGE_SIZE for the minimun
alignment from ll_file_ioctl() for this call.

Lustre-change: https://review.whamcloud.com/28578
Lustre-commit: dcc32cd7d0d89a49f0c73ecf99130a2678442e55

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Id8a77e77cd7e1807aa90474ca6d3d1fea4d7c269
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28861
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8958 llite: remove llite_loop left overs 60/28860/2
James Simmons [Mon, 31 Jul 2017 18:24:19 +0000 (14:24 -0400)]
LU-8958 llite: remove llite_loop left overs

With the removal of llite_loop several pieces of code are still
present in the llite layer that were only used by the lloop device.
We can remove these no longer used pieces.

Lustre-change: https://review.whamcloud.com/26795
Lustre-commit: 2e875d5fc5b73f735bd42f5da54c23e4c2d35d5c

Change-Id: I67f2761ae29b8ba7bb3bc9bcc3e3f8ece73a3ea3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28860
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9842 osd: return ENODATA for XATTR_NAME_FID on MDT 61/28761/3
Fan Yong [Tue, 8 Aug 2017 23:18:21 +0000 (07:18 +0800)]
LU-9842 osd: return ENODATA for XATTR_NAME_FID on MDT

The XATTR_NAME_FID xattr is OST side EA, if someone calls
getxattr() for XATTR_NAME_FID on MDT, then return -ENODATA.

Lustre-change: https://review.whamcloud.com/28434
Lustre-commit: eb34cf7695766b39e15704861d6ac3d636042196

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I18b1466cf62d10fa28f7ed9731490e963b6274f4
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28761
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9841 lov: do not split IO for single striped file 60/28760/2
Jinshan Xiong [Wed, 9 Aug 2017 23:31:17 +0000 (16:31 -0700)]
LU-9841 lov: do not split IO for single striped file

stripe size for single striped file is not reliable, it shouldn't
be used to split I/O.

Lustre-change: https://review.whamcloud.com/28451
Lustre-commit: 078a099d26ef7f5d26131c0e18615855a39f341d

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I47c31d59b46b07d4a6760b8985e1c19da4765a5c
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28760
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9828 ptlrpc: Do not assert when bd_nob_transferred != 0 59/28759/2
Doug Oucharek [Wed, 31 May 2017 21:39:12 +0000 (14:39 -0700)]
LU-9828 ptlrpc: Do not assert when bd_nob_transferred != 0

There is a case in the routine ptlrpc_register_bulk() where we were
asserting if bd_nob_transferred != 0 when not resending.  There is
evidence that network errors can create a situation where
this does happen.  So we should not be asserting!

This patch changes that assert to an error return code of -EIO.

Lustre-change: https://review.whamcloud.com/28491
Lustre-commit: e6490ea6cf0b793c0b47f17ac5a5fa3a2a136e0d

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I6a73ca1b04a86f187744d3b8b5d46df71d95e416
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28759
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 llite: handle struct vm_operations changes 73/28573/2
James Simmons [Thu, 27 Jul 2017 18:09:17 +0000 (14:09 -0400)]
LU-9558 llite: handle struct vm_operations changes

For the linux 4.11 kernel passing in struct vm_area_struct
to struct vm_operations members has been removed since
struct vm_area_struct has been merged into struct vm_fault.
Handle these changes in the llite layer.

Linux-commit: 11bac80004499ea59f361ef2a5516c84b6eab675

Test-Parameters: trivial

Lustre-commit: a1fc8dffef216b71cb4a29a5a8faa2aa7919d2ae
Lustre-change: https://review.whamcloud.com/27651

Change-Id: I3f8767f02695515d83c59a61f6e9921b3d823109
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28573
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9104 obd: Ignore unknown config param while mounting 32/28232/2
Rahul Deshmkuh [Mon, 8 May 2017 17:03:41 +0000 (22:33 +0530)]
LU-9104 obd: Ignore unknown config param while mounting

class_process_proc_param() returns positive value when it encounters
unknown parameters in order to have the below levels process them.
At the very bottom layer the positive value returned by
class_process_proc_param() needs to be dropped.osd_process_config()
missed that, which resulted in target mount failure.

Make sure that osd_process_config() does not return positive value
returned by class_process_proc_param().

Test case has been added to check processing of unknown config
parameters.

Lustre-change: https://review.whamcloud.com/25368
Lustre-commit: 1385dbf8b9caedca7bb32f35db1529e4d5c52d4f

Test-Parameters: testlist=conf-sanity
Signed-off-by: Parinay Kondekar <parinay.kondekar@seagate.com>
Signed-off-by: Rahul Deshmukh <rahul.deshmukh@seagate.com>
Seagate-bug-id: MRP-4162
Change-Id: I068b8f2aee4cee69629efc83745d7cb88aea268c
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28232
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9654 mdt: fix problem of RAoLU HSM policy 20/28220/2
Li Xi [Mon, 12 Jun 2017 07:32:29 +0000 (15:32 +0800)]
LU-9654 mdt: fix problem of RAoLU HSM policy

mdt_attr_get_complex() clears all known attributes even they are
already valid. So in mdt_handle_last_unlink(), the valid attributes
of HSM or nlink should be checked before calling that function.

Lustre-change: https://review.whamcloud.com/27564
Lustre-commit: 2e4e60234028743404a302893fb1aa9f8d6a95e7

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I9ba561cadcc40baf5e28172cfda699cdecce7ea8
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28220
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9781 llog: Improve catalog full warning 15/28815/2
Giuseppe Di Natale [Tue, 18 Jul 2017 21:57:18 +0000 (14:57 -0700)]
LU-9781 llog: Improve catalog full warning

When warning that a catalog file is full, provide the name
of the catalog file. If the name of catalog file isn't
defined, print its FID.

Lustre-change: https://review.whamcloud.com/28093
Lustre-commit: 1c4900dcd367d2a0b2e6f26796328f5aa12508db

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: I559e43d08febfd8a1512ceb58fd3030b06372e9f
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28815
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9410 ldiskfs: no check mb bitmap if flex_bg enabled 65/28765/2
Fan Yong [Wed, 9 Aug 2017 18:30:02 +0000 (02:30 +0800)]
LU-9410 ldiskfs: no check mb bitmap if flex_bg enabled

When initializes (reformat) the filesystem, the number of
free blocks in the group descriptor is calculated via the
ext2fs_reserve_super_and_bgd() (e2fsprogs). As commented
in such function: "This is not necessarily the case when
the flex_bg feature is enabled, so callers should take care!".

So it is normal that we may find the block group descriptor
that has LDISKFS_BG_BLOCK_UNINIT flag but with 0 free blocks.
The ldiskfs_mb_check_ondisk_bitmap() should NOT report error
for such block group, instead, skip the check directly.

Lustre-change: https://review.whamcloud.com/28566
Lustre-commit: 5506c15a65b3eebb9f15000105e6eb7c02742a10

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iba0fb2bf0632a6e54222472bc724a8ea0478e9ae
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28765
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9890 osd-zfs: dmu_objset_own/disown changes 64/28764/2
Giuseppe Di Natale [Thu, 17 Aug 2017 17:16:49 +0000 (10:16 -0700)]
LU-9890 osd-zfs: dmu_objset_own/disown changes

ZFS 0.8.0 will introduce ZFS encryption. The interfaces
to 'dmu_objset_own' and 'dmu_objset_disown' have changed.
Add configure checks to determine which versions of these
functions are available and call them appropriately.

Test-Parameters: trivial ostfilesystemtype=zfs mdtfilesystemtype=zfs testlist=sanity

Lustre-change: https://review.whamcloud.com/28593
Lustre-commit: 0fedb017c12629d145fa0577451d43adc757eb36

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: Ide1a712858770e373404445b06596130a574d85b
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28764
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9869 lnet: fix incorrect arguments order calling lstcon_session_new 63/28763/2
Colin Ian King [Fri, 11 Aug 2017 17:17:57 +0000 (13:17 -0400)]
LU-9869 lnet: fix incorrect arguments order calling lstcon_session_new

The arguments args->lstio_ses_force and args->lstio_ses_timeout are
in the incorrect order. Fix this by swapping them around.

Detected by CoverityScan, CID#1226833 ("Arguments in wrong order")

Test-Parameters: trivial testlist=lnet-selftest

Lustre-change: https://review.whamcloud.com/28487
Lustre-commit: 0a80067c60043da428c473c331ed7b602c6e960b

Change-Id: If11c574655425db5bbf21ba2264be8d83a7e8bf8
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28763
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9848 llog: check padding size for update reclen 62/28762/2
Lai Siyao [Tue, 15 Aug 2017 11:51:08 +0000 (19:51 +0800)]
LU-9848 llog: check padding size for update reclen

Update log only checks padding size for split case, which should also
be done if it's less than chunk size.

Lustre-change: https://review.whamcloud.com/28554
Lustre-commit: 6705d6cc40a83b0e94668d651c444c855482bd01

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ie7819f67dd9bcbfb060713bb208c9777420c5178
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28762
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9499 lfsck: set target bitmap properly 18/28518/2
Fan Yong [Wed, 14 Jun 2017 07:48:56 +0000 (15:48 +0800)]
LU-9499 lfsck: set target bitmap properly

If the notify from the peer server has LF_INCOMPLETE flags,
then record it in the target bitmap unconditionally to avoid
missing to update the bitmap for some corner cases.

This patch also addes more debug information when the LFSCK
updates the bitmap and handle double_scan_result.

Lustre-change: https://review.whamcloud.com/27632
Lustre-commit: 775780cb90ba6069aefc7063adfe6862b26ce935

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3a6195136d608aa47e59e61f95c92978503e3a4b
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28518
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8760 lib: avoid unexpected out of order execution 22/28322/4
Fan Yong [Fri, 4 Nov 2016 01:04:39 +0000 (09:04 +0800)]
LU-8760 lib: avoid unexpected out of order execution

There is race condtion in __l_wait_event() because of the
out-of-order execution between changing thread state and
checking condition. It may block the thread (to be waken)
for ever. Consider the following real execution order:

1. Thread1 checks condition on CPU1, gets false.
2. Thread2 sets condition on CPU2.
3. Thread2 calls wake_up() on CPU2 to wake the threads with
   state TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE. But the
   Thread1'sstate is TASK_RUNNING at that time.
4. Thread1 sets its state as TASK_INTERRUPTIBLE on CPU1,
   then schedule.

If the '__timeout' variable is zero, the Thread1 will have
no chance to check the condition again.

Generally, the interval between out-of-ordered step1 and step4
is very tiny, as to above step2 and step3 cannot happen. On some
degree, it can explain why we seldom hit related trouble. But
such race really exists, especially consider that the step1 and
step4 can be interruptible.

The patch adds barrier between changing thread's state and
checking condition to avoid out-of-order execution.

Lustre-change: https://review.whamcloud.com/23564
Lustre-commit: c2b6030e9217e54e7153c0a33cce0c2ea4afa54c

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I32caee6b332f037d864419ea8728112da563cce0
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28322
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9856 mdd: handle NULL buffer in mdd_xattr_list() 66/28766/2
John L. Hammond [Thu, 10 Aug 2017 19:44:24 +0000 (14:44 -0500)]
LU-9856 mdd: handle NULL buffer in mdd_xattr_list()

The upper layer may call mdd_xattr_list() with a NULL buffer to get
the length of the xattr name list. Handle this case safely by skipping
the removal of the link xattr for unlinked objects.

Lustre-change: https://review.whamcloud.com/28469
Lustre-commit: 33a4b5ef00e88b33136d09d2f4029223a3c4d681

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iae87fba20325b228ef75ee762acfa49353932b1b
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28766
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9772 utils: Enable new ZFS MMP on mkfs 52/28652/2
Nathaniel Clark [Fri, 14 Jul 2017 17:39:10 +0000 (13:39 -0400)]
LU-9772 utils: Enable new ZFS MMP on mkfs

ZFS 0.7.0 come with new multi-modifier protection, this patch
enables it by default, on mkfs.

This also ensures canmount is off for pools that were not just
created.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If9b87e9786e0eaefe5ac9a536edcdca3d1012585
Reviewed-on: https://review.whamcloud.com/28051
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit 25e1cea871abd3c08dffb06ea62046ad84a822c1)
Reviewed-on: https://review.whamcloud.com/28652

6 years agoLU-9903 kernel: kernel update RHEL6.9 [2.6.32-696.10.1.el6] 85/28685/2
Bob Glossman [Tue, 22 Aug 2017 17:51:36 +0000 (10:51 -0700)]
LU-9903 kernel: kernel update RHEL6.9 [2.6.32-696.10.1.el6]

Update RHEL6.9 kernel to 2.6.32-696.10.1.el6
kernel patch added as a workaround for LU-9698

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: If201c5220f2125e018a16b57e3c97be55adfb1ce
Reviewed-on: https://review.whamcloud.com/28685
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8346 obdclass: Set lc_version 05/28405/2
Patrick Farrell [Tue, 11 Jul 2017 14:31:46 +0000 (09:31 -0500)]
LU-8346 obdclass: Set lc_version

The patch LU-8346 obdclass: guarantee all keys filled
removed the setting of lc_version, which makes us always
refill cached envs.  This is very expensive, particularly
for fast reads.

Original commit e58f8d609a81576eaf5bc9d0fa53bef274a01bf,
https://review.whamcloud.com/26099

Change-Id: I13ba7d19185b899d1f68d244365160539e881b8e
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/27994
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit 96f3fb788c230872e6d31185367a55ec3c4fedbc)
Reviewed-on: https://review.whamcloud.com/28405
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7899 osd: batch EA updates 82/28482/2
Alex Zhuravlev [Tue, 28 Feb 2017 09:44:14 +0000 (12:44 +0300)]
LU-7899 osd: batch EA updates

during file creation we set number of EAs: LMA, VBR, LinkEA, LOVEA, ACLs.
calling into SA to refill spill again and again is expensive. thus it
makes sense to postpone this to osd_trans_stop() where all changed EAs
has been already collected in a temporary buffer.

Lustre-change: https://review.whamcloud.com/21893
Lustre-commit: 2c9ff6dffdf4320af95c9db9af07a416529275f0

Change-Id: Ia2604ddafdf8b2ca4f6db4d70ead6d2d2761cd26
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28482
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9850 patchless client should conflict patched kernel 37/28437/7
Brian J. Murrell [Wed, 9 Aug 2017 15:09:44 +0000 (11:09 -0400)]
LU-9850 patchless client should conflict patched kernel

Due to how dependencies work in RPM (and a bug in how kmod RPMs generate
their dependency lists), on a node where the server and client repos are
both configured, YUM could allow the patched kernel to satisfy the
patchless-client RPM's requirements.

Add Conflicts: and Provides: to the kernel RPM and lustre-client RPM to
prevent this from happening.

This change also allows one to force the installation of the patched
kernel RPM (yum install kernel-lustre) if one desires.

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: If9c44a93937cd7603b0246676ebc9c8260a43b11
Reviewed-on: https://review.whamcloud.com/28437
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9725 quota: always deregister lwp 57/28357/4
Lai Siyao [Fri, 4 Aug 2017 15:16:46 +0000 (23:16 +0800)]
LU-9725 quota: always deregister lwp

qsd should always deregiter lwp upon finish no matter qsd_exp was
set before, otherwise the item will stay on the list, but qsd has
been freed.

Lustre-change: https://review.whamcloud.com/#/c/28356/
Lustre-commit: ce8ca7d3564439285a56982430f380354b697f68

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I0d6206f2f2bc8177d0aa35b350f534d85eab1c03
Reviewed-on: https://review.whamcloud.com/28357
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8935 ptlrpc: missing barrier before wake_up 21/28321/3
Lai Siyao [Wed, 12 Apr 2017 21:56:50 +0000 (05:56 +0800)]
LU-8935 ptlrpc: missing barrier before wake_up

ptlrpc_client_wake_req() misses a memory barrier, which may cause
strange errors.

Lustre-change: https://review.whamcloud.com/26583
Lustre-commit: 33033c27aae361069877d56d44714097a208aa76

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ic8e9cbaf8c07f503798b95c608477508204d9614
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28321
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9745 dkms: Fix included dkms.conf file 24/28224/3
Nathaniel Clark [Tue, 25 Jul 2017 21:34:30 +0000 (17:34 -0400)]
LU-9745 dkms: Fix included dkms.conf file

When lustre-dkms is installed with other dkms packages,
the PRE/POST scripts don't seem to function correctly.
This includes the correct dkms.conf by default without having
to recreate and reread it during build.

Lustre-change: https://review.whamcloud.com/#/c/28210/
Lustre-commit: 2f4d11de2c37803822d6c1df0b7df6828477c11a

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic6f25480db40d784dfcb3b650f7c869716b903ee
Reviewed-on: https://review.whamcloud.com/28224
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: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8619 lbuild: update ZFS to use 0.7.1 31/28531/5
Andreas Dilger [Wed, 9 Aug 2017 04:55:46 +0000 (12:55 +0800)]
LU-8619 lbuild: update ZFS to use 0.7.1

Update lbuild to build against ZFS 0.7.1

Changelog: https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.1

Lustre-change: https://review.whamcloud.com/#/c/22569/
Lustre-commit: ffa8ea9ca6f096515cf8b0638161378665591022

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I04082cd6cd43c98477100f9fc308666e1b981c0a
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28531
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7991 osd-zfs: remove obsolete quota code 81/28481/3
Fan Yong [Tue, 25 Jul 2017 06:09:21 +0000 (14:09 +0800)]
LU-7991 osd-zfs: remove obsolete quota code

Directly use ZFS backend quota accounting objects,
no need be mapped from Lustre own account objects.
Related obsolete logic is removed totally.

Lustre-change: https://review.whamcloud.com/27661
Lustre-commit: 9fdbfed4ce20aaf7ac0e6b5001f323428d9d3893

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2c6aeb1ccac52348d8d163017f73ef0fd9133551
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28481
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8999 quota: fix quota iteration interface 30/28530/2
Jinshan Xiong [Fri, 4 Aug 2017 01:42:39 +0000 (18:42 -0700)]
LU-8999 quota: fix quota iteration interface

Since zfs 0.7.0, object accounting is maintained by DMU, so that quota
iteration interface should retrieve the information over there.

Lustre-change: https://review.whamcloud.com/#/c/28345/
Lustre-commit: 8fb8e938c8af8630b06a527874ef47d52fb8b102

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I3d0744dfb52b1a9088b828bc72d648872ec4d00b
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28530
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9054 tests: disable test_312 due to zdb issue 80/28480/3
Jinshan Xiong [Thu, 3 Aug 2017 22:13:56 +0000 (15:13 -0700)]
LU-9054 tests: disable test_312 due to zdb issue

zdb used to work for datasets of exported pool by '-e -p' options,
this has been changed in zfs-0.7.0.

This patch temporarily disables test_312 until zfs upstream ticket
https://github.com/zfsonlinux/zfs/issues/6464 is solved.

Lustre-change: https://review.whamcloud.com/28343
Lustre-commit: 05ebd8218108dccaa31c1dbc97cd4cc90dfd3f8d

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib0c9eeed4964ea4a0abfed70760cb8fbaeb44496
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28480
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9826 tests: Do not run conf-sanity 32b with ZFS 04/28504/2
James Nunez [Mon, 7 Aug 2017 17:29:50 +0000 (11:29 -0600)]
LU-9826 tests: Do not run conf-sanity 32b with ZFS

With ZFS 0.7.0, conf-sanity test 32b consistently fails
in automated testing. Since the issue may be the VM test
environment, add conf-sanity test 32b to the
ALWAYS_EXCEPT list for ZFS testing.

Test-Parameters: trivial testlist=conf-sanity

Lustre-change: https://review.whamcloud.com/28408
Lustre-commit: d564becbe58f7fb349cbe19a7f23e447278310d5

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ib8582b85760057045bc7cce66d470e81e0e43dde
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28504
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9799 mount: Call read_ldd with initialized mount type 81/28581/2
Nathaniel Clark [Thu, 10 Aug 2017 14:20:04 +0000 (10:20 -0400)]
LU-9799 mount: Call read_ldd with initialized mount type

When re-reading the ldd when doing relabel, ensure the correct mount
type is used for the read. Otherwise ldiskfs complains:

   mount.lustre FATAL: unhandled/unloaded fs type 0 'ext3'

and ZFS complains:

   e2label: No such file or directory while trying to open MGS/MGT
   Couldn't find valid filesystem superblock.

Lustre-change: https://review.whamcloud.com/28456
Lustre-commit: 0108281c65545df169faaa0ce0690fb021680643

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ife53cff948d545c306e99e4b023989245a1ac3f7
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28581
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9866 kernel: kernel update [SLES12 SP2 4.4.74-92.35] 43/28543/2
Bob Glossman [Fri, 11 Aug 2017 15:25:03 +0000 (08:25 -0700)]
LU-9866 kernel: kernel update [SLES12 SP2 4.4.74-92.35]

Update target and kernel_config files for new version

Test-Parameters: clientdistro=sles12sp2 testgroup=review-ldiskfs \
  mdsdistro=sles12sp2 ossdistro=sles12sp2 \
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ibd5e7e931a6055c1b0d2a52359d4f4527843dec0
Reviewed-on: https://review.whamcloud.com/28543
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8618 tests: ha.sh improvements 24/28524/2
Elena Gryaznova [Mon, 29 May 2017 18:50:57 +0000 (21:50 +0300)]
LU-8618 tests: ha.sh improvements

Patch adds the following ha.sh changes:
- Customise SIMUL and IOR paths.
- Add -p max failover period parameter.
- Add -r dry run parameter.
- Add "iozone" load.
- Add the possibilities to set the number of mpi threads per client.
- CRM is not always configured to fail target back when
  the primary node is back. Add the possibility to execute
  failback command if required.
- The logs from all clients are required if non mpi load fails on
  one client only. Dump logs from all clients.
- Add the possibilities to:
  run ha.sh with custom ior, simul parameters;
  start only the defined list of applications;
  start MPI loads instances on defined number of clients.

Lustre-change: https://review.whamcloud.com/22528
Lustre-commit: d3a044086f5790fec2747c653dca26b8ec529e2d

Test-Parameters: trivial
Seagate-bug-id: MRP-2150, MRP-2896, MRP-3431, MRP-3252, MRP-3495
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Alexander Lezhoev <alexander.lezhoev@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Change-Id: I252aa0945286b30ffa6bad40aebf0c2cbc0c7261
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28524
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9494 test: Improve message for skipping tests 22/28522/2
Ruth A Klundt [Fri, 7 Jul 2017 15:17:26 +0000 (09:17 -0600)]
LU-9494 test: Improve message for skipping tests

Modify skip messages for consistency and clarity.

Lustre-change: https://review.whamcloud.com/27350
Lustre-commit: 75b426f9f9d3f21e08cd1e62b7fa4962a2b8c679

Test-Parameters: trivial testlist=sanity

Signed-off-by: Ruth Klundt <rklundt@sandia.gov>
Change-Id: I44ced56e67aa63ed84da6a15c88282bc3ff19332
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28522
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-282 tests: remove extra logging from sanity 27 21/28521/2
Andreas Dilger [Mon, 29 May 2017 00:54:37 +0000 (20:54 -0400)]
LU-282 tests: remove extra logging from sanity 27

Remove extra logging from sanity.sh test_27b to avoid confusing
autotest log parsing.

Replace some uses of $SETSTRIPE and $GETSTRIPE with $LFS in these
functions since this was only needed during the ancient transition
from the standalone "lstripe" binary.

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/27322
Lustre-commit: f0795a24fd79e2cf2c2dccc1a2b510fabd9ddacf

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I270d2f75cd803bede5776117c9d5aaaa5b3ebbe5
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28521
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9235 libcfs: don't dump stack if just touched 20/28520/2
Hongchao Zhang [Wed, 10 May 2017 03:45:19 +0000 (11:45 +0800)]
LU-9235 libcfs: don't dump stack if just touched

If some lc_watchdog was touched before lcw_dump_stack dumped
the stack of the thread, it should not dump it anymore for
the thread is verified to be active and no need to dump.

Lustre-change: https://review.whamcloud.com/23162
Lustre-commit: 1376094062c1e46c985f04d82821114d84329699

Change-Id: I8e4acc1793bb8458ee3b6dc73f2953670ed22896
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28520
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 lnet: kernel socket accept takes new bool agrument 63/28463/2
James Simmons [Wed, 14 Jun 2017 16:42:52 +0000 (12:42 -0400)]
LU-9558 lnet: kernel socket accept takes new bool agrument

During the development of the linux 4.11 kernel it was discovered
that the kernel socket layer could get into lockdep situation. To
handle this a new bool argument was added to the accept member
of struct socket. For LNet we can always pass false.

Lustre-commit: 15045c9067fd021baa0ec925bcc245949945d01e
Lustre-change: https://review.whamcloud.com/27642

Change-Id: I420cda95b70cf927b1a6e3493b631bc5a3585d74
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27642
Reviewed-by: Doug Oucharek <doug@cadentcomputing.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28463
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9364 test: wait rmultiop_start to start 40/28440/2
Hongchao Zhang [Thu, 13 Apr 2017 07:48:32 +0000 (15:48 +0800)]
LU-9364 test: wait rmultiop_start to start

In rmultiop_start, the remote command could be delayed a while,
and wait some time for the command to run.

Test-Parameters: trivial testlist=replay-vbr

Lustre-change: https://review.whamcloud.com/26729
Lustre-commit: f1e337e077b3bc653c91fda0e19a5346ca154705

Change-Id: Ic8beec725edc89a527c74e2033e59e1da0d444c9
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28440
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9817 lnet: safe access to msg 39/28439/2
Amir Shehata [Tue, 1 Aug 2017 21:24:57 +0000 (14:24 -0700)]
LU-9817 lnet: safe access to msg

When tx credits are returned if there are pending messages they
need to be sent. Messages could have different tx_cpts, so the
correct one needs to be locked. After lnet_post_send_locked(),
if we locked a different CPT then we need to relock the correct one
However, as part of lnet_post_send_locked(), lnet_finalze() can
be called which can free the message. Therefore, the cpt of the
message being passed must be cached in order to prevent access to
freed memory.

Lustre-change: https://review.whamcloud.com/28308
Lustre-commit: 7af6307ba4e67673bc52aaaeb54f2cb4b632a3b7

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I959fdc30daf87b5575d8371da20d5cf6f64e7d3c
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28439
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9731 Limit work-around to EL7 only 38/28438/2
Brian J. Murrell [Tue, 25 Jul 2017 12:02:24 +0000 (08:02 -0400)]
LU-9731 Limit work-around to EL7 only

Since the workaround previously landed for LU-9731 only applies to
EL7, only apply it for EL7 builds.

Lustre-change: https://review.whamcloud.com/28202
Lustre-commit: 950c511276866efb6af8defe49213fd69b8883d2

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Id74f03f3af74f324320e094e32f7b7480259145c
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28438
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8275 tests: add flag to enable secret shared key for tests 73/28373/2
Chris Hanna [Wed, 19 Jul 2017 14:25:10 +0000 (10:25 -0400)]
LU-8275 tests: add flag to enable secret shared key for tests

When the SHARED_KEY environment variable is set to true,
test-framework will set up a shared key between the nodes and start
Lustre with shared key enabled. Three tests (28,29,30) are also
added to sanity-sec in order to test shared key features.

Lustre-commit: 62ed4f22e21075daa074f2c7f92be6509d76e51c
Lustre-change: https://review.whamcloud.com/20780

Change-Id: I1fb15e1b6541ef67dc72d555fdcf9820874f0f75
Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Signed-off-by: Chris Hanna <hannac@iu.edu>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28373
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
6 years agoLU-9266 hsm: don't add request when cdt is stopped 41/28441/2
Sergey Cheremencev [Mon, 20 Mar 2017 14:20:40 +0000 (22:20 +0800)]
LU-9266 hsm: don't add request when cdt is stopped

Check cdt_state after getting layout lock in mdt_hsm_add_actions.
Fix protects against several RESTORE records addressed to the
same object in llog. Such records causes mount to hung when
starting hsm:
D: 15524  TASK: ffff880068b5b540  CPU: 4   COMMAND: "lctl"
 #0 [ffff8800bacd9728] schedule at ffffffff81525d30
 #1 [ffff8800bacd97f0] ldlm_completion_ast at ffffffffa08527f5 [ptlrpc]
 #2 [ffff8800bacd9890] ldlm_cli_enqueue_local at ffffffffa0851b8e
[ptlrpc]
 #3 [ffff8800bacd9910] mdt_object_lock0 at ffffffffa0e4ec4c [mdt]
 #4 [ffff8800bacd99c0] mdt_object_lock at ffffffffa0e4f694 [mdt]
 #5 [ffff8800bacd99d0] mdt_object_find_lock at ffffffffa0e4f9c1 [mdt]
 #6 [ffff8800bacd9a00] hsm_restore_cb at ffffffffa0e9b533 [mdt]
 #7 [ffff8800bacd9a50] llog_process_thread at ffffffffa05fd699
[obdclass]
 #8 [ffff8800bacd9b10] llog_process_or_fork at ffffffffa05fdbaf
[obdclass]
 #9 [ffff8800bacd9b60] llog_cat_process_cb at ffffffffa0601250
[obdclass]

Lustre-change: https://review.whamcloud.com/26215
Lustre-commit: 37a5157b84bce367e31743cb8648a15618492531

Change-Id: Ib09139795d847cac2e5f079a192a3548d32db09c
Seagate-bug-id: MRP-4251
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28441
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9744 mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog 03/28403/3
Bruno Faccini [Fri, 7 Jul 2017 14:42:07 +0000 (16:42 +0200)]
LU-9744 mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog

In hsm_cdt_request_completed() and upon error being returned
from mdt_hsm_get_md_hsm(), where "struct md_hsm mh" has not been
populated, HS_DIRTY can be wrongly detected and thus CLF_HSM_DIRTY
flag will be reported by error
This can be the cause of errors in associated sanity-hsm sub-tests
test_220a, test_222c, test_222d, tests_224a, when analyzing
ChangeLog flags.
!IS_ERR(obj) should also be tested before adding CLF_HSM_DIRTY
in cl_flags.

Lustre-change: https://review.whamcloud.com/27962
Lustre-commit: 1b6af5006d0a36615f059030b005d55d3c7bb45e

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I4469a55b35ea5d35a9f0be152f085bd676f74240
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28403
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9597 ofd: fix race for project setattr 02/28402/2
Wang Shilong [Sat, 29 Jul 2017 13:54:30 +0000 (21:54 +0800)]
LU-9597 ofd: fix race for project setattr

sanity-quota 33 exposed an intresting project quota bug,
problem is we could hit following condition:

step 1: create an empty file
step 2: buffer write data to file, at this time project id 0 is packed.
step 3: chattr file's project id

If write RPC is generated on client but not reaching OST yet, and step 3
chattr is issued in this time window and chattr on OST is done before
write PRC being processed on OST:

That means we have changed file's project ID, but ofd_attr_handle_id()
did not clear S_ISUID and S_ISGID for this case. Write RPC arrived on
OST, first write RPC will call ofd_attr_handle_id() to set attribute.
Unfortunately it will think this is first write as S_ISUID and S_ISGID
is set, project id will be reset with packed id 0, thus we got wrong
project accounting.

We should use another file mode to indicate whether
project id has been initialized, this patch tries to
fix this problem.

Lustre-change: https://review.whamcloud.com/28274
Lustre-commit: fb9152406da6fe439b75244e769db7dacb20a8d1

Change-Id: Ie2f9ce5b662c3011aa1cd2f59e1fb20526a3e3d7
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28402
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9203 lnet: fix lnet_cpt_of_md() 00/28400/3
Amir Shehata [Fri, 21 Jul 2017 04:17:50 +0000 (21:17 -0700)]
LU-9203 lnet: fix lnet_cpt_of_md()

The intent of this function is to get the cpt nearest to the
memory described by the MD.

There are three scenarios that must be handled:
1. The memory is described by an lnet_kiov_t structure
 -> this describes kernel pages
2. The memory is described by a struct kvec
 -> this describes kernel logical addresses
3. The memory is a contiguous buffer allocated via vmalloc

For case 1 and 2 we look at the first vector which contains
the data to be DMAed, taking into consideration the msg offset.

For case 2 we have to take the extra step of translating the kernel
logical address to a physical page using virt_to_page() macro.

For case 3 we need to use is_vmalloc_addr() and vmalloc_to_page to
get the associated page to be able to identify the CPT.

o2iblnd uses the same strategy when it's mapping the memory into
a scatter/gather list. Therefore, lnet_kvaddr_to_page() common
function was created to be used by both the o2iblnd and
lnet_cpt_of_md()

kmap_to_page() performs the high memory check which
lnet_kvaddr_to_page() does. However, unlike the latter it handles
the highmem case properly instead of calling LBUG. It's not
100% clear why the code was written that way. Since the legacy
code will need to still be maintained, adding kmap_to_page() will
not simplify the code. Furthermore, the behavior for kernels
which export kmap_to_page() will be different from kernels which
do not. At worst calling kmap_to_page() might mask some problems
which would've been caught by the LBUG earlier on. However, at
the time of this fix, that LBUG has never been observed.

Lustre-change: https://review.whamcloud.com/28165
Lustre-commit: 43b0e6328b113d9ee64e0b8a0cc35bff28eb3383

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I2c67e5df77d60112bf27f900e0325d189f193aed
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28400
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9758 build: allow disabling lustre test and iokit rpm creation 72/28372/2
James Simmons [Mon, 31 Jul 2017 17:25:03 +0000 (13:25 -0400)]
LU-9758 build: allow disabling lustre test and iokit rpm creation

While attempting to create a basic set of rpms that didn't
include the lustre test and iokit rpm I encountered build
breakage. Test the lustre_test conditional in the spec file
so we don't attempt to build special lustre test rpms. The
lustre test rpm is actually dependant on the lustre iokit
rpm so if --disable-iokit is set we should disable lustre
test rpms generation as well.

Test-Parameters: trivial

Lustre-commit: f810a0b0c5af842c7e644f1e82594f1615e540e6
Lustre-change: https://review.whamcloud.com/27985

Change-Id: I39e215aa6816b782314c779ad6f752bf32a43341
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28372
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7988 hsm: run HSM coordinator once per second at most 68/28368/2
Frank Zago [Wed, 6 Apr 2016 21:03:14 +0000 (16:03 -0500)]
LU-7988 hsm: run HSM coordinator once per second at most

When there is heavy HSM usage, each new HSM request can trigger the
HSM coordinator, which may run many times per seconds. When it is
running it locks the HSM catalog (using cdt_llog_lock) preventing any
other HSM operation to happen, such as insertion, removal or dumping
of the requests.

Limit the coordinator to run once per second, and only if there is
work to do. It will still execute the loop once every 10 seconds (or
as defined by the procfs loop_period parameter) to do housekeeping.

Lustre-change: https://review.whamcloud.com/19341
Lustre-commit: cc6ef11d2f972ebc440013bddda87a536a09750c

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Ide3f061f8943a3088ea713993521897fb74e5d99
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-on: https://review.whamcloud.com/28368
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9183 llite: add support set_acl method in inode operations 42/28342/2
Dmitry Eremin [Sat, 10 Jun 2017 21:36:52 +0000 (17:36 -0400)]
LU-9183 llite: add support set_acl method in inode operations

Linux kernel v3.14 adds set_acl method to inode operations.
See kernel commit 893d46e443346370cd4ea81d9d35f72952c62a37

Lustre-commit: c8d56a664306c3ceb4e598999c41eb72ea46a68f
Lustre-change: https://review.whamcloud.com/25965

Change-Id: Ia40d55364016fafa8633fdaecd317910505f8ad4
Signed-off-by: Dmitry Eremin <dmitry.eremin@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>
Reviewed-on: https://review.whamcloud.com/28342
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7372 mgs: reprocess all locks at device fini 23/28323/3
Jinshan Xiong [Wed, 10 May 2017 17:39:25 +0000 (10:39 -0700)]
LU-7372 mgs: reprocess all locks at device fini

This is to avoid a case that IR lock revocation is going on when
the obd is being stopped, an extra ldlm_reprocess_recovery_done() is
required to make revocation process move forward.

Turn off 'set -e' in rundbench. Otherwise killing dbench process will
return an error to wait(1) in rundbench. Since test-framework has
turned on error on exit, it will set test result as failure, which
is actually a false alarm.

Test-Parameters: envdefinitions=SLOW=yes,ONLY=26 testlist=replay-dual,replay-dual,replay-dual,replay-dual

Lustre-change: https://review.whamcloud.com/17853
Lustre-commit: 2dc19f20ba9fcc1bcac6ae7ee5169ce10caab882

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I43ab1df9c8fe5aea15da6c90175fd08a0b099ea2
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28323
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9728 osd: use GFP_HIGHUSER for non-local IO 18/28318/3
Andreas Dilger [Fri, 30 Jun 2017 20:37:07 +0000 (14:37 -0600)]
LU-9728 osd: use GFP_HIGHUSER for non-local IO

When the obdfilter code was split into separate OFD and OSD modules,
the bulk IO page allocation was implemented to use GFP_NOFS to avoid
allocations recursing into the filesystem and causing deadlocks.

However, this is only possible if the RPC is coming from a local
client, as we might end up waiting on a page sent in the request we're
serving. Local RPCs use __GFP_HIGHMEM so that the pages can use all of
the available memory on the OSS on 32-bit machines.

It is possible to use more aggressive GFP_HIGHUSER flags for non-local
clients to be able to generate more memory pressure on the OSS and
allow inactive pages to be reclaimed, since the OSS doesn't have any
other processes or allocations that generate memory reclaim pressure.

See also b=17576 (bdf50dc9) and b=19529 (3dcf18d3) for details.

The patch also implements an LNet function to determine if a client NID
is local or not.  This becomes more complex in the LNet Multi-Rail world
and it is really LNet's job to handle NIDs, not that of Lustre.

Lustre-change: https://review.whamcloud.com/27908
Lustre-commit: b0ab95d6133e783acacc6329c025d17fb282775e

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2806c9c5c2fe269669eafdafaf2310924c3ebbe5
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28318
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9683 ptlrpc: fix argument misorder 90/28290/2
Alex Zhuravlev [Wed, 19 Jul 2017 04:59:13 +0000 (00:59 -0400)]
LU-9683 ptlrpc: fix argument misorder

involved in timediffs calculation.

Lustre-commit: 61c48e79fdfb825ea1ab2649cdadaccfb863155c
Lustre-change: https://review.whamcloud.com/28027

Change-Id: Ib4a45dddb3866824b696aaeaa190f2ab9b1c71ac
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28290
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9773 kernel: kernel update [SLES12 SP2 4.4.74-92.29]
Bob Glossman [Thu, 13 Jul 2017 19:32:30 +0000 (12:32 -0700)]
LU-9773 kernel: kernel update [SLES12 SP2 4.4.74-92.29]

Update target and kernel_config files for new version

Test-Parameters: clientdistro=sles12sp2 testgroup=review-ldiskfs   mdsdistro=sles12sp2 ossdistro=sles12sp2   mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I42107acb5a12f5200d3cb58121d10ffdc1dbc6d2
Reviewed-on: https://review.whamcloud.com/28043
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-9763 kernel: kernel update RHEL6.9 [2.6.32-696.6.3.el6]
Bob Glossman [Tue, 11 Jul 2017 18:47:57 +0000 (11:47 -0700)]
LU-9763 kernel: kernel update RHEL6.9 [2.6.32-696.6.3.el6]

Update RHEL6.9 kernel to 2.6.32-696.6.3.el6
kernel patch added as a workaround for LU-9698

Test-Parameters: clientdistro=el6.9 mdsdistro=el6.9   ossdistro=el6.9 mdtfilesystemtype=ldiskfs   ostfilesystemtype=ldiskfs testgroup=review-ldiskfs
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I4c3d2faa35d70b5aa981e8dc9bc630275c1c61f1
Reviewed-on: https://review.whamcloud.com/28029
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-9712 kernel: kernel update [SLES11 SP4 3.0.101-107]
Bob Glossman [Mon, 26 Jun 2017 17:05:26 +0000 (10:05 -0700)]
LU-9712 kernel: kernel update [SLES11 SP4 3.0.101-107]

Update SLES11 SP4 kernel to 3.0.101-107

Test-Parameters: mdsdistro=sles11sp4 ossdistro=sles11sp4   clientdistro=sles11sp4 mdtfilesystemtype=ldiskfs   ostfilesystemtype=ldiskfs testgroup=review-ldiskfs
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ic62b288becc936d54ee88539ab1635ca3a78cf7f
Reviewed-on: https://review.whamcloud.com/27841
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@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>
6 years agoLU-9738 kernel: kernel update RHEL7.3 [3.10.0-514.26.2.el7]
Bob Glossman [Wed, 5 Jul 2017 15:08:06 +0000 (08:08 -0700)]
LU-9738 kernel: kernel update RHEL7.3 [3.10.0-514.26.2.el7]

update RHEL 7.3 kernel to 3.10.0-514.26.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8eff2a9d0c732d97dac1df0c9233d88dbe564a4f
Reviewed-on: https://review.whamcloud.com/27934
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-9345 tests: use hsm_remove with --mntpath for deleted files 20/28320/2
Quentin Bouget [Tue, 9 May 2017 12:05:36 +0000 (14:05 +0200)]
LU-9345 tests: use hsm_remove with --mntpath for deleted files

In test_29d of sanity-hsm, to run "lfs hsm_remove" on a file deleted
from Lustre, one has to use the --mntpath option.

Lustre-change: https://review.whamcloud.com/27006
Lustre-commit: cff9f1e7c6a41bfa05d1455b8964860803d12612

Test-Parameters: trivial testlist=sanity-hsm clientcount=3 envdefinitions="ONLY=29d"
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I35865c059e498e1a0ced0cebeac22a8491231e00
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28320
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9710 utils: adjust barrier_stat input/output 19/28319/2
Fan Yong [Wed, 19 Jul 2017 05:58:06 +0000 (13:58 +0800)]
LU-9710 utils: adjust barrier_stat input/output

The command format will be:
lctl barrier_stat [--state|-s] [--timeout|-t] <fsname>

If no option is specified, or both "state" and "timeout"
options are specified, then the output format will be:
state: xxx
timeout: nnn seconds

Otherwise, only the value ('xxx' or 'nnn') corresponding
to the given option will be printed.

Lustre-change: https://review.whamcloud.com/27810
Lustre-commit: 3f198baf4fe343b679ce14ee11069126f4be3e72

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If39f95ef984be3ab709b1366fdefe8eedb4b2453
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28319
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9778 llite: Read ahead should return pages read 16/28316/2
Patrick Farrell [Fri, 14 Jul 2017 14:07:52 +0000 (09:07 -0500)]
LU-9778 llite: Read ahead should return pages read

ll_read_ahead_pages was modified by:
LU-7990 clio: revise readahead to support 16MB IO
d8467ab8a2ca15fbbd5be3429c9cf9ceb0fa78b8

And returning the count of pages read was removed.

This only affects debug, but it's very nice to have it
printed out, and several messages still try to print out
pages read ahead, but print 0.

Restore this functionality.

Lustre-change: https://review.whamcloud.com/28052
Lustre-commit: 805118241598df27c7617eff4cb9d8229bc8d2ba

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I80fe66b5195629e0c46d5d19c76e3bcc0030a22a
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28316
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9500 lnd: Don't Page Align remote_addr with FastReg 37/28237/2
Doug Oucharek [Tue, 16 May 2017 23:00:53 +0000 (16:00 -0700)]
LU-9500 lnd: Don't Page Align remote_addr with FastReg

Trying to page align the remote_addr for IB_RDMA_WRITE work
requests is triggering "dump_cqe" errors from MOFED 4.x + mlx5.

This patch removes the address masking we were doing with FastReg
which was trying to page align remote_addr values. I am also
removing the setting of "mr->iova" with FastReg as this is being
done in the call to ib_map_mr_sg() and could cause problems.

Lustre-change: https://review.whamcloud.com/27149
Lustre-commit: 6c6341804133ea0a4d4535c621f28f61fe6c29ab

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: If35baa467d8d60866f709b5feea7f619063c6da4
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28237
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9729 lnet: correct locking in legacy add net 36/28236/2
Amir Shehata [Sat, 1 Jul 2017 01:06:40 +0000 (18:06 -0700)]
LU-9729 lnet: correct locking in legacy add net

Make sure to unlock the api mutex properly
in lnet_dyn_add_net()

Lustre-change: https://review.whamcloud.com/27907
Lustre-commit: 65326ab2f3e7493f72767cd3c69471f3985c77f6

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I786545de690ea5966771be3e84d3561b794d55ec
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28236
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9716 osc: osc_extent_tree_dump0() implementation is suboptimal 35/28235/2
Andrew Perepechko [Wed, 28 Jun 2017 09:24:26 +0000 (12:24 +0300)]
LU-9716 osc: osc_extent_tree_dump0() implementation is suboptimal

Avoid looping in osc_extent_tree_dump() if debugging is disabled.
This helps us save some cpu ticks.

Lustre-change: https://review.whamcloud.com/27866
Lustre-commit: 97115ccd159e4503ca16cb7f68ee7479c780f1cf

Change-Id: I492429d8a6de79f67b5923895ffa58b7fe3a100d
Seagate-bug-id: MRP-4469
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28235
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>