Whamcloud - gitweb
fs/lustre-release.git
17 months agoLU-11982 utils: Correct lfs migrate help 84/34284/3
Patrick Farrell [Wed, 20 Feb 2019 20:04:41 +0000 (15:04 -0500)]
LU-11982 utils: Correct lfs migrate help

Correct lfs migrate help to correctly describe
block/non-block behavior.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Id7c01df08514ecc1b3968ef92a466bd8f5d9e656
Reviewed-on: https://review.whamcloud.com/34284
Tested-by: Jenkins
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11944 llite: Lock inode on tiny write if setuid/setgid set 18/34218/4
Ann Koehler [Fri, 8 Feb 2019 21:41:37 +0000 (15:41 -0600)]
LU-11944 llite: Lock inode on tiny write if setuid/setgid set

During a write, the setuid/setgid bits must be reset if they are
enabled and the user does not have the correct permissions. Setting
any file attributes, including setuid and setgid, requires the inode
to be locked. Writes became lockless with the introduction of
LU-1669. Locking the inode in the setuid/setgid case was added to
vvp_io_write_start() as a special case. The inode locking was not
included when support for tiny writes was added with LU-9409. This
mod adds the necessary inode lock/unlock calls to ll_do_tiny_write().

If the inode is not locked when setuid/setgid are reset, the kernel
will issue a one time warning and Lustre may hang trying to get the
inode lock in ll_setattr_raw().

Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I5e8a98789828de52dbff4226958741320aba92e6
Reviewed-on: https://review.whamcloud.com/34218
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-9859 libcfs: use a workqueue for rehash work. 69/34169/3
NeilBrown [Mon, 11 Feb 2019 15:46:14 +0000 (10:46 -0500)]
LU-9859 libcfs: use a workqueue for rehash work.

lustre has a work-item queuing scheme that provides the
same functionality as linux work_queues.
To make the code easier for linux devs to follow, change
to use work_queues.

Linux-commit: 0aa211e39857f17e24126c47f6e3fe3b971344b3

Change-Id: I1600ea1ef8769f1f6489b81fd578685ea58f9cb6
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/34169
Tested-by: Jenkins
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11894 lnet: check for asymmetrical route messages 19/34119/4
Sebastien Buisson [Mon, 28 Jan 2019 15:16:42 +0000 (00:16 +0900)]
LU-11894 lnet: check for asymmetrical route messages

Asymmetrical routes can be an issue when debugging network,
and allowing them also opens the door to attacks where hostile
clients inject data to the servers.

In order to prevent asymmetrical routes, add a new lnet kernel
module option named 'lnet_drop_asym_route'. When set to non-zero,
lnet_parse() will check if the message received from a remote peer
is coming through a router that would normally be used by this node
to reach the remote peer. If it is not the case, then it means we
are dealing with an asymmetrical route message, and the message will
be dropped.

The check for asymmetrical route can also be switched on/off with
the command 'lnetctl set drop_asym_route 0|1'. And this parameter is
exported/imported in Yaml.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I06fb23d9e46984d79c14fa9b53b2fa04ce3c50c5
Reviewed-on: https://review.whamcloud.com/34119
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11891 utils: getstripe use --mdt-index consistently 16/34116/2
Andreas Dilger [Sun, 27 Jan 2019 18:23:48 +0000 (11:23 -0700)]
LU-11891 utils: getstripe use --mdt-index consistently

LU-10856 fixed most usages of "warning: '-M' deprecated,
use '--mdt-index' or '-m' instead" but missed a few in
cases in sanity test_271d, test_271e, and test_271f.
Fix those tests to use "--mdt-index".

Also, lfs has a few places were the usage of "--mdt-index"
and "--mdt" is inconsistent.  Fix those options to be used
consistently across all commands.

Fixes: 6c617a3d56 ("LU-10856 tests: remove deprecated lfs ...")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I013b2198f3a39533da9a0067a0bf5846604b3052
Reviewed-on: https://review.whamcloud.com/34116
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-9855 obd: use ldo_process_config for mdc and osc layer 06/34106/7
James Simmons [Thu, 24 Jan 2019 16:59:32 +0000 (11:59 -0500)]
LU-9855 obd: use ldo_process_config for mdc and osc layer

Both the mdc and osc layer use the lu_device infrastructure but
we don't use ldo_process_config() which is preferred over the
currently used obd_process_config() handling. Migrate to the
lu_device ldo_process_config() for both mdc and osc layer.

Change-Id: I4d5e84c48377283148133e6338ef7257c44b89a3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34106
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11849 utils: fix to make exclude projid works 05/34005/4
Wang Shilong [Thu, 10 Jan 2019 15:32:14 +0000 (23:32 +0800)]
LU-11849 utils: fix to make exclude projid works

We intended to use projid not uid here, fix it.
Also add ! --projid options test to cover this.

Test-Parameters: trivial testlist=sanity-quota
Change-Id: I64c3f1c68885947d0e91626525ee037756e1d7d8
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/34005
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
17 months agoLU-11830 lov: avoid signed vs. unsigned comparison 21/33921/8
Andreas Dilger [Wed, 26 Dec 2018 09:29:55 +0000 (02:29 -0700)]
LU-11830 lov: avoid signed vs. unsigned comparison

In the expansion of do_div64() GCC complains about pointer comparison
because loff_t is not a u64 variable as it should be.  lov_do_div64()
also has signed vs. unsigned comparisons due to a signed loff_t.
Change lov_do_div() to use a 64-bit variable for do_div() instead of
loff_t to avoid these warnings.

Change OST_MAXREQSIZE and friends to be consistently unsigned values
to avoid compiler warnings.

Fix "lfs mirror resync" to avoid comparing signed and unsigned valued.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6df31a2c0d75e5777f471fe8cb252715dd85a5b1
Reviewed-on: https://review.whamcloud.com/33921
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8066 utils: have llapi_target_iterate use sysfs tree 99/33799/16
James Simmons [Fri, 22 Feb 2019 15:41:34 +0000 (10:41 -0500)]
LU-8066 utils: have llapi_target_iterate use sysfs tree

Update llapi_target_iterate() to not use 'devices' but collect the
data from the lustre sysfs tree itself.

Change-Id: If100b4918bdcc8b24e72f37127048a32a808310f
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33799
Tested-by: Jenkins
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11010 tests: remove return after skip for conf-sanity 35/32735/7
James Nunez [Wed, 27 Jun 2018 15:52:22 +0000 (09:52 -0600)]
LU-11010 tests: remove return after skip for conf-sanity

The skip() routine now contains a call to exit. All calls
to skip() and skip_env() should be reviewed and calls to
return() that followed skip() should be removed.

This is the fifth patch in a series of patches that
remove calls to return() after skip() in the Lustre test
suites.

A comment is added to skip_env() defining when it should
be used.

Calls to return() after skip() are removed for:
conf-sanity.sh
functions.sh

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Idbcdffda38aaac07f128ae42a2ffcda8986afc33
Reviewed-on: https://review.whamcloud.com/32735
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8207 scripts: add auto-stripe option to lfs_migrate 52/20552/18
Nathan Dauchy [Mon, 2 Jul 2018 14:21:35 +0000 (10:21 -0400)]
LU-8207 scripts: add auto-stripe option to lfs_migrate

Add a "-A" flag to lfs_migrate, which will automatically select the
stripe count as the file is rewritten. Initial algorithm to
determine stripe count is sqrt(size_in_GB)+1, with an additional cap
on object size, though the algorithm or thresholds could conceivably
change in the future.  The primary intent for this feature is to be
able to give users a tool to fix stripe settings on existing files
based on file size.

A new "-C" flag specifies the object size cap.  On each OST, the
amount of space available for migration is capped by dividing the
free space of the smallest OST by the specified value.

A new "-M" flag allows OSTs with free space less than the specified
value to be considered unavailable for migration.

A new "-v" flag increases verbosity to help debug what is being done.

A new "-X" flag limits the amount of free space on each OST that
can be used for migration to the specified value.  This flag is
useful for testing by simulating OSTs that are nearly full.

A new sanity test verifies the operation of the new "-A" flag.

Test-Parameters: trivial
Signed-off-by: Nathan Dauchy <nathan.dauchy@nasa.gov>
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I9ce8b64e028d9abb66b6b49cf7675263fd7202f0
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/20552
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
17 months agoLU-11502 migrate: link parents lock may deadlock 25/33325/3
Lai Siyao [Fri, 31 Aug 2018 20:23:11 +0000 (04:23 +0800)]
LU-11502 migrate: link parents lock may deadlock

To cancel link parent lock, it should cancel all locks taken including
source parent locks, otherwise it may cause deadlock, so lock retry
should start from beginning.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I820d0e1664dbb405d6ed8245bb4ca2137140c323
Reviewed-on: https://review.whamcloud.com/33325
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8365 ldiskfs: procfs entries for mballoc 42/21142/14
Lokesh Nagappa Jaliminche [Mon, 4 Jul 2016 09:04:20 +0000 (14:34 +0530)]
LU-8365 ldiskfs: procfs entries for mballoc

Export mballoc streaming block allocator variables
mb_last_group and mb_last_start through procfs.

Test-Parameters: testgroup=review-ldiskfs
Change-Id: I5dd00503a81c6819751c9f99b64615b497ef4e28
Cray-bug-id: LUS-3176
Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com>
Signed-off-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-on: https://review.whamcloud.com/21142
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
17 months agoLU-11413 lnet: use right address for routing message 32/34032/3
Alexey Lyashkov [Tue, 22 Jan 2019 08:41:00 +0000 (11:41 +0300)]
LU-11413 lnet: use right address for routing message

msg_initiator is real sender address, so use this address as
hash source to better distribution against CPT on server side.

Cray-bug-id: LUS-6841
Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Change-Id: Ie4487ea29d9db458564c66518270ad82b5ffae49
Reviewed-on: https://review.whamcloud.com/34032
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11413 lnet: use right rtr address 31/34031/3
Alexey Lyashkov [Tue, 22 Jan 2019 08:40:59 +0000 (11:40 +0300)]
LU-11413 lnet: use right rtr address

use a sender router to avoid credits distribution problem.
Sender is preferable rtr now.

Cray-bug-id: LUS-6490
Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Change-Id: Ic7cf57820176979a52675dcc74342c2e26335e73
Reviewed-on: https://review.whamcloud.com/34031
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11775 osc: check if opg is in lru list without locking 60/33860/4
Li Dongyang [Fri, 14 Dec 2018 01:36:22 +0000 (12:36 +1100)]
LU-11775 osc: check if opg is in lru list without locking

osc_lru_use is called for every page queued for io,
we can just check if the osc_page is in the lru list
without taking the cl_lru_list_lock and return if not
as a fast path.
Note we still need to do the check again after locking
as it could be removed from the lru list by another thread.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I1587b6b5547ae5a7a8bfe32a78361bb888c85d5b
Reviewed-on: https://review.whamcloud.com/33860
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11951 ptlrpc: reset generation for old requests 21/34221/9
Alex Zhuravlev [Mon, 11 Feb 2019 11:27:54 +0000 (14:27 +0300)]
LU-11951 ptlrpc: reset generation for old requests

all requests generated while the import is changing from
FULL to IDLE need to be moved to the new generation.

Change-Id: I59d9b92680c724132dba9c7315c26e9851c5d5d2
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34221
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8299 llite: ll_fault should fail for insane file offsets 42/34242/5
Alexander Zarochentsev [Tue, 12 Feb 2019 15:28:37 +0000 (18:28 +0300)]
LU-8299 llite: ll_fault should fail for insane file offsets

A page fault for a mmapped lustre file at offset large than
2^63 cause Lustre client to hang due to wrong page index
calculations from signed loff_t.
There is no need to do such calclulations but perform
page offset sanity checks in ll_fault().

Cray-bug-id: LUS-1392
Signed-off-by: Alexander Zarochentsev <c17826@cray.com>
Change-Id: Ia492083ee4bdc23edfcbf88cb6d7e9726b2ca80c
Reviewed-on: https://review.whamcloud.com/34242
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
17 months agoLU-11838 llite: remove assert for acl refcount 36/34236/3
James Simmons [Tue, 12 Feb 2019 23:59:19 +0000 (18:59 -0500)]
LU-11838 llite: remove assert for acl refcount

The purpose of this asssert to was to ensure lustre
was properly managing its posix_acl access. This test
is invalid due to the VFS layer also taking references
on the posix_acl. In reality their is no simple way to
detect this class of mistakes.

* lastest kernels remove this refcount *

Linux-commit: 6a42e615a28bad49f2e04829486e94190c066390

Change-Id: I167f2de449a2e8357517f33c2e81a25b25104d57
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34236
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11960 build: Add missing libssl-dev DEB package 33/34233/3
Thomas Stibor [Tue, 12 Feb 2019 13:30:51 +0000 (14:30 +0100)]
LU-11960 build: Add missing libssl-dev DEB package

Building Lustre client DEB packages on Debian fails due to missing
package libssl-dev and results in error:
"No such file or directory #include <openssl/evp.h>"
Add required package libssl-dev into "make debs" chain.

Test-Parameters: clientdistro=ubuntu1804 envdefinitions=SANITY_EXCEPT=802a trivial
Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: Ib99cd744b2d44d3f6c1915e2f2d2da7d83e07cae
Reviewed-on: https://review.whamcloud.com/34233
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11206 tests: Use import_ready to check IDLE 25/34225/2
Patrick Farrell [Mon, 11 Feb 2019 17:47:09 +0000 (12:47 -0500)]
LU-11206 tests: Use import_ready to check IDLE

When checking if a client/OST import is up, we have to
check for IDLE as well as FULL.

wait_osc_import_ready is provided for this, but a few spots
don't use it, so they occasionally fail.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I826659a7f5953dee4e4551c1177479ef742b5589
Reviewed-on: https://review.whamcloud.com/34225
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-9706 dt: remove dt_txn_hook_commit() 12/34212/3
Alex Zhuravlev [Thu, 7 Feb 2019 09:33:12 +0000 (12:33 +0300)]
LU-9706 dt: remove dt_txn_hook_commit()

it's not used and it's not safe as dt_txn_callback_del()
and dt_txn_callback_add() can race with commit callbacks.

Change-Id: Ib80b0f69be008b4f895586dde35d1a5833a1a861
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34212
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
17 months agoLU-11927 kernel: new kernel [SLES12 SP4 4.12.14-95.6.1] 91/34191/4
Jian Yu [Mon, 11 Feb 2019 23:53:13 +0000 (15:53 -0800)]
LU-11927 kernel: new kernel [SLES12 SP4 4.12.14-95.6.1]

This patch makes changes to support new SLES12 SP4 release
for Lustre client.

Test-Parameters: trivial clientdistro=sles12sp4 \
envdefinitions=LNET_SELFTEST_EXCEPT=smoke,SANITY_EXCEPT=103a

Change-Id: Ibe59ebc30c25f2cab771ac4c2c9b7a9b974732d5
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34191
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11914 build: add a configure check for l_getsepol 83/34183/5
Sebastien Buisson [Tue, 5 Feb 2019 14:09:45 +0000 (23:09 +0900)]
LU-11914 build: add a configure check for l_getsepol

l_getsepol requires openssl-devel, so add a configure check for
openssl/evp.h header and EVP_MD_CTX_create function, and disable
building l_getsepol in case they are missing.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I31ddbc2f5300e9e38db9e00e2b7fbcac7f83d9e5
Reviewed-on: https://review.whamcloud.com/34183
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11923 utils: fix mkfs.lustre meta_bg handling 78/34178/2
Andreas Dilger [Tue, 5 Feb 2019 10:06:43 +0000 (03:06 -0700)]
LU-11923 utils: fix mkfs.lustre meta_bg handling

If meta_bg is specified as a formatting option, mke2fs reports an
error because it conflicts with the default resize_inode feature,
which is enabled by default for filesystems under 2^32 blocks.

Enable meta_bg by default if the filesystem is over 2^36 blocks
(256TiB) or the group descriptor table grows too large.

Disable the resize_inode feature if meta_bg is explicitly specified
or if the filesystem is over 2^32 blocks.

Fix is_e2fsprogs_feature_supp() to return a boolean in the proper
sense for the function, rather than a 0 or -ve error number, since
that doesn't make sense for the name of the function.

Drop a level of indent in ldiskfs_make_lustre() by returning an
error directly if the ldd_mount_type is unknown.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8886e6850aad5868155b2208043dbbc4873ebbe5
Reviewed-on: https://review.whamcloud.com/34178
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-9859 libcfs: use strim instead of cfs_trimwhite. 68/34168/4
NeilBrown [Mon, 11 Feb 2019 15:56:11 +0000 (10:56 -0500)]
LU-9859 libcfs: use strim instead of cfs_trimwhite.

Linux lib provides identical functionality to cfs_trimwhite,
so discard that code and use the standard.

Linux-commit: 213b14b1fa55790f55b180ed5121b07f037c7ddd

Change-Id: Ide9d829aef554541a3dfb65ecb305e89c7ddf74a
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/34168
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: Jenkins
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11913 utils: allow "mq-deadline" as scheduler 63/34163/2
Andreas Dilger [Fri, 1 Feb 2019 20:10:40 +0000 (13:10 -0700)]
LU-11913 utils: allow "mq-deadline" as scheduler

Allow the "mq-deadline" scheduler for multi-queue block devices, in
addition to just "noop" and "deadline".  Explicitly add "deadline"
as a valid option, in case the default scheduler is changed.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2cb0878188aea43f88c503ea70a699be083ebbe5
Reviewed-on: https://review.whamcloud.com/34163
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11905 mdc: Add RETURN to mdc_intent_open_pack 40/34140/3
Patrick Farrell [Wed, 30 Jan 2019 21:28:08 +0000 (16:28 -0500)]
LU-11905 mdc: Add RETURN to mdc_intent_open_pack

mdc_intent_open_pack has ENTRY, but not RETURN.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I443dad13db19b6ee8fa4102c97ec93e16f9dd008
Reviewed-on: https://review.whamcloud.com/34140
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11777 tests: add version check sanityn 102 53/33953/6
James Nunez [Tue, 15 Jan 2019 16:08:17 +0000 (09:08 -0700)]
LU-11777 tests: add version check sanityn 102

sanityn test 102 was added to Lustre tag 2.11.57. Thus,
we need to check that the server is 2.11.57 or later
before running test 102.

Test-Parameters: trivial serverjob=lustre-b2_10 serverbuildno=152 testlist=sanityn
Test-Parameters: testlist=sanityn
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ieefd6f0f3dc0051646f07c309fb59dc6124c2975
Reviewed-on: https://review.whamcloud.com/33953
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11768 test: reset qsd_time before test 31/33931/2
Hongchao Zhang [Sat, 22 Dec 2018 22:21:22 +0000 (17:21 -0500)]
LU-11768 test: reset qsd_time before test

In test_6 of sanity-quota, if the qsd_timeout is larger than
TIMEOUT*2, it will trigger the watchdog and cause the test fail.

Change-Id: I3f2993ce2b88e1520b6907ae134557abcd30aa0c
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33931
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11827 llog: protect cathandle in llog_cat_declare_add_rec 14/33914/4
Vladimir Saveliev [Sat, 22 Dec 2018 00:31:45 +0000 (03:31 +0300)]
LU-11827 llog: protect cathandle in llog_cat_declare_add_rec

llog_cat_declare_add_rec() calls llog_cat_prep_log() passing
&cathandle->u.chd.chd_current_log and
&cathandle->u.chd.chd_next_log. Then it has to protect cathandle in
order to avoid race with llog_cat_current_log() when it decides to
change cathandle->u.chd.chd_current_log and
cathandle->u.chd.chd_next_log.

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-6804
Change-Id: I689efb40452af180f137aff35ccabe132a24180a
Reviewed-on: https://review.whamcloud.com/33914
Tested-by: Jenkins
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11775 osc: reduce atomic ops in osc_enter_cache_try 59/33859/3
Li Dongyang [Fri, 14 Dec 2018 01:22:29 +0000 (12:22 +1100)]
LU-11775 osc: reduce atomic ops in osc_enter_cache_try

We can reduce the number of atomic ops performed on
obd_dirty_pages for the common case.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I5526e449d483241d825af18b612ae1d1dff3241e
Reviewed-on: https://review.whamcloud.com/33859
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11773 utils: add PFL flags support to YAML API 52/33852/4
Patrick Farrell [Thu, 13 Dec 2018 20:21:31 +0000 (14:21 -0600)]
LU-11773 utils: add PFL flags support to YAML API

The setstripe YAML interface currently ignores the
lcme_flags field. This means it doesn't work correctly with
some FLR layouts.

Fixing this is a trivial matter of making the YAML layout
generator read & use the lcme_flags field.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: If15999aa58ac3e31da677bd5d1ef8b063b46b1e5
Reviewed-on: https://review.whamcloud.com/33852
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
17 months agoLU-11759 tests: racer cleanup 31/33831/3
Vladimir Saveliev [Fri, 14 Dec 2018 16:59:38 +0000 (19:59 +0300)]
LU-11759 tests: racer cleanup

1. set LCTL in do_nodes $clients $racer so that lustre_build_version
   worked correctly
2. list processes for ps -C properly
3. clear trap ERR in racer routines which sources test-framework.sh

Cray-bug-id: LUS-6592
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: I667efd58004fbe02e79b3c02032133ea41f5337b
Test-Parameters: testlist=racer
Reviewed-on: https://review.whamcloud.com/33831
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11702 o2iblnd: ibc_rxs is created and freed with different size 21/33721/4
Andriy Skulysh [Mon, 6 Aug 2018 16:31:05 +0000 (19:31 +0300)]
LU-11702 o2iblnd: ibc_rxs is created and freed with different size

kiblnd_create_conn()) alloc '(conn->ibc_rxs)': 26832 at ffffc90012e69000
kiblnd_destroy_conn()) kfreed 'conn->ibc_rxs': 4576 at ffffc90012e69000

The size changed by kiblnd_create_conn() :
"peer 172.18.2.3@o2ib - queue depth reduced from 128 to 21"

Based on size LIBCFS_FREE() decides whether to use kfree or vfree
and accounts memory usage.

Allocate ibc_rxs after rdma_create_qp()

Change-Id: I1fb1516bd5427e0c959ce2e71bb248d727bb3c49
Cray-bug-id: LUS-6339
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-on: https://review.whamcloud.com/33721
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8130 libcfs: support latest rhashtable API 36/34036/3
James Simmons [Mon, 11 Feb 2019 16:20:04 +0000 (11:20 -0500)]
LU-8130 libcfs: support latest rhashtable API

With the broad support range of the OpenSFS lustre version pieces
are missing in some distributions to properly support using the
rhashtable API as required by Lustre.

Change-Id: I7ce2949ca2f1d497dcb60a8b17b964e47cdff223
Test-Parameters: trivial
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/34036
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8066 osd: migrate from proc to sysfs 10/32810/18
James Simmons [Fri, 1 Feb 2019 16:26:45 +0000 (11:26 -0500)]
LU-8066 osd: migrate from proc to sysfs

Move the osd based modules, osd-ldiskfs and osd-zfs, from using
proc for most single value files to sysfs. Also update MGS as
well since it had symlinks into the osd proc tree originally.

Change-Id: Ib3838038299937d7e9ae68130d50ec2afb84e996
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32810
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11330 osd-zfs: hash for ./.. must be 0 98/34098/10
Alex Zhuravlev [Thu, 24 Jan 2019 05:04:09 +0000 (08:04 +0300)]
LU-11330 osd-zfs: hash for ./.. must be 0

do not use current iterator position as hash source for dot and dotdot.
instead just return 0 as hash for these entries.

Change-Id: I5ee439b237e8ed98d295f5672b1d0e8a6b48a55b
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34098
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-6142 mgs: Fix style issues for mgs_nids.c 13/33713/2
Arshad Hussain [Sat, 24 Nov 2018 15:01:17 +0000 (20:31 +0530)]
LU-6142 mgs: Fix style issues for mgs_nids.c

This patch fixes issues reported by checkpatch
for file lustre/mgs/mgs_nids.c

Change-Id: Iefdaf6f2aa8c9c426365fe98c4f91438b5fe6689
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/33713
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
17 months agoLU-11089 obdclass: use an rwsem instead of lu_key_initing_cnt. 12/32712/5
NeilBrown [Fri, 28 Dec 2018 14:26:29 +0000 (09:26 -0500)]
LU-11089 obdclass: use an rwsem instead of lu_key_initing_cnt.

The main use of lu_key_initing_cnt is to wait for it to be zero, so
that lu_context_key_quiesce() can continue.  This is a lot
like the behavior of a semaphore.

So use an rwsem instead.

When keys_fill() calls down_read() it will opportunistically spin
while the writer is running.  As the writer is very short - just
setting a bit for keys_fill() to see, this is likey to always
be the case.
lu_context_key_quiesce() will now, if necessary, go to sleep until
woken, rather than spin repeatedly calling schedule.

Code is much more readable this way and lu_keys_guard is no longer
involved in this locking.

We can remove the write_lock from lu_context_key_revive() as there is
nothing to protect against.  This already mustn't race with
lu_context_key_quiesce(), and if keys_fill() runs concurrently and
doesn't see that LCT_QUIESCENT has been cleared, it hardly matters.
After it is cleared, lu_context_refill() will need to be run anyway.

Change-Id: Id183a9372ca42267cc50f2547823585ff383ea1d
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32712
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11089 obdclass: make key_set_version an atomic_t 11/32711/15
NeilBrown [Thu, 15 Nov 2018 19:03:01 +0000 (14:03 -0500)]
LU-11089 obdclass: make key_set_version an atomic_t

As a first step to simplifying the locking in lu_object.c,
change key_set_version to an atomic_t.  This will mean
we don't need to hold a spinlock when incrementing.

It is clear that keys_fill() (and so lu_context_refill())
cannot race with itself as it holds no locks for the main
part of the work.  So updates to lc_version, and testing of
that value cannot need locking either.
So remove the locking from keys_fill() and lu_context_refill()
as there is no longer anything to protect.  The locking around
lu_keys_initing_cnt is preserved for now.

Also, don't increment when deregistering or quiescing a key.
key_set_version is *only* use to avoid filling new key values
if there have been no changes to the set of key.
Deregistering a key does not mean that we need to try filling
any new value, so the increment is pointless.

Finally, remove the refill loop in keys_fill().  If a key
is registered or revived while keys_fill() is running it must be safe
to ignore it just as we would if it was registered immediately
after keys_fill() ran.  The important thing is that the
keys_set_version stored in ctx->lc_version must be sampled
*before* those unseen keys were added.
So sample keys_set_version early.

Linux-commit : 0fbfbc5ad0f892cf4c5e087a4e7e67102b2289af

Change-Id: Ic6907561d0bb864b10e1c53fb3e5469d0c60f888
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32711
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11584 osd-ldiskfs: fix lost+found object replace 46/33546/3
Andreas Dilger [Thu, 1 Nov 2018 08:59:04 +0000 (02:59 -0600)]
LU-11584 osd-ldiskfs: fix lost+found object replace

Fix the case where an OST object is being moved from lost+found
and an unused OST object is found in the object tree with the
same OID.  The unused object was being deleted, but the object
was not being moved from lost+found in this case.

Continue on with moving the object from lost+found unless an
error was returned from the unlink (excluding -ENOENT).

Fix sanity-scrub.sh test_14 to run e2fsck after the test to
verify that OI Scrub repaired the lost+found objects correctly.

The check_and_prep() helper erases the filesystem and should
only be used in cases like sanity-scrub and sanity-lfsck where
it matters.  Remove unnecessary call from sanity test_409().

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6fc6a15b1ca3d8e34bfd2d1266f80fc0730540e5
Reviewed-on: https://review.whamcloud.com/33546
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-5604 tests: fix usage of drop_ldlm_reply() in tests 46/16846/14
Mikhail Pershin [Fri, 16 Oct 2015 11:04:22 +0000 (14:04 +0300)]
LU-5604 tests: fix usage of drop_ldlm_reply() in tests

The OBD_FAIL_LDLM_REPLY is not used to drop replies on MDT,
OST and MGS anymore. But it is still used in some tests
via drop_ldlm_reply() wrapper.

Patch renames drop_ldlm_reply() to the drop_mdt_ldlm_reply()
since it was used only for MDT. Tests were fixed also to use
MDT-specific OBD_FAIL_MDS_REPLY_NET code.
recovery-small.sh: test_53, test_66, test_113 and test_133
replay-dual.sh: test_19
replay-single.sh: test_73b

Test 66 in recovery-small also was fixed to be aware of DNE.
Tests 66 and 10c in recovery-small.sh were fixed to use
'conn_uuid' param instead of 'mds_conn_uuid' which doesn't
exists now.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I90f7410cffcd504b3ff37728df1522693e6115cf
Reviewed-on: https://review.whamcloud.com/16846
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11975 test: fix for llog test 10h 87/34287/6
Alexander Boyko [Thu, 21 Feb 2019 15:12:56 +0000 (10:12 -0500)]
LU-11975 test: fix for llog test 10h

At test 10h thread should set failloc before the test
starts adding records. And the main llog_process_thread
should wait a bitmap modification.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: I4fdedf10f943f6ab264c2d83414f0a404ca42b9c
Reviewed-on: https://review.whamcloud.com/34287
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
17 months agoLU-11208 tests: add version check to sanity tests 20/33420/10
James Nunez [Wed, 13 Feb 2019 00:13:11 +0000 (17:13 -0700)]
LU-11208 tests: add version check to sanity tests

sanity test 27G was added to Lustre tag 2.11.51. Thus, we
need to check that the server is 2.11.51 or later before
running test 27G (LU-11208).

sanity test 239A, change version check to 2.10.4 (LU-10230).

sanity test 311 was modified in Lustre tag 2.12.51. We need
to check that the server is 2.12.51 or later (LU-11965).

sanity test 317 was added to Lustre tag 2.11.53.
We need to check that the server is 2.11.53 or later before
running test 317 (LU-11778).

Fixes: 37f6357a5c9f ("LU-10629 lod: Clear OST pool with setstripe")
Fixes: 0ba690a526be ("LU-7251 osp: do not assign commit callback to every thandle")
Fixes: a531ab5f38a6 ("LU-11605 osp: max_create_count and create_count changes")
Fixes: 6115eb7fd5 ("LU-10370 ofd: truncate does not update blocks count on client")
Test-Parameters: trivial serverjob=lustre-b2_10 serverbuildno=152 testlist=sanity
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I3be45bd0bde5ec041fefef2559656ec74448dffa
Reviewed-on: https://review.whamcloud.com/33420
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11934 mdc: don't use ACL at setattr 94/34194/2
Alexander Boyko [Wed, 6 Feb 2019 08:55:31 +0000 (03:55 -0500)]
LU-11934 mdc: don't use ACL at setattr

For ldiskfs with large_ea, EA max size is equal to 1MB.
At mdc_setattr ptlrpc reply size is 1.1MB and it is rounded
to 2MB. So REINT_SETATTR request takes about 2MB of memory at
client. For a MDS failover case many request stay at reply queue
and could lead to OOM.

The patch changes acl size to zero, cause server doesn't fill
acl for setattr request.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Id37ee07d743371a03c0c2d14f462bdd13afe1ef6
Cray-bug-id: LUS-6938
Reviewed-on: https://review.whamcloud.com/34194
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11924 osp: combine llog cancel operations 79/34179/5
Alexander Boyko [Tue, 5 Feb 2019 11:36:28 +0000 (06:36 -0500)]
LU-11924 osp: combine llog cancel operations

The osp_sync_process_committed() cancels llog records one by one.
For each cancel it do open,transaction,mutex,write, etc. But most
of all cancels belongs to a single llog file. So they could
be combined.

The patch adds functions for cancelling array of indexes for a
llog file. And adds behavior and calls at
osp_sync_process_committed().

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-6836
Change-Id: I4f461687021b3f76595d403cdd0bb6aba8d93b53
Reviewed-on: https://review.whamcloud.com/34179
Tested-by: Jenkins
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11920 lod: do not reset lds_def_comp_entries 75/34175/5
Alex Zhuravlev [Mon, 4 Feb 2019 17:42:40 +0000 (20:42 +0300)]
LU-11920 lod: do not reset lds_def_comp_entries

as it can contain valid pointer and the buffer is refilled every time.

Change-Id: I6ae043c31c8cd1414a80a48687bd784e30425553
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34175
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11919 llite: Initialize cl_dirty_max_pages 73/34173/4
Patrick Farrell [Mon, 4 Feb 2019 03:47:10 +0000 (22:47 -0500)]
LU-11919 llite: Initialize cl_dirty_max_pages

cl_dirty_max_pages must be initialized to zero before
calling client_adjust_max_dirty.

Test-Parameters: trivial

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ie34306ae329e377520a7a4858ab969f901c6154d
Reviewed-on: https://review.whamcloud.com/34173
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
17 months agoLU-9859 libcfs: replace cfs_srand() calls with add_device_randomness(). 70/34170/5
NeilBrown [Mon, 4 Feb 2019 17:54:41 +0000 (12:54 -0500)]
LU-9859 libcfs: replace cfs_srand() calls with add_device_randomness().

The only places that cfs_srand is called, the random bits are
mixed with bits from get_random_bytes().  So it is equally effective
to add entropy to either pool.
So we can replace calls to cfs_srand() with calls that add the
entropy with add_device_randomness().  That function adds time-based
entropy, so we can discard the ktime_get_ts64 calls.

One location in lustre_handles.c only adds time based
entropy. This cannot improve the entropy provided by
get_random_bytes(), so just discard that call.

Linux-commit: 30f4236aafa81722490e74ded48a9fb2aff013ab

Change-Id: If1a8ffad05fcc89272136949300f6512dca39704
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/34170
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11917 tests: wait for test_257 to finish recovery 65/34165/4
Andreas Dilger [Fri, 1 Feb 2019 23:35:47 +0000 (16:35 -0700)]
LU-11917 tests: wait for test_257 to finish recovery

The sanity test_257 restarts the MDS, but it may still be in
recovery at the start of test_260a and cause failures.  Wait for
recovery to complete before the end of test_257.

Fixes: 1cb9e85039c ("LU-7433 ldlm: xattr locks are lost on mdt")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I00f183938a208608155ca71b08ca7977903ebbe5
Reviewed-on: https://review.whamcloud.com/34165
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-8346 tests: remove spaces around fail_val 55/34155/3
James Nunez [Fri, 1 Feb 2019 03:40:59 +0000 (20:40 -0700)]
LU-8346 tests: remove spaces around fail_val

conf-sanity test 93 tries to set fail_loc and fail_val
with the command 'lctl set_param fail_val = 10 fail_loc...'.
fail_val should have no spaces before and after the
equals sign.

Test-Parameters: trivial mdscount=2 mdtcount=4 envdefinitions=ONLY=93 testlist=conf-sanity
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Iaa2bff1750a2afa96a73a452a0c098ae92f7616c
Reviewed-on: https://review.whamcloud.com/34155
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
17 months agoLU-11911 lov: fix lov_iocontrol for inactive OST case 48/34148/2
Vladimir Saveliev [Fri, 1 Feb 2019 00:16:29 +0000 (03:16 +0300)]
LU-11911 lov: fix lov_iocontrol for inactive OST case

For inactive OSTs lov->lov_tgts[index]->ltd_exp is
NULL. lov_iocontrol() is to check that before dereferencing to
lov->lov_tgts[index]->ltd_exp->exp_obd.

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-6937
Test-Parameters: trivial
Change-Id: I4bb332ee2c50b07a1471035556f4d77a3559847f
Reviewed-on: https://review.whamcloud.com/34148
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
17 months agoLU-930 utils: fix --verbose option for lfs-migrate.1 75/34075/2
Andreas Dilger [Fri, 18 Jan 2019 02:44:39 +0000 (21:44 -0500)]
LU-930 utils: fix --verbose option for lfs-migrate.1

Fix the "lfs migrate --verbose" option.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I66c02926023fd3f08ddb6d5d10ee5836b83ebbe5
Reviewed-on: https://review.whamcloud.com/34075
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Joseph Gmitter <jgmitter@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11401 tests: add version check sanity-flr tests 55/33955/5
James Nunez [Tue, 15 Jan 2019 00:48:17 +0000 (17:48 -0700)]
LU-11401 tests: add version check sanity-flr tests

sanity-flr test 48 and 203 was added to Lustre tag 2.11.55.
Thus, we need to check that the server version is 2.11.55 or
later before running test 48 and 203.

sanity-flr test 0h checks for a file inheriting the directory
layout. sanity-flr test 37 added ‘lfs mirror write’ functionality.
Inheritance was fixed and ‘lfs mirror write’ was added in Lustre
tag 2.11.57. Thus, we need to check that the server version is
2.11.57 or later before running test 0h and 37.

Test-Parameters: trivial testlist=sanity-flr
Test-Parameters: serverjob=lustre-b2_11 serverbuildno=2 testlist=sanity-flr
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I94c68e900d60e2b97d7f74c6629ee54bcb3a5480
Reviewed-on: https://review.whamcloud.com/33955
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11770 osc: allow build without blk_integrity or crc-t10pi 23/33923/9
Andreas Dilger [Wed, 26 Dec 2018 09:05:37 +0000 (02:05 -0700)]
LU-11770 osc: allow build without blk_integrity or crc-t10pi

Allow the client to build if blk_integrity or crc-t10pi is not
enabled in the kernel.

Fixes: ccf3674c9ca ("LU-10472 osd-ldiskfs: T10PI between RPC and BIO")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I97c4e75ad084e99927bcb41cf0df8a680525a5b1
Reviewed-on: https://review.whamcloud.com/33923
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-10171 lmv: avoid gratuitous 64-bit modulus 22/33922/9
Andreas Dilger [Wed, 26 Dec 2018 10:45:52 +0000 (03:45 -0700)]
LU-10171 lmv: avoid gratuitous 64-bit modulus

Fix the pct() calculation to use unsigned long arguments, since this
is what callers use.  Remove duplicate pct() definition in lproc_mdc.

Don't do a 64-bit modulus of the LNet NID to find the starting MDT
index when this isn't really needed.

Similarly, don't compute the FLD cache usage percentage for a debug
message that is never used.

Fixes: 9b924e86b27d ("LU-10171 headers: define pct(a,b) once")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I34cefd269cb83f563d2f08c32dc3fa1ed5c5a5b1
Reviewed-on: https://review.whamcloud.com/33922
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11797 tests: improve sanity test 272a checking 89/33889/3
Andreas Dilger [Tue, 18 Dec 2018 18:57:46 +0000 (11:57 -0700)]
LU-11797 tests: improve sanity test 272a checking

Improve sanity.sh test_272a() to check data integrity before it
checks the stripe count.  Also, print out the stripe count if it
does not match our expectations.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I75397f251f10ed00c3dea9f80243d7ba9eacab07
Reviewed-on: https://review.whamcloud.com/33889
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11634 tests: sanityn/test_77 improvements 07/33607/5
Vladimir Saveliev [Mon, 9 Apr 2018 09:18:50 +0000 (12:18 +0300)]
LU-11634 tests: sanityn/test_77 improvements

sshd limits number of simultaneous unauthenticated connections via
MaxStartups configuration parameter. By default, 10 connections are
allowed. nrs_write_read() tries to run up to 32 do_nodes() in
parallel, causing sshd to drop some of connections.

The fix is to have do_nodes() to start required number of dd-s in
parallel.

Minor changes which were probably meant at the development:
- Test filenames include $HOSTNAME so that each client worked with its
own file, it seems. Add missing escaping backslashes so that $HOSTNAME
worked as expected.
- Add conv=notrunc parameter for dd-s which write lustre file at
  different seeks.
- Have reading dd-s to read files which were especially created for
  that.
- use /dev/null instead on /dev/zero to throw read data away.

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: I496b0f6b50811351ac8e0e606cf5a20843fab5d4
Cray-bug-id: LUS-2493
Test-Parameters: testlist=sanityn envdefinitions=ONLY=77
Reviewed-on: https://review.whamcloud.com/33607
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11495 tests: zconf_mount_clients() fix to work with FILESET 38/33338/11
Elena Gryaznova [Fri, 1 Feb 2019 16:41:22 +0000 (19:41 +0300)]
LU-11495 tests: zconf_mount_clients() fix to work with FILESET

If FILESET is set zconf_mount_clients() fails to mount clients
because of missing $mnt dir on the clients.

When FILESET is set the following tests are to be skipped:
- tests accessing .lustre directly
- tests involving lustre_rsync (which needs .lustre to do
  open by FID)
- tests involving copytool (lhsmtool_posix needs .lustre)
- tests taking use of llapi_open_by_fid (sanity.sh:test_405()
  ->swap_lock_test, sanity.sh:test_807()->llsom_sync)
- tests require Lustre root mounted on $MOUNT
  (sanity.sh:test_65n() needs root to test default layout
  inheritance)

Test-Parameters: trivial envdefinitions=FILESET=/subdir
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-6546, LUS-6561
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: I68081fbff808abbaddb314e36283e09d151a81db
Reviewed-on: https://review.whamcloud.com/33338
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-10885 llite: enable flock mount option by default 91/32091/10
Andreas Dilger [Tue, 2 Oct 2018 21:52:28 +0000 (15:52 -0600)]
LU-10885 llite: enable flock mount option by default

The "flock" mount option has been optional for many years, initially
because of potential stability issues, and also to provide a choice
for administrators to select between "flock" and "localflock" options.

However, from the large number of problems that users report when
trying to use applications that depend on this feature (typically
databases and other cloud stacks) that disabling flock by default
causes more problems than it solves.

Enable the "flock" (distributed coherent userspace locking) feature
by default.  If applications do not need this functionality, then it
will not affect them.  If applications *do* need this functionality,
they will get it.  If administrators really know what they are doing,
then they can use the "localflock" feature to enable client-local
flock functionality, possibly only on select nodes that need this.

Users wanting to disable this functionality should mount with the
existing "-o noflock" mount option, or build the client with the
"configure --disable-flock" option.

If clients are already using "-o {flock|localflock|noflock}" then
their existing options will be handled appropriately.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I182637604fa22573b1da6b6b86d8915e3c3ebbe5
Reviewed-on: https://review.whamcloud.com/32091
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-10885 tests: fix up flocks_test bugs and code style 92/32092/10
Andreas Dilger [Tue, 2 Oct 2018 21:52:02 +0000 (15:52 -0600)]
LU-10885 tests: fix up flocks_test bugs and code style

Fix the flocks_test test program:
- don't segfault if run without any command-line arguments
- return errors from test2 to the caller

Clean up flocks_test code style:
- tabify the whole file
- don't put assignments inside conditionals
- print error messages where needed.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2555c741b0c170a43c47c16425cba3186e3ebbe5
Reviewed-on: https://review.whamcloud.com/32092
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
17 months agoLU-11947 scripts: handle ZFS targets in Lustre RA 17/34217/3
Nathaniel Clark [Fri, 8 Feb 2019 18:02:28 +0000 (13:02 -0500)]
LU-11947 scripts: handle ZFS targets in Lustre RA

Fixes a regression introduced in LU-11461
This handles the case of realpath of target being an empty string.

Fixes: c36d70272541 ("LU-11461 scripts: Support symlink target")
Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: I1bcb85908019e968ac0d69e437db217594a6565e
Reviewed-on: https://review.whamcloud.com/34217
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
17 months agoLU-11897 ost: improve memory allocation for ost 27/34127/7
Andrew Perepechko [Fri, 26 Oct 2018 08:29:03 +0000 (11:29 +0300)]
LU-11897 ost: improve memory allocation for ost

OST_BUFSIZE is defined as 17 KiB. Lustre uses
OBD_CPT_ALLOC_LARGE() to allocate buffers, which,
in turn, uses kmalloc_node(). kmalloc_node(8192+) falls
back to the traditional buddy allocator kmalloc_large_node().

In the end, 32 KiB is allocated using a 17 KiB allocation
request.

This patch changes OST_BUFSIZE to 32 KiB so we can
effectively use the whole allocated buffer.

Change-Id: I93ce5b26eff4a6a1a17b2a9bfb83161528570197
Signed-off-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Cray-bug-id: LUS-6657
Reviewed-on: https://review.whamcloud.com/34127
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
17 months agoLU-11803 tests: don't assume obd device name 94/33894/8
James Simmons [Thu, 24 Jan 2019 18:20:48 +0000 (13:20 -0500)]
LU-11803 tests: don't assume obd device name

Several tests created to exercise lustre were developed on the
x86 platform and it was assumed the device name exposed in the
sysfs tree are the same across all platforms. Additionally
we can update the test to handle the case of using an uuid
format for the sysfs directory naming instead of an internal
address pointer.

Test-Parameters: clientdistro=ubuntu1804

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I704d13059f76337fa49aab77f3e748a70a74f1bc
Reviewed-on: https://review.whamcloud.com/33894
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
17 months agoLU-11591 llog: add synchronization for the last record 83/33683/6
Alexander Boyko [Thu, 29 Nov 2018 13:58:30 +0000 (08:58 -0500)]
LU-11591 llog: add synchronization for the last record

The initial problem was a race between llog_process_thread
and llog_osd_write_rec for a last record with lgh_last_idx.
The catalog should be wrapped for the problem. The lgh_last_idx
could be increased with a modification of llog bitmap, and a writing
record happen a bit later. When llog_process_thread processing
lgh_last_idx after modification and before a write it operates
with old record data.

The patch adds synchronization when lgh_last_idx is processed.

The patch changes llog_test 10h to check race between
llog_process_thread and llog_osd_write_rec.

1 Thread with write                  2 Thread with read
llog_osd_write_rec()                llog_process_thread()
lgh_last_idx++
lock lgh_hdr_mutex
ext2_set_bit()
dt_write_rec (write header)         ext2_test_bit()
         check lgh_last_idx was changed
         dt_read_rec()
         reread the record, and here we
         got the old value of record
unlock lgh_hdr_mutex
dt_write_rec (write the record)

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-6683
Change-Id: I642b488655940b9456ca8e2f2174c98a966ba242
Reviewed-on: https://review.whamcloud.com/33683
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11111 lfsck: skip orphan processing 59/32959/20
Alexey Lyashkov [Wed, 8 Aug 2018 04:47:51 +0000 (07:47 +0300)]
LU-11111 lfsck: skip orphan processing

LFSCK can reconnect a recently-deleted orphan object back
into the normal namespace when it shouldn't.  This can
cause access to the deleted data (potential security risk),
and sometimes cause an assertion if orphan is later deleted.

Skip LFSCK on orphan objects.  Fix the handling of the
LUSTRE_ORPHAN_FL in both osd-zfs and osd-ldiskfs so that
la_valid |= LA_FLAGS is set when la_flags |= LUSTRE_ORPHAN_FL
is set, otherwise the upper layers cannot properly detect it.

Clean up alignment of flags values and provide hex equivalents
so that they are more easily referenced during debugging.

Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9b2809b95efa4b3c3e3b2c7d0a501624ed743ede
Reviewed-on: https://review.whamcloud.com/32959
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11616 llite: replace smp_wb() with full memory barrier 71/33571/2
NeilBrown [Sun, 4 Nov 2018 20:26:57 +0000 (15:26 -0500)]
LU-11616 llite: replace smp_wb() with full memory barrier

While porting the smp_mb() patch from LU-9210 to the linux clients
Neil asked that the smp_wb() be replaced with the full memory
barrier functions smp_store_release() and smp_load_acquire(). For
this case _sa_make_ready() sets the entry->se_state and
revalidate_statahead_dentry() tests the value of entry->se_state
after waiting on sai_waitq. This change will make it obvious which
variable was important, and would show the paired synchronization
points. An additional benefit is that code will work on platforms
that are not "total store order" TSO architectures like PowerPC.

Change-Id: I687177bf1697a21db624a289c136215af4d90506
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33571
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11058 tests: cleanup persistent checksum= in 77k 35/34035/4
Alex Zhuravlev [Tue, 15 Jan 2019 12:13:50 +0000 (15:13 +0300)]
LU-11058 tests: cleanup persistent checksum= in 77k

this trivial patch let me pass 77k locally. can be used
till actual solution is landed

Test-Parameters: trivial
Change-Id: I5c4b4cd15d8e02dd96d918c07aacd184014ade0c
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34035
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11881 utils: silence error message 86/34086/2
Alexander Zarochentsev [Sun, 15 Jul 2018 21:17:20 +0000 (00:17 +0300)]
LU-11881 utils: silence error message

llapi_get_poollist prints an error message
in case of reallocating the buffer
and successful completion.

Cray-bug-id: LUS-6185
Test-Parameters: testlist=ost-pools
Change-Id: I0ca1f25edf3f4c89525d41f2deab8d25ec9e0516
Signed-off-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-on: https://review.whamcloud.com/34086
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11838 socklnd: use for_each_netdev() instead of lnet_ipif_enumerate() 66/33966/4
NeilBrown [Mon, 7 Jan 2019 19:13:21 +0000 (14:13 -0500)]
LU-11838 socklnd:  use for_each_netdev() instead of lnet_ipif_enumerate()

for_each_netdev() is a more direct interface and doesn't require
library support.

Also get the ip address directly from the net_device, rather than
using lnet_ipif_query().

Linux-commit: f703f71afd98e6e7ec70f92ffc52ef3ffffcd849
Linux-commit: 9eb957b98aa6322abde33240bf50dd483c5d1190

Change-Id: I82894991b9a4a250d0560af31325b6c765cc0620
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/33966
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11825 llite: Remove ptask framework 13/33913/4
Patrick Farrell [Sun, 23 Dec 2018 21:04:33 +0000 (16:04 -0500)]
LU-11825 llite: Remove ptask framework

With the removal of pio, the ptask framework no longer has
any users.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Id3237740c251b01bc176967f8fe5fd12bb82f553
Reviewed-on: https://review.whamcloud.com/33913
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-1365 tests: createmany outputs stat after 2 seconds 56/33756/6
Artem Blagodarenko [Wed, 28 Nov 2018 19:55:30 +0000 (22:55 +0300)]
LU-1365 tests: createmany outputs stat after 2 seconds

Createmany outputs current operation information every 10 seconds or
every 10k operations. For fast  devices, this overflows screen.

Change createmany to output every 10k operations or every 10 seconds
in case it has not been finished after 2 seconds of execution.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Artem Blagodarenko <c17828@cray.com>
Change-Id: I8bebff021e53e2338d372336a9ed14da6a3b45c7
Reviewed-on: https://review.whamcloud.com/33756
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
18 months agoLU-11701 ptlrpc: eviction of lwp connection aborts requests 19/33719/6
Andriy Skulysh [Mon, 8 Oct 2018 15:43:20 +0000 (18:43 +0300)]
LU-11701 ptlrpc: eviction of lwp connection aborts requests

Lwp connection isn't replayed but ongoing request
should be resent.
Modify recovery-small/106 to check for
LUSTRE_IMP_RECOVER state instead of LUSTRE_IMP_EVICTED.

Change-Id: I50cf85405de588de8499d8fad8a4fe30923f348e
Cray-bug-id: LUS-6509
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-on: https://review.whamcloud.com/33719
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-10913 llog: add startcat for wrapped catalog 49/33749/3
Alexander Boyko [Thu, 29 Nov 2018 08:20:00 +0000 (03:20 -0500)]
LU-10913 llog: add startcat for wrapped catalog

The osp_sync_thread loop for a llog_cat_process has a mistake.
When llog_cat_process has reached a bottom of catalog, the processing
restarts with 0. Which means a default processing. In this case a
catalog is wrapped and processing starts from a llh_cat_idx. But
records at the bottom were processed already, and were not cancelled
yet. The next message appears at log.
osp_sync_interpret()) reply req ffff8800123e3600/1, rc -2, transno 0

llog_cat_process support startcat index for processing catalog.
In this case the processing starts from startcat index. But if
catalog is wrapped startcat index is ignored.

The patch adds supporting of startcat index for wrapped catalog.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Ie4e3ecf2532878578ae0463969115664e3589188
Cray-bug-id: LUS-6765
Reviewed-on: https://review.whamcloud.com/33749
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-8130 libcfs: port working hash from upstream 89/33789/5
James Simmons [Tue, 15 Jan 2019 16:25:54 +0000 (11:25 -0500)]
LU-8130 libcfs: port working hash from upstream

The hash_[32|64] function in pre-4.6 kernels produce hashes
with poor distributions which result in high collision rates.
Backport those improvements for the pre-4.6 kernels Lustre
supports. Details can be read here:

https://lwn.net/Articles/687494

Test-Parameters: trivial
Change-Id: Id2436ba8be2d3ed482c5386b79710f594d5b3e59
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33789
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11862 lfsck: avoid unexpected repairing 33/34033/2
Alexey Lyashkov [Tue, 15 Jan 2019 13:08:08 +0000 (16:08 +0300)]
LU-11862 lfsck: avoid unexpected repairing

lfsck can called with create in parallel,
so some OST objects will don't have a right owner.
Don't treat it as wrong owner issue.

Cray-bug-id: LUS-6181
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Change-Id: Id9c067a67d558dcfcb0a2f0fdd790b446b4f54d0
Reviewed-on: https://review.whamcloud.com/34033
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-4664 libcfs: allow file/func/line passed to CDEBUG() 88/33588/7
Andreas Dilger [Tue, 6 Nov 2018 11:23:00 +0000 (04:23 -0700)]
LU-4664 libcfs: allow file/func/line passed to CDEBUG()

Allow the file, function, and line number to be passed to CDEBUG()
messages so that they are not duplicated in helper functions that
may be called from multiple places.

This patch is largely a no-op in terms of code, with the exception
of one call in osc_extent_sanity_check0() to OSC_EXTENT_DUMP() that
is changed to OSC_EXTENT_DUMP_WITH_LOC().

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0bd866b94daff904c16523d11c710f562a3ebbe5
Reviewed-on: https://review.whamcloud.com/33588
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-9868 llite: handle DCACHE_PAR_LOOKUP in ll_dcompare 86/28486/24
NeilBrown [Mon, 1 Oct 2018 18:19:05 +0000 (14:19 -0400)]
LU-9868 llite: handle DCACHE_PAR_LOOKUP in ll_dcompare

ll_dcompare is used in two slightly different contexts.
It is called (from __d_lookup, __d_lookup_rcu, and d_exact_alias)
to compare a name against a dentry that is already in the dcache.
It is also called (from d_alloc_parallel) to compare a name against
a dentry that is not in the dcache yet, but is part of an active
"lookup" or "atomic_open" call.

In the first case we need to avoid matching against "invalid" dentries
as a match implies something about ldlm locks which is not accurate.
In the second case we need to allow matching against "invalid" dentries
as the dentry will always be invalid (set by ll_d_init()) but we still
want to guard against multiple concurrent lookups of the same name.
d_alloc_parallel() will repeat the call to ll_dcompare() after
the lookup has finished, and if the dentry is still invalid, the whole
d_alloc_parallel() process is repeated.  This assures us that it is safe
to report success whenever d_in_lookup().

With this patch, there will never be two threads concurrently in
ll_lookup_nd(), looking up the same name in the same directory.

Linux-commit: a22c3d41d187dc3cdaf41166ef0a20b8663fdfee

Change-Id: If489a6f2bbc5c0974570583e3d5083cf77a3b950
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28486
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11811 mdt: Add a proc entry to set MDT to readonly 92/33892/3
Jinshan Xiong [Tue, 18 Dec 2018 23:36:33 +0000 (15:36 -0800)]
LU-11811 mdt: Add a proc entry to set MDT to readonly

It is sometimes desirable to be able to mark the filesystem read-only
directly on the server, rather than remounting the clients and setting
the option there.  This can be useful if there is a rogue client
that is deleting files, or when decommissioning a system to
prevent already-mounted clients from modifying it anymore.

Add the mdt.*.readonly parameter to allow setting the MDT read-only
immediately if set to 1.  All future MDT access will immediately
return -EROFS until the parameter is set to 0 again.

Signed-off-by: Jinshan Xiong <jinshan.xiong@uber.com>
Change-Id: I6d8d529ed4ba797012ded6920a9d9e7db6659efc
Reviewed-on: https://review.whamcloud.com/33892
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11568 ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab 47/34147/5
Oleg Drokin [Thu, 31 Jan 2019 18:42:43 +0000 (13:42 -0500)]
LU-11568 ldlm: Remove use of SLAB_DESTROY_BY_RCU for ldlm lock slab

Whatever it was doing does not appear to be necessary anymore
as evidenced with newer kernels where the define was removed,
but disabled in Lustre instead.
Another important reason to remove it is because rhel7.3+ seems
to have broken this RCU functionality and leads to frequent use
after frees.

Change-Id: I50991b9daf4ef06b24cb65d7a04a5e9b86706d36
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34147
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <maloo@whamcloud.com>
18 months agoLU-11861 obdclass: fix build with debug kernel 30/34030/6
Alexey Lyashkov [Tue, 15 Jan 2019 12:24:42 +0000 (15:24 +0300)]
LU-11861 obdclass: fix build with debug kernel

Move declaration before usage.

Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Change-Id: I9a6c451bb5454b1542f0b06041f6938702e20b36
Reviewed-on: https://review.whamcloud.com/34030
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
18 months agoLU-11930 llite: Restore pio flags 87/34187/4
Oleg Drokin [Tue, 5 Feb 2019 19:42:07 +0000 (14:42 -0500)]
LU-11930 llite: Restore pio flags

flags could never be removed from the LL_SBI_FLAGS list,
since the order is dependent on actual bits in the
structure.

Test-Parameters: trivial
Change-Id: I601ad0df478b17075658706c830f4a615c418104
Fixes: 2b0a34fe43bf ("LU-11825 clio: Remove pio feature")
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34187
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
18 months agoLU-11899 utils: Possible resource/memory leaks 29/34129/2
Thomas Stibor [Tue, 29 Jan 2019 15:09:07 +0000 (16:09 +0100)]
LU-11899 utils: Possible resource/memory leaks

Static checker revealed possible resource/memory leaks
of file handle and process pipe.

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I4ee05a8325408370bcfb5e9b8d30253107115c7b
Reviewed-on: https://review.whamcloud.com/34129
Tested-by: Jenkins
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Shilong Wang <wshilong@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11892 hsm: fix memory leak when scheduling HSM requests 23/34123/2
Aurelien Degremont [Mon, 28 Jan 2019 13:54:14 +0000 (13:54 +0000)]
LU-11892 hsm: fix memory leak when scheduling HSM requests

After creating a big HSM request candidate list, coordinator thread
allocates an update list which is 16 bytes times the number of
candidates files. In some cases, they could be more than 300,000
candidate files and so several MB will be needed.

Memory allocation failure was skipping candidate list freeing
which led to memory leak.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Change-Id: Ibb4833f4430cc50cc014f6d14caf0551e0fce161
Reviewed-on: https://review.whamcloud.com/34123
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11878 tests: don't fork-bomb sanity test_103b 82/34082/5
Andreas Dilger [Tue, 22 Jan 2019 07:53:44 +0000 (00:53 -0700)]
LU-11878 tests: don't fork-bomb sanity test_103b

Running sanity test_103b may start up to 512 parallel threads for
running the test, each of which starts two bash processes and lfs
or rm processes.

For the VMs running in our testbed (esp. ARM with 64KB PAGE_SIZE)
this can trigger the OOM killer and cause the test to fail if bash
is killed.  Limit the number of started bash processes to avoid this.

Fixes: 543f1fbe260 ("LU-10830 utils: fix create mode for lfs")
Test-Parameters: trivial clientarch=aarch64
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I82c322013da91d717924e2c664fa57ad4e3ebbe5
Reviewed-on: https://review.whamcloud.com/34082
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-10143 osd-zfs: allocate sequence in advance 69/34069/12
Alex Zhuravlev [Sun, 20 Jan 2019 05:38:26 +0000 (08:38 +0300)]
LU-10143 osd-zfs: allocate sequence in advance

on the controller, so that we have it ready before any potential
read-only makeup. this is what osd-ldiskfs is doing already.

Change-Id: I3d27f112b0d013ac923c5d250b296b5528b8112d
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34069
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11876 dkms: Add missing Requires for zlib-devel 65/34065/2
Nathaniel Clark [Fri, 18 Jan 2019 22:21:12 +0000 (17:21 -0500)]
LU-11876 dkms: Add missing Requires for zlib-devel

lustre.spec has BuildRequires for zlib-devel, and lustre-*-dkms should
also Requires zlib-devel so build completes successfully.

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: Icf1c3f4342823502200d3326c63fe991c3140aab
Reviewed-on: https://review.whamcloud.com/34065
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Joe Grund <jgrund@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-10447 tests: replace $SETSTRIPE/$GETSTRIPE with $LFS 17/33917/2
James Nunez [Wed, 26 Dec 2018 23:44:30 +0000 (16:44 -0700)]
LU-10447 tests: replace $SETSTRIPE/$GETSTRIPE with $LFS

$SETSTRIPE and $GETSTRIPE were needed when we used the
standalone 'lstripe' utility. 'lstripe' hasn't been used
for years and we need to clean up all remnants of it.

Replace all instances of $SETSTRIPE with '$LFS setstripe'
and $GETSTRIPE with '$LFS getstripe' in the conf-sanity,
ost-pools and sanity-quota test suites.

Test-Parameters: trivial testlist=conf-sanity
Test-Parameters: testlist=ost-pools,sanity-quota
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I9c5a3fd3a7ba8bf1e65da34880dff8df8d4e7b75
Reviewed-on: https://review.whamcloud.com/33917
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11749 tests: sanity-sec 23b exec commands on right node 46/33846/3
Sebastien Buisson [Thu, 13 Dec 2018 09:02:47 +0000 (18:02 +0900)]
LU-11749 tests: sanity-sec 23b exec commands on right node

In sanity-sec test 23b, make sure commands are executed on
client 1, then client 2.
Otherwise, ACL mapping cannot be correctly demonstrated.

Test-Parameters: trivial clientcount=2 envdefinitions=ONLY=23b testlist=sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iffa3946be149313af696907fa6c83a6ea58cb3f6
Reviewed-on: https://review.whamcloud.com/33846
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11586 tests: test_10() fix for FILESET set 14/33514/6
Elena Gryaznova [Tue, 30 Oct 2018 13:43:17 +0000 (16:43 +0300)]
LU-11586 tests: test_10() fix for FILESET set

Patch fixes sanity-pfl test_10() to set root layout
properly: subdirectory could be mounted on $MOUNT if FILESET
is set, test now mounts root on $MOUNT2 for this case and
sets the root layout via $MOUNT2.

Test-Parameters: trivial testlist=sanity-pfl envdefinitions=ONLY=10
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: 6557
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: If94474d92686a37518c1dd51793e742967fdfbc1
Reviewed-on: https://review.whamcloud.com/33514
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-10496 tests: disable 39k for DoM for a while 15/34115/2
Alex Zhuravlev [Sat, 26 Jan 2019 10:46:55 +0000 (13:46 +0300)]
LU-10496 tests: disable 39k for DoM for a while

as too many runs fail due to missing FMD.

Test-Parameters: trivial

Change-Id: Ie391917fd7e251283289a4d6930d26c977810a47
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34115
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11720 spec: srpm should be free of kernel requiements 71/33771/2
Nathaniel Clark [Mon, 3 Dec 2018 19:04:37 +0000 (14:04 -0500)]
LU-11720 spec: srpm should be free of kernel requiements

This moves the fix for LU-9731 into spec file and out of lbuild.
This lets "make rpms" benefit from the fix.
This also prevents the srpm from being incorrectly locked to the
kernel present when lbuild was used to create it (via
kmp-lustre.preamble).

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: I15f61c0e37182c0efbea3566d43b1e89f180d3e5
Reviewed-on: https://review.whamcloud.com/33771
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-11915 tests: stop running conf-sanity test 110 66/34166/2
James Nunez [Sat, 2 Feb 2019 00:12:56 +0000 (17:12 -0700)]
LU-11915 tests: stop running conf-sanity test 110

conf-sanity test 115 started hanging about the time
test 110 and 111 were added to conf-sanity. Stop running
conf-sanity test 110 by adding it to the ALWAYS_EXCEPT
list.

Test-Parameters: trivial
Test-Parameters: fstype=ldiskfs mdscount=2 mdtcount=4 testlist=conf-sanity
Test-Parameters: fstype=ldiskfs mdscount=2 mdtcount=4 testlist=conf-sanity
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I5b36df4f0e852ba4f00945a0718bb2f6f89cc925
Reviewed-on: https://review.whamcloud.com/34166
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
18 months agoNew tag 2.12.51 2.12.51 v2_12_51
Oleg Drokin [Mon, 4 Feb 2019 17:07:36 +0000 (12:07 -0500)]
New tag 2.12.51

Change-Id: Icfc5df666e4f1d3bd384d6519069bdbeb0b07e7c

18 months agoLU-11721 tests: wait for statfs to update on DNE 64/34164/2
Andreas Dilger [Fri, 1 Feb 2019 21:07:01 +0000 (14:07 -0700)]
LU-11721 tests: wait for statfs to update on DNE

Wait for the statfs to update properly when there are multiple
MDTs so that the test doesn't gratuitously fail.

Fixes: 757403191c3 ("LU-11721 utils: print used inodes ratio ...")
Test-Parameters: trivial testlist=sanity mdscount=2 mdtcount=4 ostcount=7
Test-Parameters: testlist=sanity fstype=zfs mdscount=2 mdtcount=4
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia75f7bd4d3027c91f10ce990730b2bd7123ebbe5
Reviewed-on: https://review.whamcloud.com/34164
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
18 months agoLU-11605 osp: max_create_count and create_count changes 59/33559/9
Sergey Cheremencev [Wed, 29 Aug 2018 19:20:36 +0000 (22:20 +0300)]
LU-11605 osp: max_create_count and create_count changes

Setting max_create_count to 0 causes setting create_count
to 0. Set create_count to OST_MIN_PRECREATE when setting
back max_create_count.
Without the patch create_count remains equal to 0 despite
on changing max_create_count to something != 0.
This causes create to stuck in osp_precreate_reserve
because osp_precreate_send doesn't send new request to OST.
To understand the number of objects to precreate(grow) it
uses opd_pre_create_count that is equal to 0.

Cray-bug-id: LUS-6435
Change-Id: I940c48f91e9c7d49b766bd85ea271ce229424c7f
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-on: https://es-gerrit.dev.cray.com/153888
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Tested-by: Elena Gryaznova <c17455@cray.com>
Reviewed-on: https://review.whamcloud.com/33559
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
18 months agoLU-10059 tests: sanityn 32a restore parameters 70/34070/5
Patrick Farrell [Sun, 20 Jan 2019 15:31:02 +0000 (10:31 -0500)]
LU-10059 tests: sanityn 32a restore parameters

Test sanityn test 32a does not restore parameters on error,
making other tests fail because lockless truncate is still
enabled.

Add cleanup.

Also fix use of stack_trap with restore_params in two other
tests to clean up temporary file.

Test-Parameters: trivial testlist=sanityn

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I315eb5c53cc1722833b1159c5ad908c3b7bf5550
Reviewed-on: https://review.whamcloud.com/34070
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
18 months agoLU-11868 mdc: Improve xattr buffer allocations 59/34059/2
Patrick Farrell [Thu, 17 Jan 2019 20:26:09 +0000 (15:26 -0500)]
LU-11868 mdc: Improve xattr buffer allocations

Many of the xattr related buffers in the mdc/mdt code are
allocated at max_easize, but they are used for normal POSIX
xattrs (primarily ACLs) and so they are guaranteed not to
exceed XATTR_SIZE_MAX.

HSM xattrs should also be less than XATTR_SIZE_MAX.

Reduce allocations to MIN(XATTR_SIZE_MAX, max_easize).

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I228486ebd79b35358baeff490d6181cefa5a4586
Reviewed-on: https://review.whamcloud.com/34059
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
18 months agoLU-11871 doc: man page for lctl nodemap_set_fileset 57/34057/4
Sebastien Buisson [Thu, 17 Jan 2019 15:53:50 +0000 (00:53 +0900)]
LU-11871 doc: man page for lctl nodemap_set_fileset

Man page for lctl nodemap_set_fileset.

Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Icce0b1558621bca84b14f76037a5000002855881
Reviewed-on: https://review.whamcloud.com/34057
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>