Whamcloud - gitweb
fs/lustre-release.git
4 years agoLU-12514 obdclass: remove vfsmount option from client_fill_super 27/35427/4
NeilBrown [Thu, 12 Dec 2019 14:58:32 +0000 (09:58 -0500)]
LU-12514 obdclass: remove vfsmount option from client_fill_super

This arg is always NULL and is never used.
So discard it from this and related functions.

Linux-commit: 7dc2155195586ec75f53d6dcd381f935ccc35d02

Change-Id: I00b16115edbff0de7605768121981b928585552c
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35427
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12514 obdclass: remove pointless struct lustre_mount_data2 26/35426/7
NeilBrown [Wed, 2 Oct 2019 15:26:10 +0000 (11:26 -0400)]
LU-12514 obdclass: remove pointless struct lustre_mount_data2

This is used to pass a void* and NULL to lustre_fill_super().
It is easier just to pass the void*. The "NULL" passed is
sometimes a "struct vfsmount". This pointer is passed to
ll_fill_super() which then passes it to client_common_fill_super()
that just ignores it.

Linux-commit: 998831a00192a38a9f1425b2fb2d6faf3e34e665

Change-Id: If5e229d80c08b7c16e89d11a03fc766584c24f7c
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35426
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-8130 obd: convert obd uuid hash to rhashtable 29/34429/8
NeilBrown [Thu, 12 Dec 2019 23:46:38 +0000 (18:46 -0500)]
LU-8130 obd: convert obd uuid hash to rhashtable

The rhashtable data type is a perfect fit for the
export uuid hash table, so use that instead of
cfs_hash (which will eventually be removed).

As rhashtable supports lookups and insertions in atomic
context, there is no need to drop a spinlock while
inserting a new entry, which simplifies code quite a bit.

Linux-commit: 4206c444e4a89dae9f67f08d9c29d58c37c960cd

Change-Id: Icadf64d572982409008a1ef4d23eb0fe1e3c8cd0
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/34429
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9679 all: prefer sizeof(*var) for ALLOC/FREE 61/36661/3
Mr NeilBrown [Mon, 4 Nov 2019 05:38:24 +0000 (16:38 +1100)]
LU-9679 all: prefer sizeof(*var) for ALLOC/FREE

The construct
   LIBCFS_ALLOC(var, sizeof(*var));
is more obviously correct than
   LIBCFS_ALLOC(var, sizeof(struct something));
and is preferred upstream (where it is actually kzalloc
or similar of course).

When it is that simple, and there is no multiplier for
the size,
   CFS_ALLOC_PTR(var);
is even better.

The same logic applies to OBD_ALLOC(), LIBCFS_FREE(),
and OBD_FREE().

So convert allocations and frees that use sizeof(struct..)
to use one of the simpler constructs.

In mgs_write_log_mdt0, uuid is better declared as a
"struct obd_uuid *" which is a struct that contain a 'char'
array.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I8cd97c75241bbb87d15cc6b7c9ac2a7d6184d700
Reviewed-on: https://review.whamcloud.com/36661
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12410 lnet: Define enum for lnetctl commands 04/35504/11
Chris Horn [Thu, 27 Jun 2019 03:51:57 +0000 (22:51 -0500)]
LU-12410 lnet: Define enum for lnetctl commands

The enum values can be used to faciliate code sharing amongst the
lnetctl routines.

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I1085a70a17aefa300f3bf949cf867b2712131a0f
Reviewed-on: https://review.whamcloud.com/35504
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12410 lnet: Implement DLC wrapper for cfs_parse_nidlist 04/35304/13
Chris Horn [Sat, 22 Jun 2019 17:03:09 +0000 (12:03 -0500)]
LU-12410 lnet: Implement DLC wrapper for cfs_parse_nidlist

Implement a simple wrapper around cfs_parse_nidlist to be used by DLC
commands. The wrapper serves to sanitize the nidstr, so that is
suitable to be input to cfs_parse_nidlist. We do not want to allow an
asterisk character in this string because the resultant nidlist, when
expanded, would define too many nids for the various operations that
will utilize this functionality.

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I59280317af4af05eca1c8c598eadf8871e28bcf1
Reviewed-on: https://review.whamcloud.com/35304
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12410 libcfs: Implement address range expansion 03/35303/13
Chris Horn [Sun, 23 Jun 2019 23:26:30 +0000 (18:26 -0500)]
LU-12410 libcfs: Implement address range expansion

Implements a new top-level API function for the nidstrings library.
cfs_expand_nidlist iterates over each nidrange on a nidlist and
expands the range to create the lnet_nid_t's defined by the nidrange.

The caller supplies the nidlist, an lnet_nid_t array pointer where the
lnet_nid_t's are stored, and the maximum number of LNet nids to
generate (i.e. the size of the lnet_nid_t array pointer).

cfs_expand_nidlist returns the number of lnet_nid_t's that were added
to the lnet_nid_t array.

If the provided nidlist defines more NIDs than the specified maximum
then the return value is -1.

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I3e02f1ec466a8bc90142944b62565ebc7ef82e88
Reviewed-on: https://review.whamcloud.com/35303
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12646 lnet: Prefer route specified by rtr_nid 37/35737/5
Chris Horn [Thu, 8 Aug 2019 01:33:13 +0000 (20:33 -0500)]
LU-12646 lnet: Prefer route specified by rtr_nid

Restore an optimization that was initially added under LU-11413. For
routed REPLY and ACK we should preferably use the same router from
which the GET/PUT was receieved.

Cray-bug-id: LUS-8008
Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Ia3059cddf70e1c477d90acdd90c13b4c5a292f4f
Reviewed-on: https://review.whamcloud.com/35737
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12222 lnet: Check if we're sending to ourselves 78/35778/9
Chris Horn [Mon, 12 Aug 2019 22:40:55 +0000 (17:40 -0500)]
LU-12222 lnet: Check if we're sending to ourselves

It's desirable to avoid taking a send credit when sending messages to
ourselves. Check if dst_nid is one of our own, and use the lolnd for
the send accordingly.

There are two exceptions:
1. Recovery messages must be sent to the lnet_ni that is being
   recovered.
2. If a source NID is specified then we need to send via the
   associated NI.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I656c6b1ef18ccb9b18bca65839de7c487981ebdd
Reviewed-on: https://review.whamcloud.com/35778
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12410 tests: Additional test cases for lnetctl and DLC 86/35386/17
Chris Horn [Sun, 30 Jun 2019 15:41:52 +0000 (10:41 -0500)]
LU-12410 tests: Additional test cases for lnetctl and DLC

To faciliate the refactoring of a few lnetctl commands I wrote some
additional test cases for sanity-lnet.sh

Test-Parameters: trivial
Test-Parameters: testlist=sanity-lnet
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I9f3f74420f89b824ee25b6547c0baa815ccfd948
Reviewed-on: https://review.whamcloud.com/35386
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-13002 tests: change clean up in sanity-lnet 49/36849/5
James Nunez [Mon, 25 Nov 2019 14:25:50 +0000 (07:25 -0700)]
LU-13002 tests: change clean up in sanity-lnet

sanity-lnet should detect the state of the system before executing,
and restore that state when it has finished.

Test-Parameters: trivial
Test-Parameters: testlist=sanity-lnet,runtests
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I3e3c5465789389e840efab516b35234cd61be901
Reviewed-on: https://review.whamcloud.com/36849
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12965 obdclass: remove assertion for imp_refcount 43/36743/3
Li Dongyang [Wed, 13 Nov 2019 04:01:25 +0000 (15:01 +1100)]
LU-12965 obdclass: remove assertion for imp_refcount

After calling obd_zombie_import_add(), obd_import could
be freed by obd_zombie before we check imp_refcount with
LASSERT_ATOMIC_GE_LT. It's a use after free and could
crash the box.

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I3d63acf2bff543924ca0e74a35d24c507d68f6aa
Reviewed-on: https://review.whamcloud.com/36743
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12951 lmv: fix to return correct MDT count 13/36713/3
Wang Shilong [Fri, 8 Nov 2019 04:05:32 +0000 (12:05 +0800)]
LU-12951 lmv: fix to return correct MDT count

@ltd_tgts_size could be larger than actual MDT count,
as we preallocate ltd_tgts and resize it if necessary.

Fix it to use @ld_tgt_count instead.

Change-Id: I1501fd965cc74223c7a77280aac64acdbbcf17f6
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36713
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-12895 tests: add Debian dependency on selinux-utils package 82/36882/3
Sebastien Buisson [Wed, 27 Nov 2019 10:21:07 +0000 (10:21 +0000)]
LU-12895 tests: add Debian dependency on selinux-utils package

For Debian, add a dependency on selinux-utils to the lustre-tests
package. This is required in order to have 'getenforce' command
available on client nodes running auster test suite.

Fixes: 4ae1c96672df ("LU-12895 tests: stop running tests for SSK and SELinux")
Test-Parameters: trivial clientdistro=ubuntu1804 testlist=sanity
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie9d7e8280f9c41c2a4878c9951ef8f07ac36c594
Reviewed-on: https://review.whamcloud.com/36882
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-12678 lnet: discard LNetMEInsert 58/36858/2
Mr NeilBrown [Wed, 6 Nov 2019 06:13:00 +0000 (17:13 +1100)]
LU-12678 lnet: discard LNetMEInsert

This function is unused and has never been used.
It is not used by cray-dvs - the other user of LNet.

So discard it.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I35a012c390ae1a7ae9d601f12cf5da1b56d4eb6d
Reviewed-on: https://review.whamcloud.com/36858
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12678 lnet: discard ksnn_lock 34/36834/3
Mr NeilBrown [Mon, 18 Nov 2019 00:29:08 +0000 (11:29 +1100)]
LU-12678 lnet: discard ksnn_lock

This lock in 'struct ksock_net' is being taken in places where it
isn't needed, so it is worth cleaning up.

It isn't needed when checking if ksnn_npeers has reached
0 yet, as at that point in the code, the value can only
decrement to zero and then stay there.

It is only needed:
 - to ensure concurrent updates to ksnn_npeers don't race, and
 - to ensure that no more peers are added after the net is shutdown.

The first is best achieved using atomic_t.
The second is more easily achieved by replacing the ksnn_shutdown
flag with a large negative bias on ksnn_npeers, and using
atomic_inc_unless_negative().

So change ksnn_npeers to atomic_t and discard ksnn_lock
and ksnn_shutdown.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I23dd07ef89c7abc14f5a5fef28468a62f7b2a35c
Reviewed-on: https://review.whamcloud.com/36834
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12678 lnet: change ksocknal_create_peer() to return pointer 33/36833/2
Mr NeilBrown [Sun, 17 Nov 2019 23:38:32 +0000 (10:38 +1100)]
LU-12678 lnet: change ksocknal_create_peer() to return pointer

ksocknal_create_peer() currently returns an error status, and if that
is 0, a pointer is stored in a by-reference argument.  The preferred
pattern in the kernel is to return the pointer, or the error code
encoded with ERR_PTR().

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie1458851e93ff56236fe7ac914e9fdfb0b079d0b
Reviewed-on: https://review.whamcloud.com/36833
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12678 lnet: discard lnd_refcount 29/36829/2
Mr NeilBrown [Sun, 24 Nov 2019 23:00:48 +0000 (10:00 +1100)]
LU-12678 lnet: discard lnd_refcount

The lnd_refcount in 'struct lnet_lnd' is never tested (except
in an ASSERT()), so it cannot be needed.  Let's remove it.

Each individual lnd keeps track of how many lnet_ni are
registered for that lnd e.g. ksocklnd has a counter in ksnd_nnets
and o2iblnd has a linked list in kib_devs.
They hold a reference on the module while there are registered
devices, and the lnd is only freed (and the lnd_refcount checked)
when the module is unloaded.  This confirms that lnd_refcount
adds no value.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0d0c04051bf01a1fa77d888b00fb0a7875b09ccd
Reviewed-on: https://review.whamcloud.com/36829
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12999 mgs: Cleanup string handling in name_create_mdt 17/36817/5
Shaun Tancheff [Mon, 2 Dec 2019 17:32:50 +0000 (11:32 -0600)]
LU-12999 mgs: Cleanup string handling in name_create_mdt

To satisfy gcc8 -Werror=format-overflow sanity test the mdt_idx
before calling snprintf.

Cray-bug-id: LUS-8186
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I2c8764d3715290ee2bd8c96cdc98b532f50632c6
Reviewed-on: https://review.whamcloud.com/36817
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-8066 obd: map MDS lov/osc to lod/osp 91/36791/2
James Simmons [Mon, 18 Nov 2019 22:22:54 +0000 (17:22 -0500)]
LU-8066 obd: map MDS lov/osc to lod/osp

Before Lustre 2.4 the MDS mirrored the clients with its osc / lov
proc tree. After the OSD changes a new lod / osp proc tree was
created but to maintain back ward compatibility special symlinks
were created. We really don't need the symlinks any more.
Instead we can expand the modification of lustre_cfg done in the
function class_config_llog_handler() to include the cases of
LCFG_SET_PARAM and LCFG_PARAM. This means anyone setting on the
tunables on MDS using the old lov / osc format can be formated
to use lod / osp instead. This way when the symlinks do get
removed handling the old format will continue to work

Change-Id: Id82f095501440981fd8e4a07be09f35adba447e5
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36791
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
4 years agoLU-12973 doc: remove bad line from .gitignore 64/36764/2
Aurelien Degremont [Fri, 15 Nov 2019 09:19:47 +0000 (09:19 +0000)]
LU-12973 doc: remove bad line from .gitignore

lustre/doc/.gitignores ignore /*.3 and /*.7 man pages file
because they use to be generated.

Commit 4943ae1 removed the generated part and replaced it with
traditional static pages, but forgot to remove the ignore rule.

Test-Parameters: trivial
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Change-Id: I1bcf30ffc46854936553f1d205222aa9f82274d4
Reviewed-on: https://review.whamcloud.com/36764
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
4 years agoLU-12967 tgt: clean up sync_on_cancel references 54/36754/3
Andreas Dilger [Thu, 14 Nov 2019 02:49:23 +0000 (19:49 -0700)]
LU-12967 tgt: clean up sync_on_cancel references

Clean up the use of "sync_on_cancel" in the code, since the tunable
parameter is named "sync_lock_cancel" and using the same name in
the code makes it easier to find the related parts.

Rename constants to be more consistent:
  NEVER_SYNC_ON_CANCEL    -> SYNC_LOCK_CANCEL_NEVER
  BLOCKING_SYNC_ON_CANCEL -> SYNC_LOCK_CANCEL_BLOCKING
  ALWAYS_SYNC_ON_CANCEL   -> SYNC_LOCK_CANCEL_ALWAYS

Initialize sync_lock_cancel_states[] with designated initializers
so that the state names always match the declared values.

Use ARRAY_SIZE() instead of needing NUM_SYNC_ON_CANCEL_STATES.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c6015420a5c3266a13798fd8b96539323ebbe5
Reviewed-on: https://review.whamcloud.com/36754
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12967 ofd: restore sync_on_lock_cancel tunable 48/36748/4
Andreas Dilger [Thu, 14 Nov 2019 00:56:35 +0000 (17:56 -0700)]
LU-12967 ofd: restore sync_on_lock_cancel tunable

The "ofd.*.sync_on_lock_cancel" tunable was inadvertently replaced
during procfs->sysfs changes in 2.12 with "sync_lock_cancel".  Restore
the "sync_on_lock_cancel" tunable since it has existed since the 2.0
release and is definitely in use with several systems.

It isn't just a matter of restoring the old tunable name, since the
"mdt.*.sync_lock_cancel" name is also used since 2.8 and the code for
the two tunables was recently consolidated in the server target code.

Instead, keep the common "sync_lock_cancel" tunable name, add backward
compatibility for "sync_on_lock_cancel" for a number of releases, and
print a deprecation warning if the old name is used.

Fix up sanity.sh test_80 to check for both the old and new names,
but only if we actually need to change this tunable for ZFS, along
with minor test script style cleanups.

Fixes: 7059644e9ad3 ("LU-8066 ofd: migrate from proc to sysfs")
Change-Id: Iffe65f6268d94075c71b96d42fe60ef11ac39448
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36748
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
4 years agoLU-12923 lustre: Replace CLASSERT() with BUILD_BUG_ON() 25/36725/3
Arshad Hussain [Tue, 29 Oct 2019 17:45:30 +0000 (23:15 +0530)]
LU-12923 lustre: Replace CLASSERT() with BUILD_BUG_ON()

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON()

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: Ic21510ba4f1c99fa0ea6832d240d96ffc7622593
Reviewed-on: https://review.whamcloud.com/36725
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
4 years agoLU-12661 tests: skip sanity 817 if kernel version >= 4.14 12/36712/4
Li Dongyang [Fri, 8 Nov 2019 00:19:32 +0000 (11:19 +1100)]
LU-12661 tests: skip sanity 817 if kernel version >= 4.14

sanity test_817 is in the ALWAYS_EXCEPT list for aarch64,
however it's failing because the test was done on kernel-alt
which is 4.14.x, it's not related with the architecture.

On new kernels nfsd is not releasing the file after write,
it will fail with ETXTBSY regardless of whether the nfs export
is backed by a lustre mount or not.

Skip the test on new kernels for now.

Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ie18ceb961eee2313fca7d60a35159a7496075029
Reviewed-on: https://review.whamcloud.com/36712
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
4 years agoLU-12988 osd: do not use preallocation during mount 04/36704/5
Alex Zhuravlev [Thu, 14 Nov 2019 15:13:16 +0000 (18:13 +0300)]
LU-12988 osd: do not use preallocation during mount

as cold mballoc cache can cause very lengthy search.

Change-Id: I821b023d392336f0085a96e821dc22e92dbf23b7
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36704
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-11490 tests: use variable for file system name 94/36694/4
James Nunez [Wed, 6 Nov 2019 21:01:34 +0000 (14:01 -0700)]
LU-11490 tests: use variable for file system name

There are several tests that have the file system name
hard coded to "lustre".  These tests will fail or some
calls will fail when these tests are run on systems
where the file system name is not "lustre".  These tests
should be changed to use $FSNAME.

Test-Parameters: trivial testlist=sanity,conf-sanity

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I22263d2ae5ad29806cb709f462ef21837916c939
Reviewed-on: https://review.whamcloud.com/36694
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
4 years agoLU-8066 lustre: drop ldebugfs_remove() 82/36682/7
Mr NeilBrown [Tue, 5 Nov 2019 23:55:52 +0000 (10:55 +1100)]
LU-8066 lustre: drop ldebugfs_remove()

ldebugfs_remove() is a wrapper around debugfs_remove_recursive()
which adds two features:
1/ the pointer is tested with IS_ERR_OR_NULL before making the call
2/ the pointer is cleared after the call.

The first is not needed since Linux 3.6
Commit a59d6293e537 ("debugfs: change parameter check in
                      debugfs_remove() functions")

and the "OR_NULL" part has never been needed.  In many cases a pointer
to a debugfs dentry is already never an error, or is NULLed as soon as
the error is noticed.  Only two place is an error stored (fid_request
and fld_request), so we change those to never store the error.

The second is only needed for a few global variables.  In most other
cases the structure holding the pointer will be freed in the near
future, so clearing the pointer is pointless.  obd_debugfs_entry is
one case where I wasn't certain the NULLing the pointer was not
needed.

Then the debugfs_remove_recursive() call is made just before module
exit, and the variable is local to the module, there is no point
clearing the variable.

As the extra functionality is barely needed, let's just use the
standard interface, with occasional checks and clears as needed.

Linux-commit b145d7865a7c ("staging: lustre: get rid of
                            ldebugfs_remove()")

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I68db147433273b70d6fe0957df10ed14e8e924bb
Reviewed-on: https://review.whamcloud.com/36682
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-4423 lustre: don't declare extern variables in C files. 50/36650/3
Mr NeilBrown [Sun, 3 Nov 2019 22:37:10 +0000 (09:37 +1100)]
LU-4423 lustre: don't declare extern variables in C files.

A previous patch already removes some 'extern's.  This patch
removes the remainder from kernel code.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: If78d96edd389c602ac8ee3321492db5fedda7c69
Reviewed-on: https://review.whamcloud.com/36650
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 ptlrpc: Use BUILD_BUG_ON() for pack_generic.c 49/36649/4
Arshad Hussain [Tue, 29 Oct 2019 01:00:29 +0000 (06:30 +0530)]
LU-12923 ptlrpc: Use BUILD_BUG_ON() for pack_generic.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/ptlrpc/pack_generic.c

This patch also fixes few space/tab issues reported
by checkpatch

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I1903f9faad8b1dec7c550a6b653dcb899aaa0b98
Reviewed-on: https://review.whamcloud.com/36649
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files 41/36641/4
James Simmons [Wed, 6 Nov 2019 15:04:13 +0000 (10:04 -0500)]
LU-8585 llite: don't cache MDS_OPEN_LOCK for volatile files

The kernels knfsd constantly opens and closes files for each
access which can result in a continuous stream of open+close RPCs
being send to the MDS. To avoid this Lustre created a special
flag, ll_nfs_dentry, which enables caching of the MDS_OPEN_LOCK
on the client. The fhandles API also uses the same exportfs layer
as NFS which indirectly ends up caching the MDS_OPEN_LOCK as well.
This is okay for normal files except for Lustre's special volatile
files that are used for HSM restore. It is expected on the last
close of a Lustre volatile file that it is no longer accessable.
To ensure this behavior is kept don't cache MDS_OPEN_LOCK for
volatile files.

Change-Id: Ia5d78baf17279c6f268bc0bf443b428d5cbea440
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36641
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12894 sec: fix checksum for skpi 04/36604/10
Sebastien Buisson [Tue, 29 Oct 2019 09:32:22 +0000 (18:32 +0900)]
LU-12894 sec: fix checksum for skpi

Compute checkum on message before actually comparing
it to hmac value.

Add test to exercise all SSK flavors.
Make sure zconf_mount does include skpath mount option if SSK or
Kerberos is in use.

Fixes: a21c13d4df ("LU-8602 gss: Properly port gss to newer crypto api.")
Test-Parameters: envdefinitions=SHARED_KEY=true testlist=sanity-sec
Test-Parameters: envdefinitions=SHARED_KEY=true,SK_FLAVOR=skn testlist=sanity,recovery-small
Test-Parameters: envdefinitions=SHARED_KEY=true,SK_FLAVOR=ska testlist=sanity,recovery-small
Test-Parameters: envdefinitions=SHARED_KEY=true,SK_FLAVOR=ski testlist=sanity,recovery-small
Test-Parameters: envdefinitions=SHARED_KEY=true,SK_FLAVOR=skpi testlist=sanity,recovery-small
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I7bcc3618c1824a0f0ca73219c7ac0ccc8405b946
Reviewed-on: https://review.whamcloud.com/36604
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12904 o2ib: ib_destroy_cq() returns void 78/36578/2
Shaun Tancheff [Fri, 25 Oct 2019 13:32:44 +0000 (08:32 -0500)]
LU-12904 o2ib: ib_destroy_cq() returns void

Kernel destroy CQ flows can't fail and the returned value of
ib_destroy_cq() is not interested in those flows.

kernel-commit: 890ac8d97e6722a9e4a66a0bd836d1b028d075fe

Test-Parameters: trivial
Cray-bug-id: LUS-8042
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I873bf76a33bd80d5e6de4d1b16a79ff5ea930f3a
Reviewed-on: https://review.whamcloud.com/36578
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12969 test: reset quota limits for all test ID/users 56/36756/4
Wang Shilong [Thu, 14 Nov 2019 06:22:22 +0000 (14:22 +0800)]
LU-12969 test: reset quota limits for all test ID/users

It looks current sanity-quota.sh assumed TSTID/TSTID2 mapped
with quota_usr/quota_2usr. However, in a real testing envirment
this might be not true.

In order to make sure we clean up everthing properly, just reset
every IDs, Users, Groups.

Test-parameters: trivial testlist=sanity-quota
Change-Id: I2faf1a6392ce2ee89e2e22ba0a6ec65efea4ade2
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36756
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12984 utils: Add -newerXY support for lfs find 06/36806/9
Qian Yingjin [Wed, 20 Nov 2019 15:12:10 +0000 (23:12 +0800)]
LU-12984 utils: Add -newerXY support for lfs find

In regular "find" it is possible to specify a filename to use
for a relative timestamp:
-newerXY reference
 Compares the timestamp of the current file with reference.
 The reference argument is normally the name of a file (and
 one of its timestamps is used for the comparison) but it may
 also be a string describing an absolute time. X and Y are
 placeholders for other letters, and these letters select which
 time belonging to how reference is used for the comparison.
 - a   The access time of the file reference
 - c   The inode status change time of reference
 - m   The modification time of the file reference
 - t   reference is interpreted directly as a time

We should enhance Lustre 'lfs find' to support '-newerXY' options.
In current implementation, When reference is interpreted directly
as a time, it must be in one of the following formats:
- "%Y-%m-%d %H:%M:%S"
- "%Y-%m-%d %H:%M"
- "%Y-%m-%d"
- "%H:%M:%S"
- "%H:%M"
- "@%s"
- "%s"
Otherwise, it will report errors.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ib006940b231c4a18f892c492dd892f7733b5d8ba
Reviewed-on: https://review.whamcloud.com/36806
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-12899 build: rhel8 not install kernel-rpm-macros 57/36557/3
Qian Yingjin [Wed, 23 Oct 2019 01:43:24 +0000 (09:43 +0800)]
LU-12899 build: rhel8 not install kernel-rpm-macros

On RHEL8 kmodtool and kernel_module_package_buildreqs are not
installed with kernel-devel.

kernel_module_package_buildreqs is defined in kernel-rpm-marcos.
If kernel-rpm-macros is not installed, the Lustre RPM build will
report:
"Dependency tokens must begin with alpha-numeric, '_' or '/':
BuildRequires: %kernel_module_package_buildreqs"

This patch helps the developer understanding the detailed
information for the required packages when kernel-rpm-macros is
not installed.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Id9b855eeac97d780d9c572d306da3c3a1fa95ea6
Reviewed-on: https://review.whamcloud.com/36557
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-11607 tests: replace lustre_version/fstype - full 75/36375/3
James Nunez [Fri, 4 Oct 2019 17:43:05 +0000 (11:43 -0600)]
LU-11607 tests: replace lustre_version/fstype - full

The routine get_lustre_env() is available to all Lustre test
suites and sets an environment variable for the Lustre
version of installed on servers and clients.

Replace calls to lustre_version_code() and facet_fstype()
for all server types with definitions from get_lustre_env()
for the racer, replay-dual, replay-vbr and sanity-lsnapshot
test suites.

While doing this, replace â€˜$SINGLEMDS’ with â€˜MDS1_VERSION’
in lustre_version_code() and facet_fstype().

Clean up around any modifications by removing calls to
return after skip() or skip_env() and converting spaces to
tabs.

Test-Parameters: trivial fstype=ldiskfs testlist=replay-vbr,sanity-lsnapshot
Test-Parameters: fstype=zfs testlist=replay-vbr,sanity-lsnapshot
Test-Parameters: fstype=ldiskfs testlist=racer,replay-dual
Test-Parameters: fstype=zfs testlist=racer,replay-dual
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I4581ccf98b9da256a00f24a2da8cd8ff41f115ca
Reviewed-on: https://review.whamcloud.com/36375
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
4 years agoLU-12820 osc: remove 'transient' arg from osc_enter_cache_try 19/36319/3
Mr NeilBrown [Sun, 29 Sep 2019 23:09:54 +0000 (09:09 +1000)]
LU-12820 osc: remove 'transient' arg from osc_enter_cache_try

This arg is always '0', so remove it.
Consequently, OBD_BRW_NOCACHE is never set, and
cl_dirty_transit and obd_dirty_transit_pages
are never non-zero.
So they can be removed as well.

Linux-commit: 8d1057264a75

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ia047affc33fb9277e6c28a8f6d7d088c385b51a8
Reviewed-on: https://review.whamcloud.com/36319
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-8130 ldlm: separate buckets from ldlm hash table 18/36218/3
NeilBrown [Tue, 17 Sep 2019 19:33:09 +0000 (15:33 -0400)]
LU-8130 ldlm: separate buckets from ldlm hash table

ldlm maintains a per-namespace hashtable of resources.
With these hash tables it stores per-bucket 'struct adaptive_timeout'
structures.

Presumably having a single struct for the whole table results in too
much contention while having one per resource results in very little
adaption.

A future patch will change ldlm to use rhashtable which does not
support per-bucket data, so we need to manage the data separately.

There is no need for the multiple adaptive_timeout to align with the
hash chains, and trying to do this has resulted in a rather complex
hash function.
The purpose of ldlm_res_hop_fid_hash() appears to be to keep
resources with the same fid in the same hash bucket, so they use
the same adaptive timeout.  However it fails at doing this
because it puts the fid-specific bits in the wrong part of the hash.
If that is not the purpose, then I can see no point to the
complexitiy.

This patch creates a completely separate array of adaptive timeouts
(and other less interesting data) and uses a hash of the fid to index
that, meaning that a simple hash can be used for the hash table.

In the previous code, two namespace uses the same value for
nsd_all_bits and nsd_bkt_bits.  This results in zero bits being
used to choose a bucket - so there is only one bucket.
This looks odd and would confuse hash_32(), so I've adjusted the
numbers so there is always at least 1 bit (2 buckets).

Change-Id: Ifab1b48b35b4a9a56610340556875901ad3804b2
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/36218
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12718 obdclass: Allow read-ahead for write requests 00/36000/9
Mr NeilBrown [Thu, 5 Dec 2019 13:51:21 +0000 (08:51 -0500)]
LU-12718 obdclass: Allow read-ahead for write requests

cl_io_read_ahead asserts that read-ahead can only happen
due to CIT_READ or CIT_FAULT requests.
Since LU-9618, we expect CIT_WRITE requests to also
sometimes trigger read-ahead.
So the LINVRNT() needs to be extended to acknowledge
that.

Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I7aa1efb4fc8bb6f8474596a6194fc39f484d7ac7
Reviewed-on: https://review.whamcloud.com/36000
Reviewed-by: Shilong Wang <wshilong@ddn.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12679 tests: large-lun test_2 check OSTSIZE or skip (zfs) 54/35854/9
Shaun Tancheff [Wed, 4 Dec 2019 18:04:19 +0000 (12:04 -0600)]
LU-12679 tests: large-lun test_2 check OSTSIZE or skip (zfs)

Ensure OSTSIZE is sufficient for test to run, or the
backing device is sufficient, otherwise skip the test.

Use the zfs pool name when invoking zdb to report the
super block details.

Cray-bug-id: LUS-6875
Test-Parameters: fstype=zfs testlist=large-lun envdefinitions=REFORMAT=yes
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I65d8bac11d437230153c6ad8d821a5372244f7fa
Reviewed-on: https://review.whamcloud.com/35854
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12677 tests: conf-sanity test_21d must keep zpool 48/35848/5
Shaun Tancheff [Fri, 4 Oct 2019 09:25:07 +0000 (04:25 -0500)]
LU-12677 tests: conf-sanity test_21d must keep zpool

Currently test_21d destroys the zpool during writeconf_or_reformat
but the zpool must be preserved for writeconf to work as intended.

Cray-bug-id: LUS-7688
Test-Parameters: fstype=zfs testlist=conf-sanity
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I8fdc123504b70e59a9ca789141e56815377f6b35
Reviewed-on: https://review.whamcloud.com/35848
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12488 tests: Fix sanityn 93 for DNE configs 66/35366/6
Patrick Farrell [Wed, 6 Nov 2019 18:55:04 +0000 (11:55 -0700)]
LU-12488 tests: Fix sanityn 93 for DNE configs

sanityn test 93 only uses MDT0, but it is getting the parameter
qos_threshold_rr for all MDTs.  This confused the test when
trying to reset the parameter value.

Just limit everything to MDT0. Also modernize lctl vs
$LCTL usage and replace hardwired file system name with
$FSNAME.

Test-Parameters: trivial
Test-Parameters: testlist=sanityn
Test-Parameters: fstype=ldiskfs clientcount=2 mdscount=2 mdtcount=4 osscount=1 ostcount=8 testlist=sanityn
Test-Parameters: fstype=zfs clientcount=2 mdscount=2 mdtcount=4 osscount=1 ostcount=8 testlist=sanityn

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Iff9cca4ce3d2e5ad4e499bba0369189bea21448a
Reviewed-on: https://review.whamcloud.com/35366
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12378 ptlrpc: always reset generation for idle reconnect 52/35052/13
Wang Shilong [Mon, 17 Jun 2019 06:58:34 +0000 (14:58 +0800)]
LU-12378 ptlrpc: always reset generation for idle reconnect

Idle reconnetion is common case and reconnections will
be quick mostly, so always reset generation for this case,
otherwise, it will make application fail just for Idle
reconnection feature.

Change-Id: Ia1531df6a3288663d832865e48a30b448b225766
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/35052
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-11385 lnet: check if current->nsproxy is NULL before using 77/34577/8
Sonia Sharma [Sat, 30 Mar 2019 08:32:34 +0000 (01:32 -0700)]
LU-11385 lnet: check if current->nsproxy is NULL before using

A crash is seen at few sites in the function
rdma_create_id(current->nsproxy->net_ns, cb, dev, ps, qpt).
The issue is identified with the first param in this
function - current->nsproxy->net_ns. There is a
possibility that this value is NULL and resulting in
"kernel NULL pointer dereference" crash.

Handle the case of NULL value gracefully by adding
a check and using init_net if current or
current->nsproxy is NULL.

Change-Id: I06349e081f2c4ba0480b3924fc304f94ca765891
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34577
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
4 years agoLU-11185 mgc: config lock leak 90/32890/12
Alexey Lyashkov [Fri, 22 Mar 2019 08:59:35 +0000 (11:59 +0300)]
LU-11185 mgc: config lock leak

Regression introduced by "LU-580: update mgc llog process code".
It takes additional cld reference to the lock, but lock cancel forget
during normal shutdown. So this lock holds cld on the list for a long
time. any config modification needs to cancel each lock separately.

Cray-bugid: LUS-6253
Fixes: 5538eee216a1 ("LU-580: update mgc llog process code")

Signed-off-by: Alexey Lyashkov <c17817@cray.com>
Change-Id: Ic83e42666bf788739a2f81ab0c66632daa329290
Reviewed-on: https://review.whamcloud.com/32890
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9679 llite: use lli_flags instead of lli_update_atime 39/36839/3
Mr NeilBrown [Mon, 30 Sep 2019 05:10:25 +0000 (15:10 +1000)]
LU-9679 llite: use lli_flags instead of lli_update_atime

Rather than adding a new single-bit field for a flag, use the
already-existing lli_flags field.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I23abc5c7c7383dca3385958f804074baaf551567
Reviewed-on: https://review.whamcloud.com/36839
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Nikitas Angelinas <nangelinas@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 years agoLU-13001 lnet: Wait for single discovery attempt of routers 20/36820/2
Chris Horn [Fri, 22 Nov 2019 20:19:03 +0000 (14:19 -0600)]
LU-13001 lnet: Wait for single discovery attempt of routers

Historically, check_routers_before_use would cause LNet
initialization to pause until all routers had been ping'd once.

This behavior was changed in commit
fe17e9b8370affe063769b880f02b9190584baaa from LU-11298. Now, LNet
will wait indefinitely until discovery completes on all routers.
This is problematic, because if even one router is down then LNet
will stall forever.

Introduce a new lnet_peer state to indicate whether a router has
been discovered (either successfully or not) to restore the historic
behavior.

Fixes fe17e9b8370a ("LU-11298 lnet: use peer for gateway")

Test-Parameters: trivial
Cray-bug-id: LUS-8184
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Ia064ffeb3e918cdb8d5a6150f443c48aa14e7a7c
Reviewed-on: https://review.whamcloud.com/36820
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12193 quota: use rw_sem to protect lqs_hash 95/36795/3
Sergey Cheremencev [Tue, 19 Nov 2019 13:09:14 +0000 (16:09 +0300)]
LU-12193 quota: use rw_sem to protect lqs_hash

Patch introduces rw semaphore for locking
in cfs_hash_lock. It is used to protect lqs_hash
instead of rw_lock to avoid sleeping in atomic:

BUG: sleeping function called from invalid context at kernel/rwsem.c:51
in_atomic(): 1, irqs_disabled(): 0, pid: 11265, name: mdt00_004
CPU: 0 PID: 11265 Comm: mdt00_004 Kdump: loaded Tainted: P
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
 [<ffffffff817b5bf2>] dump_stack+0x19/0x1b
 [<ffffffff810c3bc9>] __might_sleep+0xd9/0x100
 [<ffffffff817bc470>] down_write+0x20/0x50
 [<ffffffffa0a7dad9>] qmt_set_with_lqe+0x3a9/0x750 [lquota]
 [<ffffffffa0a7dede>] qmt_entry_iter_cb+0x5e/0xa0 [lquota]
 [<ffffffffa01b327c>] cfs_hash_for_each_tight+0x10c/0x300 [libcfs]
 [<ffffffffa01b3503>] cfs_hash_for_each_safe+0x13/0x20 [libcfs]
 [<ffffffffa0a7db4f>] qmt_set_with_lqe+0x41f/0x750 [lquota]
 [<ffffffffa0a7dfa9>] qmt_set.constprop.15+0x89/0x2a0 [lquota]
 [<ffffffffa0a7e649>] qmt_quotactl+0x489/0x560 [lquota]
 [<ffffffffa0cc3a90>] mdt_quotactl+0x620/0x770 [mdt]
 [<ffffffffa06860f5>] tgt_request_handle+0x915/0x15c0 [ptlrpc]
 [<ffffffffa0628639>] ptlrpc_server_handle_request+0x259/0xad0 [ptlrpc]
 [<ffffffffa062c771>] ptlrpc_main+0xca1/0x2290 [ptlrpc]
 [<ffffffff810b4ed4>] kthread+0xe4/0xf0
 [<ffffffff817cac77>] ret_from_fork_nospec_begin+0x21/0x21
[  280.258396] BUG: scheduling while atomic: mdt00_004/11265/0x10000003

Change-Id: Id9238f9001c38105fb91d29c47fa34ad35158b40
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-on: https://review.whamcloud.com/36795
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-11025 uapi: introduce OBD_CONNECT2_CRUSH 74/36774/7
Lai Siyao [Sat, 7 Sep 2019 12:22:29 +0000 (20:22 +0800)]
LU-11025 uapi: introduce OBD_CONNECT2_CRUSH

Introduce a new connect flag OBD_CONNECT2_CRUSH to indicate whether
client or server supports new directory hash type 'crush'.

Test-parameters: trivial

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I073ab65eddf502c016f30ad535740f3d9a77459f
Reviewed-on: https://review.whamcloud.com/36774
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-6174 obd: perform proper division 51/36751/5
James Simmons [Mon, 18 Nov 2019 20:26:39 +0000 (15:26 -0500)]
LU-6174 obd: perform proper division

Lustre stats have two files lc_sum and lc_count which are both
s64 so using do_div() is completely wrong. Use div64_s64()
instead.

Change-Id: Ie694c1c6bf79979bff3eae0de9791c81c355ea30
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36751
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12741 ptlrpc: do lu_env_refill for new request 14/36714/2
Mikhail Pershin [Fri, 8 Nov 2019 06:26:06 +0000 (09:26 +0300)]
LU-12741 ptlrpc: do lu_env_refill for new request

Perform lu_env_refill() prior any new request handling.
That was done already in tgt_request_handle() and is moved
now to ptlrpc_main() to work for any handler as well,
e.g. ldlm_cancel_handler()

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ic5d8bfbd845f7e131849078c016f7e13b91d072f
Reviewed-on: https://review.whamcloud.com/36714
Tested-by: jenkins <devops@whamcloud.com>
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>
4 years agoLU-12937 utils: update wirecheck for new values 06/36706/5
Andreas Dilger [Thu, 7 Nov 2019 17:47:21 +0000 (10:47 -0700)]
LU-12937 utils: update wirecheck for new values

Update the wirecheck.c file to handle changes that were made directly
in the wiretest.c files.  This allows the wiretrst.c file to be
regenerated properly without losing checks for new constants, and
fixes issues with some #defines that were changed to named enums.

Code under CONFIG_FS_POSIX_ACL in utils/wirecheck.c does not build in
userspace if the <linux/posix_acl_xattr.h> header is not available.
It should be enough that we are checking this in ptlrpc/wirecheck.c
since struct posix_acl_xattr_entry and posix_acl_xattr_header come
from the kernel anyway, so a userspace check is mostly redundant.

Test-Parameters: trivial
Fixes: 1fd63fcb045c ("LU-12090 utils: lfs rmfid")
Fixes: b4375f5fc66c ("LU-11444 ptlrpc: Add increasing XIDs CONNECT2 flag")
Fixes: 19b2bc9bbc25 ("LU-6142 lustre: introduce CONFIG_LUSTRE_FS_POSIX_ACL")
Fixes: 3611352b699c ("LU-11285 mdt: improve IBITS lock definitions")
Fixes: 68635c3d9b31 ("LU-11963 osd: Add nonrotational flag to statfs")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4945d6e2e8d7f4f98530e6dafd43bcf93735a5b1
Reviewed-on: https://review.whamcloud.com/36706
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12949 obdclass: don't extend timer if obd stops 03/36703/3
Alexander Boyko [Thu, 7 Nov 2019 11:13:50 +0000 (06:13 -0500)]
LU-12949 obdclass: don't extend timer if obd stops

During umount all clients became stale, so the first check at
check_for_recovery_ready() is passed, but there is no guarantee
that recovery timer was started. So, we need to check obd_stopping.

The test 138 is added to recovery-smal.sh.
It reproduces the issue when MDT is waiting for clients during
recovery and MDT umount happens.
extend_recovery_timer()) ASSERTION( obd->obd_recovery_start != 0 )
failed

Cray-bug-id: LUS-7917
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: I1906fdfcc10606912a1f81560bb60b9d424db149
Reviewed-on: https://review.whamcloud.com/36703
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12469 mdd: handle migrate case with SELinux 84/36684/2
Sebastien Buisson [Wed, 6 Nov 2019 12:51:55 +0000 (21:51 +0900)]
LU-12469 mdd: handle migrate case with SELinux

In case a metadata object is created for migration purpose,
its security context should not be initialized. The
security.selinux xattr will be copied after creation, just like
any other xattr, so that the migrated object has the right security
context.

Test-Parameters: clientselinux mdtcount=4 envdefinitions=ONLY=230 testlist=sanity,sanity,sanity,sanity
Test-Parameters: clientselinux mdtcount=4 testlist=sanity,recovery-small,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0bc274426c003f8081da2f4d1e8e6c12a70b9930
Reviewed-on: https://review.whamcloud.com/36684
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12826 mdt: limit root to change project state by default 44/36544/10
Wang Shilong [Tue, 22 Oct 2019 06:15:02 +0000 (14:15 +0800)]
LU-12826 mdt: limit root to change project state by default

The current project quota implementation allows users to
change the Project ID of files for which they have write
permission to any value. This is not useful if the project
quota is intended to be enforced instead of only being used
for quota accouting.

Change it so that by default only root can change the projid
of a file. Setting "mdt.*.enable_chprojid_gid" will allow
users with the specified numeric Group ID (eg. 1 = "admin") to
also change the projid of a file. Use "-1" to return the previous
behavior where all users can change the projid of their files.

Change-Id: I91c138d29f4d0b9bc607528d86893451904c9892
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36544
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-11832 ldiskfs: properly handle VFS parallel locking 14/34714/30
James Simmons [Thu, 21 Nov 2019 22:15:10 +0000 (17:15 -0500)]
LU-11832 ldiskfs: properly handle VFS parallel locking

The lustre server stack has an OSD abstraction to treat the under
lying native file system as an object store. In this case it is
ext4 being used to store internal data the OSD abstraction uses.

The area the recent VFS parallel locking changes impacts us is in
the LFSCK scrubbing code. The method the scrubbing code uses to
ensure a healthy state for the OSD data that is stored is by
using the native file system backend directory scanning code which
is setup to pass in unique function hook to handle each OSD
object store data file.

Currently this starts with the scrub code calling code that resembles
the internals of iterate_dir() which in turn calls ext4_readdir() with
struct dir_context actor mapping to each unique callback defined
by the field olm_filldir of struct osd_lf_map. The inode_lock()
and inode_unlock() was called with osd_lookup_one_len_unlocked()
which is often present in the dir_context actor function as defined by
olm_filldir. In essence the locking was done at the lowest levels.
With newer kernels this low level locking preventing mounting
of the server back end with the following back trace:

 [  612.287442] mount.lustre    D    0  3026   3025 0x00000224
 [  612.289699] Call trace:
 [  612.290398] [<ffff000008085a8c>] __switch_to+0x8c/0xa8
 [  612.292363] [<ffff00000880b9d0>] __schedule+0x328/0x860
 [  612.294394] [<ffff00000880bf3c>] schedule+0x34/0x8c
 [  612.296285] [<ffff00000880f460>] rwsem_down_write_failed+0x134/0x238
 [  612.304803] [<ffff00000880e89c>] down_write+0x54/0x58
 [  612.307115] [<ffff0000028cae2c>] osd_ios_root_fill+0xd4/0x590 [osd_ldiskfs]
 [  612.310109] [<ffff000002281798>] call_filldir+0xd8/0x148 [ldiskfs]
 [  612.312450] [<ffff000002282170>] ldiskfs_readdir+0x670/0x7b8 [ldiskfs]
 [  612.314975] [<ffff0000082b18d0>] iterate_dir+0x150/0x1b8
 [  612.317118] [<ffff0000028c24ac>] osd_ios_general_scan+0x104/0x2b8 [osd_ldiskfs]
 [  612.320299] [<ffff0000028cb384>] osd_initial_OI_scrub+0x9c/0x13c0 [osd_ldiskfs]
 [  612.323047] [<ffff0000028cd53c>] osd_scrub_setup+0xb44/0x1118 [osd_ldiskfs]
 [  612.325758] [<ffff00000289d4ec>] osd_device_alloc+0x544/0x950 [osd_ldiskfs]
 [  612.328637] [<ffff000001e29dac>] class_setup+0x7bc/0xd20 [obdclass]
 [  612.331324] [<ffff000001e33a30>] class_process_config+0x1708/0x2e90 [obdclass]
 [  612.334259] [<ffff000001e3a368>] do_lcfg+0x2b0/0x6d8 [obdclass]
 [  612.336704] [<ffff000001e3f49c>] lustre_start_simple+0x154/0x3f8 [obdclass]
 [  612.339694] [<ffff000001e74ee0>] osd_start+0x500/0xa40 [obdclass]
 [  612.342277] [<ffff000001e80a84>] server_fill_super+0x1d4/0x1848 [obdclass]
 [  612.345078] [<ffff000001e437a4>] lustre_fill_super+0x62c/0xdb0 [obdclass]
 [  612.347655] [<ffff0000082a02e0>] mount_nodev+0x5c/0xbc
 [  612.349954] [<ffff000001e3adc4>] lustre_mount+0x4c/0x80 [obdclass]
 [  612.352263] [<ffff0000082a1324>] mount_fs+0x54/0x16c
 [  612.354159] [<ffff0000082bfb6c>] vfs_kern_mount+0x58/0x154
 [  612.356246] [<ffff0000082c2ff8>] do_mount+0x1cc/0xbac
 [  612.358192] [<ffff0000082c3d60>] SyS_mount+0x88/0xd4

This is due to ext4_readdir use of dir_relax_shared() that is taking the
inode_lock which conflicts with the lock taking in our dir_context actor.
Having the dir_context actor take the lock so deep in the stack is incorrect
behavior. Since this is the case we need to migrate the locking from the
dir_context actor to before ext4_readdir() is called. This ends up involving
implementing the locking in the code that calls fops->iterate_dir() osd-ldiskfs
implemented. Instead of handling the lock changes in at the osd-ldiskfs level
across many kernel versions we can use iterate_dir() directly which does this
handling for us.

To use interate_dir() we need to work around the fact that osd-ldiskfs does
not use the VFS layer to create or managed VFS data structure such as struct file
or struct dentry. Instead osd-ldiskfs uses these VFS data structures as scratch
areas just to interface with the ext4 layer. We could use the VFS layer to
manage these data structures but the would require a massive reworking of this
OSD abstraction. Instead we look at what pieces are missing from struct file
due to the open coding that iterate_dir() expects. The first thing missing
from struct file is the initialization of struct path which is used by
file_accessed() to update the atime. The current behavior for our OSD layer
is not to update the atime so we preserve this behavior by setting the
struct file f_flag field to O_NOATIME. This prevents the calling of
touch_atime() which expects a proper struct path. The second expected field
for iterate_dir() is f_security. The function security_file_alloc() is not
exported so we do this manually. For the Lustre OSD case we are not interested
in any file security messages since our object store is not exposed in any way.
We disable the sending of the fsnotify events by setting the f_mode flag to
FMODE_NONOTIFY.

With this migration of the lock handling up the OSD stack we can no longer
just use osd_lookup_one_len_unlocked(). Replace osd_lookup_one_len_unlocked()
with osd_lookup_one_len() for the cases when the inode_lock() is taken much
earlier in the stack. This also closely follows the behavior of similar
functions in the linux VFS layer.

Change-Id: I00893f41ef5ec01835f0e58da6bd5c96a62aea88
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/34714
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
4 years agoLU-12944 mdd: pass correct xattr size to lower layers 89/36689/3
Sebastien Buisson [Wed, 6 Nov 2019 17:31:08 +0000 (02:31 +0900)]
LU-12944 mdd: pass correct xattr size to lower layers

In mdd_iterate_xattrs(), struct lu_buf allocated to store xattr value
can be reused for multiple xattrs, because it is only reallocated if
it happens to be too small for one xattr.
As a consequence, lb_len field does not represent actual xattr's size.
It has to be adjusted when passed to lower layers.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I26b54759b4e69fbac17a1032bbc724b796d78108
Reviewed-on: https://review.whamcloud.com/36689
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12931 timers: correctly offset mod_timer. 88/36688/5
James Simmons [Tue, 19 Nov 2019 00:17:49 +0000 (19:17 -0500)]
LU-12931 timers: correctly offset mod_timer.

During a high level code review of the lustre time code it was
discovered that some of the mod_timer() calles was missing
adding the current jiffies value to the timeout that converted
to jiffies from seconds. Add this proper offset.

Fixes: b11be372c21d ("LU-9019 lnet: move ping an delay injection to time64_t")
Fixes: e920b3681451 ("LU-9019 ldlm: migrate the rest of the code to 64 bit time")
Change-Id: Ie4be14946032308610aff2fe72d15d4d70773da1
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36688
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12828 ldlm: FLOCK request can be processed twice 40/36340/4
Andriy Skulysh [Thu, 9 Aug 2018 14:58:17 +0000 (17:58 +0300)]
LU-12828 ldlm: FLOCK request can be processed twice

Original request can be processed after resend
request, so it can create a lock on MDT without
client lock or unlock other lock.

Make flock enqueue to use modify RPC slot.

Change-Id: Icfee202fe2e389beda1116f78f8b933c7ea182fb
Cray-bug-id: LUS-5739
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Signed-off-by: Vitaly Fertman <c17818@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-on: https://review.whamcloud.com/36340
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12503 llite: file write pos mimatch 21/36021/3
Bobi Jam [Wed, 27 Nov 2019 08:48:49 +0000 (16:48 +0800)]
LU-12503 llite: file write pos mimatch

In vvp_io_write_start(), after data were successfully written, but
for some reason (e.g. out of quota), the data does not or got
partially commited, so that the file's write position (kiocb->ki_pos)
would be pushed forward falsely, and in the next iteration of write
loop, it fails the assertion

ASSERTION( io->u.ci_rw.rw_iocb.ki_pos == range->cir_pos )

This patch corrects ki_pos if this scenario happens.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib85b1a777da24cc935e5976beab2390052b4cec3
Reviewed-on: https://review.whamcloud.com/36021
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-13057 tests: sanity-pcc test_1c: Failed to start copytool 57/36957/3
Yang Sheng [Mon, 9 Dec 2019 07:34:00 +0000 (15:34 +0800)]
LU-13057 tests: sanity-pcc test_1c: Failed to start copytool

Initialize default value while entry to ensure use correct value.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I6053f4c9e9cc655fdb1501c901aab81f4bd14987
Reviewed-on: https://review.whamcloud.com/36957
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 years agoLU-10589 tests: insulate sanity-dom from test failures 69/36369/3
James Nunez [Fri, 4 Oct 2019 11:39:03 +0000 (05:39 -0600)]
LU-10589 tests: insulate sanity-dom from test failures

The test suite sanity-dom calls two other test suites.
If one of these subtest suites has a test failure, that
failure is correctly reported as a failure, but it also
causes the last test in the subtest suite to look like
a failure.

Return zero for the subtest suites sanity and sanityn.

Test-Parameters: trivial fstype=zfs testlist=sanity-dom
Test-Parameters: fstype=ldiskfs testlist=sanity-dom
Test-Parameters: mdscount=2 mdtcount=4 fstype=zfs testlist=sanity-dom
Test-Parameters: mdscount=2 mdtcount=4 fstype=ldiskfs testlist=sanity-dom
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I778990ad8724de182a96399cf09758edfd35b2e1
Reviewed-on: https://review.whamcloud.com/36369
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
4 years agoLU-12514 obdclass: discard FS_REQUIRES_DEV flag. 25/35425/13
NeilBrown [Thu, 12 Sep 2019 00:13:07 +0000 (20:13 -0400)]
LU-12514 obdclass: discard FS_REQUIRES_DEV flag.

Lustre client mounts do not need a dev, as we can see from
lustre_mount() calling mount_nodev(). So remove the flag which
could cause confusion elsewhere.

Linux-commit: 60de0ad7076260081de78346c0fee24ed8e3c5c8

Change-Id: I93adeb9594369255018de0b618b158a39b634c0b
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35425
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-12833 obdclass: fix LWP config processing 91/36391/2
Alexander Boyko [Mon, 7 Oct 2019 10:39:25 +0000 (06:39 -0400)]
LU-12833 obdclass: fix LWP config processing

In the situation when config includes SKIP records
for command add mdc. LWP config processing interprets
add_conn as valid and fails to add connection because
there is no LWP device.
lustre_lwp_add_conn()) lustre-OST0000: can't find lwp device.
server_start_targets()) lustre-OST0000: failed to start LWP: -2

The fix adds checking for CFG_F_MARKER and CFG_F_SKIP before
adding connection. These flags shows that marker was not in SKIP
state, device and uuid was added.

Cray-bug-id: LUS-7933
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Idbf709bb46a0be958946048fb16d3b622d2edd1f
Reviewed-on: https://review.whamcloud.com/36391
Tested-by: jenkins <devops@whamcloud.com>
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>
4 years agoLU-12929 lnet: Remove field net_state in struct lnet_net 55/36655/2
Mr NeilBrown [Mon, 4 Nov 2019 00:15:42 +0000 (11:15 +1100)]
LU-12929 lnet: Remove field net_state in struct lnet_net

lnet_net.net_state is set but never used.  So the code that sets
it isn't tested and might be wrong.  Best to just remove it.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ia11b8c0da0286f82c43be353944e036b5ea936c6
Reviewed-on: https://review.whamcloud.com/36655
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 mdc: Use BUILD_BUG_ON() for mdc_request.c 22/36722/2
Arshad Hussain [Tue, 29 Oct 2019 15:57:31 +0000 (21:27 +0530)]
LU-12923 mdc: Use BUILD_BUG_ON() for mdc_request.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/mdc/mdc_request.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: Ib04ddcb9d93c99cebdb175b39aceca0c25b12a10
Reviewed-on: https://review.whamcloud.com/36722
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 target: Use BUILD_BUG_ON() for tgt_lastrcvd.c 21/36721/2
Arshad Hussain [Tue, 29 Oct 2019 15:48:40 +0000 (21:18 +0530)]
LU-12923 target: Use BUILD_BUG_ON() for tgt_lastrcvd.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/target/tgt_lastrcvd.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I72df471f3480ae2267be08103ae4fae62c94b2ff
Reviewed-on: https://review.whamcloud.com/36721
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 ldlm: Use BUILD_BUG_ON() for ldlm_resource.c 20/36720/2
Arshad Hussain [Tue, 29 Oct 2019 15:39:56 +0000 (21:09 +0530)]
LU-12923 ldlm: Use BUILD_BUG_ON() for ldlm_resource.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/ldlm/ldlm_resource.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I16e32c16de09ef020ed0dad1775403d9d3c55ef6
Reviewed-on: https://review.whamcloud.com/36720
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 mdd: Use BUILD_BUG_ON() for mdd_object.c 19/36719/3
Arshad Hussain [Tue, 29 Oct 2019 15:30:29 +0000 (21:00 +0530)]
LU-12923 mdd: Use BUILD_BUG_ON() for mdd_object.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/mdd/mdd_object.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I6badf6cbeb2726b643f494f68b2f30752ffffa8c
Reviewed-on: https://review.whamcloud.com/36719
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 lov: Use BUILD_BUG_ON() for lov_pack.c 18/36718/2
Arshad Hussain [Tue, 29 Oct 2019 14:14:33 +0000 (19:44 +0530)]
LU-12923 lov: Use BUILD_BUG_ON() for lov_pack.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/lov/lov_pack.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: Ic59b482e73cf2556247153ecde658ded57b603f9
Reviewed-on: https://review.whamcloud.com/36718
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 mdc: Use BUILD_BUG_ON() for mdc_reint.c 17/36717/2
Arshad Hussain [Tue, 29 Oct 2019 14:54:22 +0000 (20:24 +0530)]
LU-12923 mdc: Use BUILD_BUG_ON() for mdc_reint.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/mdc/mdc_reint.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I70a711f15e6471f7a89577e4d7d712cf46e4e0cd
Reviewed-on: https://review.whamcloud.com/36717
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
4 years agoLU-12928 gss: crash in sec2target_str() 08/36708/5
Yang Sheng [Thu, 7 Nov 2019 18:48:43 +0000 (02:48 +0800)]
LU-12928 gss: crash in sec2target_str()

The timer_setup() API has being used since 3.10.0-957.x
kernel. So change gck_timer to a embedded struct to avoid
crashed on new timer API.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Ie12e21bca4169746016c8ac0e3ee4a125893ebf6
Reviewed-on: https://review.whamcloud.com/36708
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12942 lnet: Optimize check for routing feature flag 79/36679/2
Chris Horn [Wed, 11 Sep 2019 20:27:30 +0000 (15:27 -0500)]
LU-12942 lnet: Optimize check for routing feature flag

Check the routing feature flag outside of the loop.

Cray-bug-id: LUS-7862
Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I636305532d4bd5b8157a9df1b98af0da3bba867f
Reviewed-on: https://review.whamcloud.com/36679
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
4 years agoLU-12936 lnet: remove pt_number from lnet_peer_table. 71/36671/2
Mr NeilBrown [Tue, 5 Nov 2019 02:49:16 +0000 (13:49 +1100)]
LU-12936 lnet: remove pt_number from lnet_peer_table.

This fields is no longer used - except for an ASSERT().
It did have a use once, but that was removed in
Commit ffd8e881bb98 ("LU-2456 lnet: Dynamic LNet
                      Configuration (DLC)")

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I43d4c50d68fea3194f8515ac02599ef07b37ad60
Reviewed-on: https://review.whamcloud.com/36671
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 pltrpc: Use BUILD_BUG_ON() for wiretest.c 48/36648/3
Arshad Hussain [Mon, 28 Oct 2019 23:58:34 +0000 (05:28 +0530)]
LU-12923 pltrpc: Use BUILD_BUG_ON() for wiretest.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/ptlrpc/wiretest.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: Iaf0a9074809883f6eac2274a9e9bfba26a0ac84e
Reviewed-on: https://review.whamcloud.com/36648
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 utils: Use BUILD_BUG_ON() for wiretest.c 47/36647/3
Arshad Hussain [Mon, 28 Oct 2019 22:14:35 +0000 (03:44 +0530)]
LU-12923 utils: Use BUILD_BUG_ON() for wiretest.c

This patch replaces all CLASSERT() with BUILD_BUG_ON()
for file lustre/utils/wiretest.c

This is done by modifying local defined CLASSERT() macro
with BUILD_BUG_ON() macro. This replicates the kernel
defined BUILD_BUG_ON() where it asserts when condition
is true. This is user-space, therefore we cannot use
kernel define BUILD_BUG_ON() here and had to rely locally
defined BUILD_BUG_ON()

This patch also fixes few space/tab issues reported
by checkpatch

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I2f8bfdbd034a2c8059cf356dd72e4255f4999f8e
Reviewed-on: https://review.whamcloud.com/36647
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12923 mdc: Use BUILD_BUG_ON() for mdc_lib.c 46/36646/4
Arshad Hussain [Mon, 28 Oct 2019 20:35:46 +0000 (02:05 +0530)]
LU-12923 mdc: Use BUILD_BUG_ON() for mdc_lib.c

This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file lustre/mdc/mdc_lib.c

This patch also fixes few space/tab issues reported
by checkpatch

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I6bdc084ca73163b88b2dd105b44b9a3cb611a999
Reviewed-on: https://review.whamcloud.com/36646
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
4 years agoLU-12923 contrib: Update spelling.txt to add BUILD_BUG_ON() 45/36645/4
Arshad Hussain [Mon, 28 Oct 2019 18:47:50 +0000 (00:17 +0530)]
LU-12923 contrib: Update spelling.txt to add BUILD_BUG_ON()

This is first in the series of patchs which replaces
CLASSERT() with upstream kernel defined BUILD_BUG_ON()

This specific patch updates contrib/scripts/spelling.txt
to add line CLASSERT||BUILD_BUG_ON(). This will subsequently
help follow up patchs to trap and flag warning during
checkpatch check if CLASSERT() is still left defined.

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: If8fd76dd107cb53d657b7fa89bd62a9357222629
Reviewed-on: https://review.whamcloud.com/36645
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
4 years agoLU-12920 build: replace ed with sed 30/36630/3
Minh Diep [Thu, 31 Oct 2019 14:26:03 +0000 (07:26 -0700)]
LU-12920 build: replace ed with sed

Ed commad is very old

Test-Parameters: trivial

Change-Id: I18ffe50c3fb006182e68460c03a4d34d5011e62a
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/36630
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12895 mdt: check if object exists first 29/36629/5
Sebastien Buisson [Thu, 31 Oct 2019 11:33:45 +0000 (20:33 +0900)]
LU-12895 mdt: check if object exists first

Make sure object exists before trying to get its attr.

Test-Parameters: clientselinux mdtcount=4 envdefinitions=ONLY=185a testlist=sanity,sanity,sanity,sanity
Test-Parameters: clientselinux mdtcount=4 testlist=sanity,recovery-small,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Idb2cd5d6e3fdf7998040b933be54a001a0e5391b
Reviewed-on: https://review.whamcloud.com/36629
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 years agoLU-12910 osc: allow increasing osc.*.short_io_bytes 87/36587/16
Andreas Dilger [Sat, 26 Oct 2019 11:32:03 +0000 (05:32 -0600)]
LU-12910 osc: allow increasing osc.*.short_io_bytes

The osc.*.short_io_bytes parameter was mixing up the default and
maximum parameter values, and did not allow increasing the parameter
beyond the default.

Allow it to be increased to the maximum value, which depends on the
client PAGE_SIZE, and the amount of free space in the maximally-sized
OST RPC.  Since the maximum size is system dependent, allow some
grace when setting the parameter, so that a single tunable parameter
can work on a variety of different systems.

However, if it is larger than the maximum RDMA size (which is already
too large) return an error, as it means something is wrong.

Add a test case to exercise the osc.*.short_io_bytes parameter.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2ce73af5963a0f9e0f1079dd2f91a4495a3ebbe5
Reviewed-on: https://review.whamcloud.com/36587
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12904 build: Support for gcc -Wimplicit-fallthrough 77/36577/2
Shaun Tancheff [Fri, 25 Oct 2019 13:13:26 +0000 (08:13 -0500)]
LU-12904 build: Support for gcc -Wimplicit-fallthrough

Linux 5.3 enables -Wimplicit-fallthrough
Add decorators for implicit-fallthrough compiler checks.

Test-Parameters: trivial
Cray-bug-id: LUS-8042
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I740062e60e1d19b967ec6b91970cdd3ab03cbab6
Reviewed-on: https://review.whamcloud.com/36577
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12904 build: External _module_ decorator removed 76/36576/2
Shaun Tancheff [Fri, 25 Oct 2019 13:10:59 +0000 (08:10 -0500)]
LU-12904 build: External _module_ decorator removed

As of 5.4 the _module_ decorator prefix is not used for external
kernel modules. This breaks building kernel modules for 5.4.
Prior kernels still require the _module_ decorator.

Add a configure check to test for and handle _module_ decorator is
used.

Linux-commit: d7b0827f28ab3a4fd65864451ffefa695e3255fd

Test-Parameters: trivial
Cray-bug-id: LUS-8042
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I4359452cea8e32a31234b9becc2ed319954c55a4
Reviewed-on: https://review.whamcloud.com/36576
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9859 libcfs: Prevent harmless read underflow 67/36567/2
Dan Carpenter [Thu, 24 Oct 2019 17:42:53 +0000 (13:42 -0400)]
LU-9859 libcfs: Prevent harmless read underflow

Because this is a post-op instead of a pre-op, then it means we check
if knl_buffer[-1] is a space.  It doesn't really hurt anything, but
it causes a static checker warning so let's fix it.

Linux-commit: 134aecbc25fd77645baaea5467b2a7ed8e9d1ea7

Change-Id: I40fee264eb1ac461baa183f199b4e5e1b5eb26f5
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36567
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9325 mds: replace simple_strtol use with target_name2index() 51/36551/5
James Simmons [Thu, 7 Nov 2019 13:49:00 +0000 (08:49 -0500)]
LU-9325 mds: replace simple_strtol use with target_name2index()

With simple_strtol() going away in the future we should move to
kstrtoXXX functions. Looking a the simple_strtol() use in lod and
osp layer that its use is really target_name2index(). We can
migrate to this function so we have one stop to update from using
simple_strtol().

Change-Id: Ia3d0208c1b1c6bfbe9aa03ce3c068d41ed2c7595
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/36551
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9859 libcfs: move remaining code from linux-module.c to module.c 10/36510/2
NeilBrown [Sun, 20 Oct 2019 15:09:10 +0000 (11:09 -0400)]
LU-9859 libcfs: move remaining code from linux-module.c to module.c

There is no longer any need to keep this code separate,
and now we can remove linux-module.c

Linux-commit: 9604c7ac2005e214cb08500c957a79c58bea5c83

Test-Parameters: trivial

Change-Id: Ie2b905f5a79be17840ddfac0661c10332dc2667d
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/36510
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
4 years agoLU-8130 obd: remove used HASH_CL_ENV_[BKT]_BITS 32/36432/2
James Simmons [Fri, 11 Oct 2019 13:11:00 +0000 (09:11 -0400)]
LU-8130 obd: remove used HASH_CL_ENV_[BKT]_BITS

Their is no libcfs hash table for cl_env so this can be removed.

Test-Parameters: trivial

Change-Id: I8d9d4f1dc683edc8fc4c14ffc8266deb178c3162
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/36432
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
4 years agoLU-12816 ptlrpc: ptlrpc_register_bulk LBUG on ENOMEM 09/36309/8
Ann Koehler [Mon, 14 Oct 2019 16:30:56 +0000 (11:30 -0500)]
LU-12816 ptlrpc: ptlrpc_register_bulk LBUG on ENOMEM

Another path through ptl_send_rpc() can cause the assert reported
in LU-10643. The assertion in ptlrpc_register_bulk() on
!desc->bd_registered fails when an rpc is resent and the first
send attempt failed to successfully attach the reply buffer. The
bulk error cleanup in ptl_send_rpc() does not reset the
bd_registered flag.

Cray-bug-id: LUS-7946
Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I474211f196ea9bd83a036747e25c91c37c85ffbb
Reviewed-on: https://review.whamcloud.com/36309
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-9859 libcfs: opencode cfs_cap_{raise,lower,raised} 04/36304/4
NeilBrown [Fri, 11 Oct 2019 14:38:45 +0000 (10:38 -0400)]
LU-9859 libcfs: opencode cfs_cap_{raise,lower,raised}

Each of these functions is used precisely once, so having
a separate exported function seems like overkill.

cfs_cap_raised() is trivial - one line.
cfs_cap_raise() and cfs_cap_lower() are used as a pair
which is more effectively implemented with
override_cred() / revert_creds().

Linux-commit: cc738c1a69da27be8ff7885b4069fa02e45c75c1

There exists a bug in the original Linux client patch.
Additionally handling the SYS_CAP_RESOURCE is used
extensively with the server code so create we can create
simple inline functions that handle this and it makes
the code cleaner.

Change-Id: I3a39a855fb9718ca43e74ef4b9e749b0f43f4bc8
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/36304
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12780 lustre: remove SVC_EVENT flag 57/36257/4
Mr NeilBrown [Tue, 22 Oct 2019 14:42:29 +0000 (10:42 -0400)]
LU-12780 lustre: remove SVC_EVENT flag

This flag is never set or tested, so remove it and the
function for testing it.

Test-Parameters:trivial

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie9fc586ecd26ffce16026d53eac998e3c046d270
Reviewed-on: https://review.whamcloud.com/36257
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
4 years agoLU-12770 test: zfs project_quota testing 97/36197/6
Shaun Tancheff [Fri, 4 Oct 2019 18:13:35 +0000 (13:13 -0500)]
LU-12770 test: zfs project_quota testing

Use zpool get all to query zfs features and check for project_quota
Use zpool get/set to manage project_quota feature, where possible

Cray-bug-id: LUS-7795
Test-Parameters: trivial testlist=sanity-quota
Test-Parameters: fstype=zfs testlist=sanity-quota
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I8111820aa2f4415e8d62c472a3553fe3b9288f19
Reviewed-on: https://review.whamcloud.com/36197
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
4 years agoLU-12757 utils: avoid newline inside error message 76/36176/5
Andreas Dilger [Thu, 12 Sep 2019 23:31:00 +0000 (17:31 -0600)]
LU-12757 utils: avoid newline inside error message

When calling llapi_error() the format string should not end in a
newline, since the error string is appended to the output with
its own newline.

Fix several callers to not supply their own newline, and callers
that duplicate the error string in the error message itself.

In the case that there are callers that *do* include a newline,
handle this gracefully to avoid splitting the error across lines.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie8f7206d82faccb3b33e2fc62b00f5226b3ebbe5
Reviewed-on: https://review.whamcloud.com/36176
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12275 osd: make osd layer always send complete pages 38/36238/7
Sebastien Buisson [Thu, 19 Sep 2019 17:24:49 +0000 (19:24 +0200)]
LU-12275 osd: make osd layer always send complete pages

In osd layer, instead of looking if we go beyong isize, just make sure
we send complete pages all the time.
Data in page beyond isize will be discared by client anyway, and it
should not be harmful to send at max PAGE_SIZE-1 more bytes for reads
at end of file.

With this new paradigm, we need to remove sanity test_246, as its sole
purpose is to actually make sure we do not send more than isize bytes
to the client.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I03dc6037a8dfa1d40d40a4b1f675e047d862d933
Reviewed-on: https://review.whamcloud.com/36238
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
4 years agoLU-12634 libcfs: force_sig() removed task parameter 45/35745/8
Shaun Tancheff [Tue, 5 Nov 2019 05:12:20 +0000 (23:12 -0600)]
LU-12634 libcfs: force_sig() removed task parameter

Linux 5.3 removed the task parameter for force_sig()
signal: Remove task parameter from force_sig

When force_sig() is not available reset the target thread
default handler to SIG_DFL and proceed to use send_sig(..., 1)
which eventually marshals the same signal to the target task.

kernel-commit: 3cf5d076fb4d48979f382bc9452765bf8b79e740

NOTE: force_sig() is used here instead of a wake_up_process() as tasks
      may be blocked on rpc activity.

Test-Parameters: trivial
Cray-bug-id: LUS-7689
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: Ic28f604d985f7e6c3c3dea8bc284c6f2e212f45c
Reviewed-on: https://review.whamcloud.com/35745
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12634 build: Recognize ELRepo -ml mainline kernel 42/35742/5
Shaun Tancheff [Fri, 25 Oct 2019 16:15:00 +0000 (11:15 -0500)]
LU-12634 build: Recognize ELRepo -ml mainline kernel

Add support for identifying ELRepo kernel-ml style
builds on CentOS 7 and 8 based distributions

Test-Parameters: trivial
Cray-bug-id: LUS-7689
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: If4ae7441d4d023d31b1fb42f3fe90ff9c747c0f8
Reviewed-on: https://review.whamcloud.com/35742
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-11762 ldlm: ensure the recovery timer is armed 27/35627/4
Hongchao Zhang [Wed, 10 Jul 2019 08:22:15 +0000 (04:22 -0400)]
LU-11762 ldlm: ensure the recovery timer is armed

During recovery, when the recovery timer is expired, the VBR phase
is initiated only the current recovery timeout is less than the hard
recovery timeout, or it will be stuck in the "wait_event_timeout()"
because there is no timer and it can't be waked up.

Change-Id: I32467afa45393e37f255e2b14f160c9da710461b
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35627
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12518 llite: support page unaligned stride readahead 37/35437/12
Wang Shilong [Mon, 19 Aug 2019 06:57:29 +0000 (14:57 +0800)]
LU-12518 llite: support page unaligned stride readahead

Currently, Lustre works well for aligned IO, but performance
is pretty bad for unaligned IO stride read, we might need
take some efforts to improve this situation.

One of the main problem with current stride read is it is
based on Page Index, so if we hit unaligned page case,
stride Read detection will not work well. To support unaligned
page stride read, we might change page index to bytes offset
thus stride read pattern detection work well and we won't hit
many small pages RPC and readahead window reset. At the same
time, we shall keep as much as performances for existed cases
and make sure there won't be obvious regressions for
aligned-stride and sequential read.

Benchmark numbers:
iozone -w -c -i 5 -t1 -j 2 -s 1G -r 43k -F /mnt/lustre/data

Patched                 Unpatched
1386630.75 kB/sec       152002.50 kB/sec

At least performance bumped up more than ~800%.

Benchmarked with IOR from ihara:
        FPP Read(MB/sec)        SSF Read(MB/sec)
Unpatched 44,636                7,731

Patched   44,318                20,745

Got 250% performances up for ior_hard_read workload.

Change-Id: I791745f957af84a6c790c52fbe9f5fed3fd30c77
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/35437
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
4 years agoLU-8066 obd_type: discard obd_type_lock 96/35096/9
NeilBrown [Wed, 18 Sep 2019 02:07:56 +0000 (22:07 -0400)]
LU-8066 obd_type: discard obd_type_lock

This lock is only used to protect typ_refcnt, so change
that to an atomic_t and discard the lock.

The lock also covers calls to try_module_get and module_put,
but this serves no purpose as it does not prevent the module
from being unloaded.

Finally, the return value for the call to try_module_get is
ignored, which is not safe.

Linux-commit: 493ae16ed39a1c9f792c3b650e2dff11ca2e73e8

Change-Id: I904c51cc4d3426ca520c0bcad9665380ce1f3c3d
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/35096
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
4 years agoLU-12355 ldiskfs: Update ldiskfs patches for 5.0 51/35051/3
Shaun Tancheff [Mon, 3 Jun 2019 22:55:05 +0000 (17:55 -0500)]
LU-12355 ldiskfs: Update ldiskfs patches for 5.0

Update ldiskfs patch series for 5.0
Update configure for ubuntu19 / 5.0.0 kernel

Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <stancheff@cray.com>
Change-Id: I912d457c924c93cfcf98c0b91cd514d5d2a72bbc
Reviewed-on: https://review.whamcloud.com/35051
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>