Whamcloud - gitweb
fs/lustre-release.git
20 months agoLU-11329 misc: populate MAINTAINERS file 13/33413/8
Andreas Dilger [Mon, 22 Oct 2018 10:30:13 +0000 (18:30 +0800)]
LU-11329 misc: populate MAINTAINERS file

Add a relatively comprehensive set of subsystems to the MAINTAINERS
file, and assign patch reviewers to most of them.  There is room
for improvement, but at least this gives someone a chance to find
a maintainer for most of the code.

Update the get_maintainers.pl script to allow reading from stdin.
This allows the script to accept input from "git show <patch>"
to find reviewers for an existing patch.

Create a .mailmap file to map old email addresses to a fairly
current list of users (for now at least).  This allows
get_maintainers.pl to combine contributors into a single identity,
to avoid their "score" from being diluted across two identities.

Some addresses were not mapped from @whamcloud.com to @intel.com,
because they moved back to the @whamcloud.com domain again.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I12d223b4e1d4841c2b6fe1da65e69cd0bb4ebbe5
Reviewed-on: https://review.whamcloud.com/33413
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11152 lnd: test fpo_fmr_poool pointer instead of special bool 08/33408/4
James Simmons [Tue, 23 Oct 2018 03:39:46 +0000 (23:39 -0400)]
LU-11152 lnd: test fpo_fmr_poool pointer instead of special bool

For the ko2iblnd driver it sets a fpo_is_fmr bool to tell use if
a pool was allocated. The name fpo_is_fmr is very misleading to
its function and its a weak test to tell us if a pool was allocated
in the FMR case. It is much easier to test the actually FMR pool
pointer then manually setting a bool flag to tell us if the FMR
pool is valide.

Test-Parameters: trivial
Change-Id: Ib5fa14f4a9d2b89efe5f453e0f243699894f3aeb
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33408
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-930 doc: update Lustre Changelog kernel versions 97/33397/5
Andreas Dilger [Thu, 18 Oct 2018 19:04:51 +0000 (13:04 -0600)]
LU-930 doc: update Lustre Changelog kernel versions

Update the Lustre ChangeLog file to reflect more current kernels
that are known to work.

Clarify that ldiskfs needs a series for that kernel, we no longer
require a patched server kernel for Lustre.

Replace Intel with Whamcloud for the release.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I13a91d5d82bfbeedcebcfa749184b69ca03ebbe5
Reviewed-on: https://review.whamcloud.com/33397
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11530 lnet: properly error check sensitivity 92/33392/2
Amir Shehata [Wed, 17 Oct 2018 19:59:13 +0000 (12:59 -0700)]
LU-11530 lnet: properly error check sensitivity

Reject setting health sensitivity greater than the maximum health
value.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I866ff2cac2ba6b034cdbac24096e7014c66a3e2e
Reviewed-on: https://review.whamcloud.com/33392
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-10258 lfs: lfs mirror write command 19/33219/7
Bobi Jam [Sat, 22 Sep 2018 09:14:46 +0000 (17:14 +0800)]
LU-10258 lfs: lfs mirror write command

Rename "lfs mirror dump" command to "lfs mirror read".

Add "lfs mirror write" command to write a mirror's content of a
mirrored file.

Usage:

lfs mirror write {--mirror-id|-N <mirror_id>}
[--inputfile|-i <input_file>] <mirrored_file>

Options:

--mirror-id|-N <mirror_id>
  This  option  indicates  the  content of which mirror specified by
  mirror_id needs to be written. The mirror_id is the numerical unique
  identifier for a mirror.

--inputfile|-i <input_file>
  The path name of the input file, if not specified, the standard
  input stream will be used. The input stream or input_file cannot
  be the same mirrored file as the mirrored_file.

This command will issue a RESYNC lease write lock to notify MDS to
prepare destination mirror for the write (instantiate components of
the mirror), then client copy data from a file or STDIN to the
specified mirror of the mirrored file. After the data copy, a
RESYNC_DONE lease unlock is issued to MDS to update the layout
of the mirrored file.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I02022349d4ce871319903a8714ffc4534186c0e4
Reviewed-on: https://review.whamcloud.com/33219
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11371 socklnd: dynamically set LND parameters 91/33191/4
Sonia Sharma [Sun, 2 Sep 2018 10:32:17 +0000 (06:32 -0400)]
LU-11371 socklnd: dynamically set LND parameters

Currently, the socklnd parameters cannot be set
dynamically. Only the default values are set
which cannot be changed by deleting and
re-adding the net with DLC.

This patch allows setting socklnd parameters
dynamically.

Change-Id: Ied9c300833b4d1352ca4d94c3b6886ed8d5eb901
Test-Parameters: trivial
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33191
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11163 libcfs: fix CPT NUMA memory failures 48/32848/6
Andreas Dilger [Wed, 25 Jul 2018 05:36:18 +0000 (23:36 -0600)]
LU-11163 libcfs: fix CPT NUMA memory failures

In some (mis-)configurations, NUMA nodes may not have any local RAM,
or the memory allocations are non-uniform between NUMA nodes.

In the unlikely case that a CPT-bound allocation fails, retry the
allocation without the CPT-binding.  Having some remote memory usage
is better than an allocation failure.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib0ab84bef8ff10c43bafb48a8082b62fc544ca29
Reviewed-on: https://review.whamcloud.com/32848
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11101 quota: fix setattr project check 30/32730/6
Wang Shilong [Wed, 17 Oct 2018 05:55:17 +0000 (13:55 +0800)]
LU-11101 quota: fix setattr project check

Similar patch motivated by upstream patch:
ext4: fix setattr project check in fssetxattr ioctl

Currently, project quota could be changed by fssetxattr
ioctl, and existed permission check inode_owner_or_capable()
is obviously not enough, just think that common users could
change project id of file, that could make users to
break project quota easily.

This patch try to follow same regular of xfs project
quota:

"Project Quota ID state is only allowed to change from
within the init namespace. Enforce that restriction only
if we are trying to change the quota ID state.
Everything else is allowed in user namespaces."

Test-Parameters: trivial testlist=sanity-quota,sanity-quota
Change-Id: If03bb120476eca9707b1b4db64e9594bb99df59e
Signed-off-by: Wang Shilong <wshilong@ddn.com>i
Reviewed-on: https://review.whamcloud.com/32730
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-4939 utils: allow configuration through yaml files 46/31846/13
Ben Evans [Wed, 21 Mar 2018 20:57:18 +0000 (16:57 -0400)]
LU-4939 utils: allow configuration through yaml files

add -F option to lctl set_param
file must be in yaml format.  Will accept either set_param
or conf_param formats and issue the appropriate commands

Reorganize set_param and conf_param infrastructures to allow
for shared code.

rename jt_lcfg_mgsparam to jt_lcfg_confparam
rename jt_lcfg_mgsparam2 to jt_lcfg_setparam_perm

Add test_806 to test reconfigure after writeconf

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I8c36ea9be162112e75412fbd990a4f21e108d000
Reviewed-on: https://review.whamcloud.com/31846
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-6142 obdclass: Fix style issues for llog_test.c 01/33501/2
Arshad Hussain [Sun, 21 Oct 2018 03:27:42 +0000 (08:57 +0530)]
LU-6142 obdclass: Fix style issues for llog_test.c

This patch fixes issues reported by checkpatch for file
lustre/obdclass/llog_test.c

Change-Id: I7b148b3db29f374421bad43764ca40bf7e8d6a9f
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/33501
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
20 months agoLU-6142 lnd: create enum kib_dev_caps 09/33409/4
James Simmons [Tue, 23 Oct 2018 03:57:31 +0000 (23:57 -0400)]
LU-6142 lnd: create enum kib_dev_caps

Cleanup IBLND_DEV_CAPS_* by creating enum kib_dev_caps and using
the BIT() macros.

Change-Id: Ia3feaa0a0a98d5621686cddf9cb02af50f42f78c
Test-Parameters: trivial
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33409
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-4684 lod: parse layout for migrating directory 56/33456/3
Lai Siyao [Wed, 17 Oct 2018 23:25:29 +0000 (07:25 +0800)]
LU-4684 lod: parse layout for migrating directory

If directory migration failed, it will be marked
LMV_HASH_FLAG_MIGRATION, lod_parse_dir_striping() should parse
layout for such directory, otherwise such directory can't be
accessed correctly.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I5ee2c2e3e5aa3f9befc3ad81be4bcdc6f9267842
Reviewed-on: https://review.whamcloud.com/33456
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11536 ofd: ofd_create_hdl may return 0 in case of ENOSPC 90/33390/3
Sergey Cheremencev [Mon, 25 Jun 2018 15:52:11 +0000 (18:52 +0300)]
LU-11536 ofd: ofd_create_hdl may return 0 in case of ENOSPC

ostid_set_id rewrites ofd_precreate_objects result after
"LU-6401 uapi: fix up lustre_ostid.h and lustre_fid.h".
This breakes the logic of osp_precreate_reserve() causing
osp_precreate_send() to return ESTALE instead of ENOSPC
when OST can't precreate objects.
osp_precreate_send() returns ESTALE because the result of
create is 0 while last created fid on OST is still the same
with local last_id:

fs1-OST0001-osc-MDT0000: precreate fid [0x100010000:0x571607f:0x0] <
local used fid [0x100010000:0x571607f:0x0]: rc = -116
fs1-OST0001-osc-MDT0000: precreate failed opd_pre_status -116
fs1-OST0001-osc-MDT0000: cannot precreate objects: rc = -116

Change-Id: I4dc057c201253cab14e63c1f06bd5b0d56b5ad2d
Signed-off-by: Sergey Cheremencev <c17829@cray.com>
Fixes: 34acfbc2bfe502d18c12ba35771bde7c4a0f7906
Reviewed-on: https://es-gerrit.dev.cray.com/153462
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Tested-by: Alexander Lezhoev <c17454@cray.com>
Reviewed-on: https://review.whamcloud.com/33390
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11472 lnet: Decrement health on timeout 08/33308/4
Amir Shehata [Thu, 4 Oct 2018 20:00:49 +0000 (13:00 -0700)]
LU-11472 lnet: Decrement health on timeout

When a response times out we want to decrement the health of the
immediate next hop peer ni, so we don't use that interface if there
are others available.

When sending a message if there is a response tracker associated
with the MD, store the next-hop-nid there. If the response times
out then we can look up the peer_ni using the cached NID, and
decrement its health value.

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: I6c2f49a695f078ee50378c0a468c7ee058f7e712
Reviewed-on: https://review.whamcloud.com/33308
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-6142 libcfs: Enforce kernel coding style for libcfs/debug.c 05/14105/3
Robert Read [Thu, 19 Mar 2015 06:42:39 +0000 (23:42 -0700)]
LU-6142 libcfs: Enforce kernel coding style for libcfs/debug.c

This patch enforces Linux kernel coding style for file
libcfs/libcfs/debug.c reported by checkpatch.

Test-Parameters: trivial
Change-Id: I98fb26a3e4d9dde6f620692e485f1709b8257fc0
Signed-off-by: Robert Read <robert.read@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/14105
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
20 months agoLU-11556 tests: fix set_persistent_param_and_check breakage 22/33422/3
Andreas Dilger [Mon, 22 Oct 2018 23:10:57 +0000 (07:10 +0800)]
LU-11556 tests: fix set_persistent_param_and_check breakage

Since patch https://review.whamcloud.com/30087 "LU-7004 tests: move
from lctl conf_param to lctl set_param -P" was landed, there are
a few places that call set_persistent_param_and_check() with a node
name as an argument instead of a facet.

Fix the few places that are doing this.  Note that the call to
t32_verify_quota() is not enabled in this patch because of LU-11558,
since it is entirely possible that this code is currently broken.
This patch is about fixing set_persistent_param_and_check() breakage,
and t32_verify_quota() re-enablement can be done in a second patch.

Test-Parameters: trivial testlist=conf-sanity
Test-Parameters: testlist=conf-sanity mdtfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I47473844c6103efe9c73c780de24605f4e3ebbe5
Reviewed-on: https://review.whamcloud.com/33422
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11516 mdd: do not assert on missing orphan 68/33368/2
Andreas Dilger [Sat, 13 Oct 2018 23:08:28 +0000 (17:08 -0600)]
LU-11516 mdd: do not assert on missing orphan

Do not assert if an orphan being cleaned up is missing.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Icf990bf5ea6dfa2098f0b1fa90d9f546d83ebbe5
Reviewed-on: https://review.whamcloud.com/33368
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11488 test: ignore statfs from precreate in sanity 133b() 17/33517/2
John L. Hammond [Tue, 30 Oct 2018 16:44:44 +0000 (11:44 -0500)]
LU-11488 test: ignore statfs from precreate in sanity 133b()

In sanity test_133b() use obdfilter client export stats rather than
target stats to check for statfs allowing us to ignore statfs RPCs
from the MDT for precreate.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ia47e535d6ce94c712da8ad8698315188c8d64d83
Reviewed-on: https://review.whamcloud.com/33517
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11564 tests: add version check sanity-hsm tests 63/33463/5
James Nunez [Wed, 24 Oct 2018 15:21:53 +0000 (09:21 -0600)]
LU-11564 tests: add version check sanity-hsm tests

sanity-hsm test 24g, 260a and 260b were added to Lustre
tag 2.11.56.15. sanity-hsm test 1d was added to Lustre
2.10.59. Thus, we need to check that the server is
2.11.56 or later before running test 24g, 260a, and 260b
and is 2.10.59 or later for test 1d.

Several tests call the lustre_version_code() routine to check
the Lustre code version of the MDS. Make this call once at the
beginning of the test suite and keep the version in a global
variable.

Also, remove the call to return() after all calls to skip().

Test-Parameters: trivial mdsjob=lustre-b2_10 ossjob=lustre-b2_10 serverbuildno=136 testlist=sanity-hsm
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: If89e730ba9352b5eaa2dc24686372237375a7556
Reviewed-on: https://review.whamcloud.com/33463
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11373 tests: increase debug limit sanity 60b 74/33474/3
James Nunez [Thu, 25 Oct 2018 00:40:35 +0000 (18:40 -0600)]
LU-11373 tests: increase debug limit sanity 60b

We've seen cases where the number of debug messages
on the MDS exceed the line number limit of 100 in
sanity test 60b. Since the line limit is an approximation,
increase this limit to 120 lines.

Test-Parameters: trivial
Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity
Test-Parameters: mdscount=2 mdtcount=2 mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity
Test-Parameters: mdscount=2 mdtcount=2 mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs testlist=sanity

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ibf302893f468957983c11374b8fa829802ff136c
Reviewed-on: https://review.whamcloud.com/33474
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11479 rsync: replicate attributes of file in .lustrerepl 73/33373/2
John L. Hammond [Mon, 15 Oct 2018 18:58:10 +0000 (13:58 -0500)]
LU-11479 rsync: replicate attributes of file in .lustrerepl

When lustre_rsync receives a setattr or setxattr changelog record, the
file to be replicated may still be in the .lustrerepl directory of the
archive. When this is the case, apply the attributes to the file
there.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I6e686d5c4dbeb3acf177a061eb70807c8dd7dfb3
Reviewed-on: https://review.whamcloud.com/33373
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-7770 lov: fix statfs for conf-sanity test_50b 69/33369/6
Andreas Dilger [Mon, 8 Oct 2018 22:00:08 +0000 (16:00 -0600)]
LU-7770 lov: fix statfs for conf-sanity test_50b

Wait for the *client* to be disconnected from the OSTs, not the MDS,
to ensure that the test is actually doing what it thinks it should.
In conf-sanity.sh::lazystatfs(), sleep between statfs operations to
ensure we are not just getting locally-cached statfs results.
Print out device status to ensure that wait_osc_import_state has
actually waited long enough for OSCs to be marked disconnected.

In obd_statfs() print the device name in the debug logs for clarity.

Have "lfs df" print block stats from MDTs only if no OSTs connected.

Checkpatch should warn about get_seconds(), not ktime_get_seconds().

Test-Parameters: mdtcount=4 testlist=conf-sanity,conf-sanity,conf-sanity envdefinitions=ONLY=50b
Test-Parameters: mdtcount=4 testlist=conf-sanity,conf-sanity,conf-sanity envdefinitions=ONLY=50b
Test-Parameters: mdtcount=4 testlist=conf-sanity,conf-sanity,conf-sanity envdefinitions=ONLY=50b
Change-Id: Icbe68f0a133f04f89d44f74a5caaa6c523fcab07
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33369
Tested-by: Jenkins
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11499 tests: skip test_56ba for old server 44/33344/7
Elena Gryaznova [Wed, 10 Oct 2018 16:49:58 +0000 (19:49 +0300)]
LU-11499 tests: skip test_56ba for old server

sanity test_56ba exercise 'lfs find' options expanded
for Progressive File Layout feature.
Patch skips test_56ba for old MDS where PFL feature
does not exist.

Test-Parameters: trivial
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-5536
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: I2439663008548b89c78d0d3f13f3c0722c8f9ba7
Reviewed-on: https://review.whamcloud.com/33344
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11498 tests: remove duplicate write_disjoint test name 43/33343/4
Elena Gryaznova [Wed, 10 Oct 2018 16:34:07 +0000 (19:34 +0300)]
LU-11498 tests: remove duplicate write_disjoint test name

Patch renames write_disjoint() test added by LU-9409 / LUS-1705
to write_disjoint_tiny() to keep the tests names unique.

Test-Parameters: trivial testlist=parallel-scale envdefinitions=ONLY="write_disjoint write_disjoint_tiny"
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-5939
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: I87961e244c5f3fcfdae8263591d03685d8d4fcbd
Reviewed-on: https://review.whamcloud.com/33343
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11476 lnet: set the health status correctly 07/33307/5
Amir Shehata [Thu, 4 Oct 2018 22:41:33 +0000 (15:41 -0700)]
LU-11476 lnet: set the health status correctly

There are cases where the health status wasn't set properly.
Most notably in the tx_done we need to deal with a specific
set of errno: ENETDOWN, EHOSTUNREACH, ENETUNREACH, ECONNREFUSED,
ECONNRESET. In all those cases we can try and resend to other
available peer NIs.

Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Ie8f0275582d434bda5e394fccc2a4d88dd538c69
Reviewed-on: https://review.whamcloud.com/33307
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11419 lfsck: lfsck_namespace_shrink_linkea() dead loop 52/33252/3
Lai Siyao [Thu, 30 Aug 2018 13:08:57 +0000 (21:08 +0800)]
LU-11419 lfsck: lfsck_namespace_shrink_linkea() dead loop

lfsck_namespace_shrink_linkea() may fall in dead loop if it tries
to delete XATTR_NAME_LINK.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I43e6e7917f8f89eb2cc873c8521cd3fbb528f495
Reviewed-on: https://review.whamcloud.com/33252
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11427 llite: optimize read on open pages 34/33234/3
Jinshan Xiong [Tue, 25 Sep 2018 19:27:22 +0000 (12:27 -0700)]
LU-11427 llite: optimize read on open pages

Current read-on-open implementation does allocate cl_page after data
are piggied back by open request, which is expensive and not
necessary.

This patch improves the case by just adding the pages into page cache.
As long as those pages will be discarded at lock revocation, there
should be no concerns.

Signed-off-by: Jinshan Xiong <jinshan.xiong@uber.com>
Change-Id: Idef1b70483e3780790ba5b95c26ef2d4141add5f
Reviewed-on: https://review.whamcloud.com/33234
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11427 lod: create layout in mdo_create() 33/33233/3
Jinshan Xiong [Tue, 25 Sep 2018 19:13:48 +0000 (12:13 -0700)]
LU-11427 lod: create layout in mdo_create()

This patch will create MDT layout in the path of mdo_create() before
mdt_object_open_lock() is invoked. The previous implementation created
layout in mdt_create_data() that caused the problem that layout lock
couldn't be packed in the reply of the open request. Later on an extra
layout request has to be issued for layout lock, which kills all
performance gains by DoM for small files write.

Signed-off-by: Jinshan Xiong <jinshan.xiong@uber.com>
Change-Id: Id11ac79c89d12bbe0e925fbc89417fca3e72e479
Reviewed-on: https://review.whamcloud.com/33233
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11124 utils: add "lfs getstripe -N" option 80/33280/3
Andreas Dilger [Wed, 3 Oct 2018 22:41:56 +0000 (16:41 -0600)]
LU-11124 utils: add "lfs getstripe -N" option

Add an "lfs getstripe -N" option to print the number of mirrors on a
file.  The code for printing the mirror count was already in
liblustreapi.c, but there was no option to request only this value
to be printed.

Move the VERBOSE_* flags into an enum and change the various functions
and structures using these flags to use the enum.  Rename a few of the
constants to be more specific, but add compatibility definitions.

Use "lfs getstripe -N" in sanity-flr and sanity-lfsck for mirror count
instead of parsing the mirror count from the verbose layout.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iafd111c25e22d94153596f9bd4a16750548cab07
Reviewed-on: https://review.whamcloud.com/33280
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11080 tests: skip async update recovery tests 89/32689/3
Elena Gryaznova [Thu, 11 Oct 2018 16:06:35 +0000 (19:06 +0300)]
LU-11080 tests: skip async update recovery tests

Patch skips replay-single async update recovery
tests 110,111,112,115 for old server where this feature
is missing.

Signed-off-by: Elena Gryaznova <c17455@cray.com>
Test-Parameters: trivial testlist=replay-single
Cray-bug-id: LUS-5837
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: I9d7ddf348955bad0644038fe898812cbf92bbdcd
Reviewed-on: https://review.whamcloud.com/32689
Tested-by: Jenkins
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags 07/32107/6
Andreas Dilger [Fri, 19 Oct 2018 03:43:11 +0000 (23:43 -0400)]
LU-10030 idl: use proper ATTR/MDS_ATTR/MDS_OPEN flags

Add proper MDS_ATTR_* and MDS_OPEN_* flags for different flags
namespaces.  The MDS_OPEN_OWNEROVERRIDE was being mapped into
the MDS_ATTR_* flags in some cases.  This did not conflict yet, but
add separate ATTR_OVERRIDE and MDS_ATTR_OVERRIDE flags for this use
so they don't conflict in the future.

Remove the MDS_OPEN_CROSS flag, since this was only used internally
as a hack to pass open flags to mdd_permission(), but was truncating
the u64 open flags to a 32-bit int in the process.  Do the convert
to MAY_* flags at the MDT layer instead of inside mdd_permission()
by moving the accmode() flag conversion into lustre_mds.h code.

The ATTR_OPEN flag has existed since kernel 2.6.27, so we can always
use that directly instead of the ATTR_FROM_OPEN flag we #defined.
The ATTR_RAW flag is no longer used at all and can be removed.

Rename various "flags" uses in the code to "open_flags" so that it
is more clear which flags values are being used.  This exposed a few
places in the code where we were using an int to pass these flags, but
some of the MDS_OPEN_* flags are using 64-bit values already.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I833a6e6102f947a9276cb6bf03826fd4a5ecab07
Reviewed-on: https://review.whamcloud.com/32107
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-8066 obd: use correct names for conn_uuid 13/33213/6
James Simmons [Sat, 13 Oct 2018 02:34:58 +0000 (22:34 -0400)]
LU-8066 obd: use correct names for conn_uuid

The LUSTRE_R[OW]_ATTR() macros assume that the name of the sysfs
file to create matches the beginning of the function names. In
the case of LUSTRE_RO_ATTR(conn_uuid) this maps to the function
conn_uuid_show() and generated sysfs files "conn_uuid". While it
makes sense to standardize this interface we need to keep the
old xxx_conn_uuid. We can create these xxx_conn_uuid sysfs files
by using the base sysfs attr macro LUSTRE_ATTR().

Change-Id: I3bea85334578a07f4758f54773846d0f24a3d69a
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33213
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-10337 mdt: Allow open of open orphans 05/30405/23
Patrick Farrell [Thu, 8 Mar 2018 11:47:56 +0000 (05:47 -0600)]
LU-10337 mdt: Allow open of open orphans

Standard open by handle behavior allows opening of open
unlinked files files.  This currently only works in Lustre
if the file is already open on the same node, which is
insufficient.

When an open file is unlinked, we make it an orphan.
These files can be recognized by checking their open count
(mod_count).  It's enough to just make opening these files
possible, because the client cannot look them up to do an
open except when using a file handle.

Cray-bug-id: LUS-2626
Change-Id: Idd7898cefcf60b28c682e578774411e476216c9e
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/30405
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-9795 tests: exclude several tests which conflict with SSK 62/28662/37
Chris Hanna [Fri, 26 Jan 2018 14:17:39 +0000 (09:17 -0500)]
LU-9795 tests: exclude several tests which conflict with SSK

When SSK is activated by setting SHARED_KEY to true,
some tests in various suites fail, often because components
are manually halted or failed.
This patch excludes these tests under SSK and makes minor changes
for SSK compatibility.

Also reconnect client-to-OST connections if they became idle.
This new idle ability is brought by patch
https://review.whamcloud.com/16682 and it prevents idle OSCs from
taking into account new GSS flavor.

Change-Id: I998ae9bf1998f206914ff425e1f6e27741443e9c
Test-Parameters: testlist=sanity-gss envdefinitions=ONLY=1,SHARED_KEY=true
Signed-off-by: Chris Hanna <hannac@iu.edu>
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/28662
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-6142 llite: move CONFIG_SECURITY handling to llite_internal.h 10/33410/2
James Simmons [Sat, 20 Oct 2018 18:42:45 +0000 (14:42 -0400)]
LU-6142 llite: move CONFIG_SECURITY handling to llite_internal.h

For the linux kernel its recommended to keep CONFIG_* wrapped code
in a header file instead of the source files to avoid making the
code more difficulty to read. Move CONFIG_SECURITY wrapped code
to llite_internal.h in this case.

Change-Id: I60eba17181d3b57fb64e99a441163f975dbab03c
Test-Parameters: trivial
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33410
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
20 months agoLU-11474 lnet: unlink md if fail to send recovery 06/33306/3
Amir Shehata [Thu, 4 Oct 2018 21:00:37 +0000 (14:00 -0700)]
LU-11474 lnet: unlink md if fail to send recovery

MD for recovery ping should be unlinked if we fail to send the GET.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Change-Id: Iac84ceda886f47df1b1a1d734129c8d29851886b
Reviewed-on: https://review.whamcloud.com/33306
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11288 osc: re-check target versus available grant 26/33226/10
Alex Zhuravlev [Tue, 25 Sep 2018 06:48:06 +0000 (09:48 +0300)]
LU-11288 osc: re-check target versus available grant

- under the spinlock, otherwise it's possible that available
  grant has changed since target calculation and bytes to
  shrink go negative.
- tgt_grant_alloc() should avoid negative grants

Change-Id: I35613e4e840e172977c7b866fb429c40a7fefc8f
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33226
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-6142 obdclass: Fix style issues for obdo.c 82/32982/3
Arshad Hussain [Sun, 12 Aug 2018 04:52:23 +0000 (10:22 +0530)]
LU-6142 obdclass: Fix style issues for obdo.c

This patch fixes issues reported by checkpatch
for file lustre/obdclass/obdo.c

Change-Id: Ie658d5428407f69f7654c5450464589d7ddb2282
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/32982
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
20 months agoLU-10801 utils: fix lfs_migrate argument parsing 77/32977/10
Andreas Dilger [Fri, 10 Aug 2018 06:59:10 +0000 (14:59 +0800)]
LU-10801 utils: fix lfs_migrate argument parsing

Since the landing of the following patch, any short options with
adjacent arguments(e.g. -S1M or -E-1) are treated as separate
options(e.g. -S -1 -M or -E -1).
- Lustre-commit: 60c5bc2502591f46260e11db540c0ec2adbc8db8
- Lustre-change: https://review.whamcloud.com/20621

This patch is to fix the broken argument parsing in lfs_migrate.

Change-Id: I99b9518a8f371c2becb6b1fc346b8a14dd02870e
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32977
Tested-by: Jenkins
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11158 mdt: grow lvb buffer to hold layout 47/32847/11
Bobi Jam [Thu, 19 Jul 2018 15:19:43 +0000 (23:19 +0800)]
LU-11158 mdt: grow lvb buffer to hold layout

Write intent RPC could generate a layout bigger than the initial
mdt_max_mdsize, so that the new layout cannot be returned to client,
this patch fix this issue by:

* fix a glitch in lod_use_defined_striping(), where v3 should be
  updated along v1.
* change lvbo_fill() return -ERANGE in this case, and stores in its
  @buflen parameter the needed buffer size
* in ldlm_handle_enqueue0(), when ldlm_lvbo_fill() detects -ERANGE,
  it grows the corresponding RMF_DLM_LVB buffer and retrives the
  layout to refill the buffer again.
* define a new MAX_MD_SIZE to hold a reasonal composite layout, and
  keeps old MAX_MD_SIZE as MAX_MD_SIZE_OLD.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I255b954195b3e64c3edd416c0cb209df0d9fc43a
Reviewed-on: https://review.whamcloud.com/32847
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-4684 migrate: replace PFID via source 24/33324/2
Lai Siyao [Fri, 31 Aug 2018 11:47:12 +0000 (19:47 +0800)]
LU-4684 migrate: replace PFID via source

In directory migration, when it needs to update OST object PFID,
it should always do via source object, because target object may
be remote. And in this case, lod_obj_stripe_replace_parent_fid_cb()
doesn't compare parent FID with that in XATTR_NAME_FID, but set
with the passed in FID directly.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Icd7f6521ecac43cfeaee3e61e662d94115d63d68
Reviewed-on: https://review.whamcloud.com/33324
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-8391 ldlm: check double grant race after resource change 75/21275/11
Li Dongyang [Wed, 13 Jul 2016 06:17:53 +0000 (16:17 +1000)]
LU-8391 ldlm: check double grant race after resource change

In ldlm_handle_cp_callback(), we call lock_res_and_lock and then
check if the ldlm lock has already been granted.
If the lock resource has changed, we release the lock and go ahead
allocating new resource, then grabs the lock again before calling
ldlm_grant_lock().
However this gives another thread an opportunity to grab the lock
and pass the check, while we change the resource. Eventually the
other thread calls ldlm_grant_lock() on the same ldlm lock and
triggers a LASSERT.

Fix the issue by doing double grant race check after changing the
lock resource.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: Ib327b5e6b5f211909db5350de383d470a891e72a
Reviewed-on: https://review.whamcloud.com/21275
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11535 ldiskfs: allocate extra ldiskfs_ext_path for root 88/33388/2
Artem Blagodarenko [Wed, 17 Oct 2018 12:17:47 +0000 (15:17 +0300)]
LU-11535 ldiskfs: allocate extra ldiskfs_ext_path for root

Patch ext4_s_max_ext_tree_depth changes path array allocation.
Maximum extent depth is counted in ext4_ext_init(), but
extent's root stored in i_data is not counted. This leads to
out of array writting in ldiskfs_ext_remove_space() and following
fault during transaction commit:

BUG: unable to handle kernel NULL pointer dereference at (null)
[<ffffffffa0f25acb>] osd_trans_commit_cb+0xcb/0x2b0 [osd_ldiskfs]
[<ffffffffa0ecc8e1>] ldiskfs_journal_commit_callback+0x61/0x80
[<ffffffffa03eb8ef>] jbd2_journal_commit_transaction+0x116f/0x15a0

This patch adds one extra element for root in path array.

Cray-bug-id: LUS-6488
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@gmail.com>
Change-Id: I950e223f6ad68c88c1e78fc62448542fd4e78329
Reviewed-on: https://review.whamcloud.com/33388
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11450 mdd: avoid logging trusted.som xattr in changelogs 23/33323/5
Qian Yingjin [Tue, 9 Oct 2018 07:41:59 +0000 (15:41 +0800)]
LU-11450 mdd: avoid logging trusted.som xattr in changelogs

The Lazy Size on MDT is causing the trusted.som xattr to be logged
in the changelog whenever a file is needed to update this xattr
data casued by file open/close or truncate operations.
This patch fixes this problem to avoid logging this xattr for
every file.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I8f069afdfa84a8fc9f96819d066fd3e4d08794af
Reviewed-on: https://review.whamcloud.com/33323
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11553 kernel: new kernel [RHEL7.5 4.14.0-49.13.1.el7a] 11/33411/5
Minh Diep [Sun, 21 Oct 2018 21:27:14 +0000 (14:27 -0700)]
LU-11553 kernel: new kernel [RHEL7.5 4.14.0-49.13.1.el7a]

This patch makes changes to support new RHEL 7.5 release on ARM.

Test-Parameters: forbuildonly

Change-Id: Id0bab8510b7479d979b5d66ea96969140c509feb
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33411
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11453 class: use INIT_LIST_HEAD_RCU instead INIT_LIST_HEAD 17/33317/4
Yang Sheng [Mon, 8 Oct 2018 15:01:01 +0000 (23:01 +0800)]
LU-11453 class: use INIT_LIST_HEAD_RCU instead INIT_LIST_HEAD

Use INIT_LIST_HEAD_RCU to avoid compiler optimization too much
in some case.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I66b340ac3147d2cb911a2b7d3e210c6847047dac
Reviewed-on: https://review.whamcloud.com/33317
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
20 months agoLU-11393 osd-zfs: time struct changes 45/33345/4
Nathaniel Clark [Wed, 10 Oct 2018 21:16:58 +0000 (17:16 -0400)]
LU-11393 osd-zfs: time struct changes

Account for changes in 0.7.10 and pre 0.8 changes in ZFS that change
the time structure.

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: I5c2373d053ea92d8bf04befe1d096159b8a34126
Reviewed-on: https://review.whamcloud.com/33345
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
20 months agoLU-11490 tests: fix rr_alloc() test to use FSNAME 33/33333/2
Elena Gryaznova [Wed, 10 Oct 2018 13:46:46 +0000 (16:46 +0300)]
LU-11490 tests: fix rr_alloc() test to use FSNAME

Patch fixes rr_alloc() test to use FSNAME instead of lustre in
the parameter path.

Test-Parameters: testlist=trivial testlist=parallel-scale envdefinitions=ONLY=rr_alloc
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-5955
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: Iebd147dd9757357bf7c8376e9271cb17f4d076a9
Reviewed-on: https://review.whamcloud.com/33333
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11482 flr: Inherit flags from template 26/33326/10
Patrick Farrell [Thu, 11 Oct 2018 11:55:42 +0000 (06:55 -0500)]
LU-11482 flr: Inherit flags from template

New files created in directories with a default layout
should inherit the per-component layout flags.

This allows us to set the prefer or nosync flags in a
default layout and apply them to files created in that
directory.

Cray-bug-id: LUS-6574
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I053ca0f3db3e0967799f469feeb4f1f12b144be7
Reviewed-on: https://review.whamcloud.com/33326
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11418 osd-zfs: call stop_cb if transaction start fail 48/33248/4
Lai Siyao [Thu, 30 Aug 2018 06:11:42 +0000 (14:11 +0800)]
LU-11418 osd-zfs: call stop_cb if transaction start fail

osd_trans_stop() should call osd_trans_stop_cb() if transaction is
not successfully started.

Improve debug messages for distribute transaction.

Add sanity 416 for this.

Get rid of ot_write_commit which is useless.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I35da81ebd2c9e97c12ae52bd4faed60393cd67d6
Reviewed-on: https://review.whamcloud.com/33248
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11429 mdt: rename mdt_remote_permission 47/33247/2
Andreas Dilger [Thu, 27 Sep 2018 11:41:01 +0000 (13:41 +0200)]
LU-11429 mdt: rename mdt_remote_permission

Rename mdt_remote_permission() to mdt_remote_dir_permission() and
mdt_remote_permission_check() to mdt_remote_dir_permission_check()
to match the "mdt_remote_dir" and "mdt_remote_dir_gid" proc tunable
names.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3336260b3fdc0a1ab3b12a7e2c4722c7a63ebbe5
Reviewed-on: https://review.whamcloud.com/33247
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11417 llapi: add llapi_layout_get_by_xattr(3) API 30/33230/2
Andreas Dilger [Tue, 25 Sep 2018 10:17:46 +0000 (12:17 +0200)]
LU-11417 llapi: add llapi_layout_get_by_xattr(3) API

Add new llapi_layout_get_by_xattr(3) interface to be able to extract
a layout structure from a LOV EA xattr.  This can be useful when the
xattr is retrieved from some external source (e.g. tarball, HSM, or
tools that directly access the underlying ldiskfs or ZFS filesystem).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9b405bf6b3119e44097f36d49ac5859ff93ebbe5
Reviewed-on: https://review.whamcloud.com/33230
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11282 tests: log skip message for sanityn test_19 14/33214/2
Andreas Dilger [Fri, 21 Sep 2018 21:20:17 +0000 (15:20 -0600)]
LU-11282 tests: log skip message for sanityn test_19

Log the skip message for sanityn test_19() rather than just echoing it
and returning success.  The current behaviour makes it difficult to
see if this test is being run or not.

Test-Parameters: trivial testlist=sanityn
Test-Parameters: testlist=sanityn mdtfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I05e2a9ef7c9fc5fb1be6533eab8bcb885f54ca6c
Reviewed-on: https://review.whamcloud.com/33214
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11010 tests: remove calls to return after skip() 33/32733/7
James Nunez [Tue, 26 Jun 2018 22:45:04 +0000 (16:45 -0600)]
LU-11010 tests: remove calls to return after skip()

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

This is the fourth patch in a series that removes calls
to return after skip() in the Lustre test suites.

Calls to return after skip() are removed for:
mmp.sh
ost-pools.sh
parallel-scale-cifs.sh
parallel-scale-nfs.sh
posix.sh

Test-Parameters: trivial testlist=mmp
Test-Parameters: ostcount=1 osscount=1 testlist=ost-pools
Test-Parameters: mdtfilesystemtype=zfs testlist=posix,mmp
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ib6e4c81069b142652a0c50c339683dca21f03199
Reviewed-on: https://review.whamcloud.com/32733
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11392 tests: check race for llog_process_thread 92/33192/3
Alexander Boyko [Tue, 18 Sep 2018 12:58:41 +0000 (08:58 -0400)]
LU-11392 tests: check race for llog_process_thread

The patch adds 10h test at llog_test which runs at 60a sanity.
It reproduces a race between llog_process_thread and llog_add.
The llog should be wrapped so it has old data on disk and zero at
bitmap.
1. llog_process_thread reads part of llog at buffer.
1. process a last record, checks the next record fields
2. llog_add adds a record and marks new record at bitmap
1. check bitmap flag and process the old record from buffer

Test-Parameters: testlist=sanity envdefinitions=ONLY=60a
Cray-bug-id: LUS-6287
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Ic89c81dd918d856f441df4d3257377e09b91a8cc
Reviewed-on: https://review.whamcloud.com/33192
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11193 llog: Do not write to read-only devices 57/33157/4
Nathaniel Clark [Thu, 13 Sep 2018 17:41:09 +0000 (13:41 -0400)]
LU-11193 llog: Do not write to read-only devices

Check if device is read-only before trying to start a transaction
on a devices.  Lustre snapshots are generally read-only.

When underlying device is read-only we check in the following places:
* llog_destroy, llog_write - return EROFS
* llog_open_create - on the create sized we return EROFS
* llog_cancel_rec - we return 0 which means success where 1 means
"success & log destroyed"

Test-Parameters: trivial testlist=sanity-lsnapshot mdtcount=4 mdscount=2 ostfilesystemtype=zfs mdtfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: Ia0083c57ceb589698b1422fec57e75aa6e68948a
Reviewed-on: https://review.whamcloud.com/33157
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
20 months agoLU-11440 doc: recommend e2fsprogs 1.44.3.wc1 70/33370/2
Li Dongyang [Mon, 15 Oct 2018 00:07:03 +0000 (11:07 +1100)]
LU-11440 doc: recommend e2fsprogs 1.44.3.wc1

Update the recommended e2fsprogs version to 1.44.3.wc1

Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I164f7c12ed718f1939d6fc392eb7bb7f9286f053
Reviewed-on: https://review.whamcloud.com/33370
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
20 months agoLU-11524 tests: fix sanity-sec test_31 for all situations 80/33380/5
Sebastien Buisson [Tue, 16 Oct 2018 12:52:46 +0000 (21:52 +0900)]
LU-11524 tests: fix sanity-sec test_31 for all situations

In case setupall() is called with server_only, this info must be
passed to init_param_vars(), and init_param_vars() must return
immediately. Otherwise, it will try to do client-specific tunings
(including quota settings) whereas no clients are mounted.

Modify cleanup_31() in sanity-sec so that client-specific
tunings are done via setupall().
Also make client umount more robust in test_31.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I2db17c139768d0842ff65ac8313a8e7d1484c4ef
Reviewed-on: https://review.whamcloud.com/33380
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
20 months agoLU-11329 utils: create tests maintainers list 60/33360/2
James Nunez [Fri, 12 Oct 2018 20:21:43 +0000 (14:21 -0600)]
LU-11329 utils: create tests maintainers list

Add the subsystem lustre/tests to the existing Lustre
subsystems in the Maintainers List and add myslef as a
maintainer.

Test-Parameters: trivial
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: Ic78dbd151d9cdf73fe32299da048bb103ed7592f
Reviewed-on: https://review.whamcloud.com/33360
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
21 months agoLU-11276 ldlm: don't apply ELC to converting and DOM locks 25/33125/5
Mikhail Pershin [Fri, 7 Sep 2018 10:23:48 +0000 (18:23 +0800)]
LU-11276 ldlm: don't apply ELC to converting and DOM locks

Prevent ELC for locks being converted and for locks
having DOM bit set to avoid data flush without need.

Test-Parameters: testlist=racer,racer,racer
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Id1429412f2ccd77f037bef2a851d22874a44dce6
Reviewed-on: https://review.whamcloud.com/33125
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11347 osd: do not use pagecache for I/O 75/32875/13
Alex Zhuravlev [Wed, 25 Jul 2018 10:24:27 +0000 (14:24 +0400)]
LU-11347 osd: do not use pagecache for I/O

for testing purposes cache is constantly disabled.

 - with non-rotational storage
 - when both read and write caches are disable
 - sanityn/16c to run fsx with cache disable

Change-Id: If6ea9186485cd0aceb0372b68f4860de3a4fb124
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32875
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11199 mdt: Attempt lookup lock on open 29/32929/5
Patrick Farrell [Tue, 28 Aug 2018 14:28:29 +0000 (09:28 -0500)]
LU-11199 mdt: Attempt lookup lock on open

Commit 4f50273a (LU-10269 ldlm: fix the issues introduced
by try bits) changed the locking behavior on open to not
attempt to grant the LOOKUP lock bit.  This causes a
performance regression in open(), which is up to 75% in
some benchmarks, such as mdsrate (from lustre/tests/mpi):

First create the files:
mpirun -n 4 /usr/lib64/lustre/tests/mdsrate /
-d /mnt/lustre/mdsrate --create --nfile=30000

Then drop caches:
echo 3 > /proc/sys/vm/drop_caches

Then run the open benchmark:
mpirun -n 4 /usr/lib64/lustre/tests/mdsrate /
-d /mnt/lustre/mdsrate --open --iters 8000 --nfile=30000
[More details in LU-1199]

This patch reverts that specific part of 4f50273a, which
restores open() performance to prior levels.

It may not be 100% correct to ask for open only when
also asking for layout, but this is the earlier behavior.

There is a further patch in flight to optimize this
code:
https://review.whamcloud.com/32156

And further changes are left for that patch.

Cray-bug-id: LUS-6358

Change-Id: Iceca88807e99955f28eba6bbcb3585964f7df2f4
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/32929
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11473 doc: add lfs-getsom man page 90/33290/2
James Nunez [Thu, 4 Oct 2018 21:32:42 +0000 (15:32 -0600)]
LU-11473 doc: add lfs-getsom man page

The Lazy Size on MDT feature added a flag to 'lfs' to allow
users to get the LSOM data. Add the lfs "getsom" flag to the
lfs man page.

Also, make a minor correction to the llsom_sync man page that
corrects the order of the --device flag for changelog_register
and changelog_deregister.

Test-Parameters: trivial
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I9a5acab6de3b7f32eb246c94e9975e30f63f10e1
Reviewed-on: https://review.whamcloud.com/33290
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-1095 misc: quiet console messages at startup 81/33281/2
Andreas Dilger [Wed, 3 Oct 2018 23:16:23 +0000 (17:16 -0600)]
LU-1095 misc: quiet console messages at startup

Some modules print less-than-useful messages on every load.
Turn these into internal debug messages to reduce noise.

The message in gss_init_svc_upcall() should also be quieted,
but it exposes that this function is waiting 1.5s on each module
load for lsvcgssd to start.  This should be fixed separately.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib51ce0e9a88a94d8d2d5eb0906abef0f544cab07
Reviewed-on: https://review.whamcloud.com/33281
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11454 ptlrpc: Make CPU binding switchable 62/33262/6
Patrick Farrell [Thu, 4 Oct 2018 12:10:11 +0000 (07:10 -0500)]
LU-11454 ptlrpc: Make CPU binding switchable

LU-6325 added CPT binding to the ptlrpc worker threads on
the servers.  This is often desirable, especially where
NUMA latencies are high, but it is not always beneficial.

If NUMA latencies are low, there is little benefit, and
sometimes it can be quite costly:

In particular, if NID-CPT hashing with routers leads to an
unbalanced workload by CPT, it is easy to end up in a
situation where the CPUs in one CPT are maxed out but
others are idle.

To this end, we add module parameters to allow disabling
the strict binding behavior, allowing threads to use all
CPUs.

This is complicated a bit because we still want separate
service partitions - The existing "no affinity" behavior
places all service threads in a single service partition,
which gives only one queue for service wakeups.

So we separate binding behavior from CPT association,
allowing us to keep multiple service partitions where
desired.

Module parameters are added to ldlm, mdt, and ost, of the
form "servicename_cpu_bind", such as "mds_rdpg_cpu_bind".

Setting them to "0" will disable the strict CPU binding
behavior for the threads in that service.

Parameters were not added for certain minor services which
do not have any CPT affinity/binding behavior today.  (This
appears to be because they are not expected to be
performance sensitive.)

cray-bug-id: LUS-6518
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I1f6f9bb7a11da3a3eec7fc14c41d09ed27700f46
Reviewed-on: https://review.whamcloud.com/33262
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11448 kernel: kernel update RHEL7.5 [3.10.0-862.14.4.el7] 54/33254/5
Jian Yu [Sat, 6 Oct 2018 06:35:45 +0000 (23:35 -0700)]
LU-11448 kernel: kernel update RHEL7.5 [3.10.0-862.14.4.el7]

Update RHEL7.5 kernel to 3.10.0-862.14.4.el7.

Change-Id: I4901102347a14d23645547efc84857868acec0f7
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33254
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11369 hsm: allow non-owner writers to set HSM state dirty 58/33158/2
John L. Hammond [Thu, 13 Sep 2018 17:52:45 +0000 (12:52 -0500)]
LU-11369 hsm: allow non-owner writers to set HSM state dirty

In mdt_add_dirty_flag(), bump up the capability so that
mdt_hsm_attr_set() will succeed even if the writer (or truncater) is
not the owner of the file.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ibd7e9e039c3a984642b4a01c63cd11d2029e93f1
Reviewed-on: https://review.whamcloud.com/33158
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-8066 llite: make llite/lov and lmv symlinks 16/32516/4
James Simmons [Mon, 8 Oct 2018 15:17:55 +0000 (11:17 -0400)]
LU-8066 llite: make llite/lov and lmv symlinks

old proc code had /proc/sys/fs/lustre/llite/.../lov and lmv
dirs that contained name of the dir in lustre/lov and lustre/lmv
to better be able to find correct obd device there, but
I imagine a better solution would be to just create a symlink with
the same name. The name is then pointless and the target dir would
have uuid file just as if it was the old-style dir.

This is a modified version of

Linux-commit : d8ede3f1d5d94618442a61067c6b98a2afbb0962

Change-Id: I90bc1b75e07f0aaa4c3119671f6d097b0e7353b3
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32516
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-8324 hsm: prioritize one RESTORE once in a while 23/31723/14
Quentin Bouget [Fri, 4 May 2018 12:53:12 +0000 (14:53 +0200)]
LU-8324 hsm: prioritize one RESTORE once in a while

Currently, HSM requests are run in the order they are submitted to
the coordinator. This has the undesirable side effect that the more
interactive requests (RESTORE / REMOVE) can take quite a while to be
run when a huge batch of ARCHIVE requests are already queued.

This patch is not a clean fix to LU-8324, it is merely an attempt at
making things bearable while a proper solution is being developped.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I8697ffae19b28f31901d9e61cce55b40f848fb51
Reviewed-on: https://review.whamcloud.com/31723
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-8950 tests: do not use make_custom_file_for_progress() 94/24394/17
Quentin Bouget [Wed, 20 Dec 2017 15:12:36 +0000 (15:12 +0000)]
LU-8950 tests: do not use make_custom_file_for_progress()

Do not use make_custom_file_for_progress() in sanity-hsm in tests:
12c, 26, 27b, 28, 31b, 31c, 33, 34, 35, 36, 54, 55, 56, 60, 62, 71,
104, 200, 202, 221, 223b, 225, 251, 252, 407

Before this patch make_custom_file_for_progress() was used to create
big files (5MB to 40 MB). There were several use cases for that:
 - in combination with the --bandwidth option of lhsmtool_posix, it
   allows synchronizing HSM operations and other things;
 - to log enough "progress events", HSM operations need to last long
   enough (the --bandwidth option comes in handy too).

It needed to be removed because:
 - archiving and restoring big files at a 1MB/s rate takes too much
   time (admittedly, that was the point);
 - there are other way to have HSM operations occur concurently. For
   example: suspending copytools to delay request processing.
 - make_custom_file_for_progress() does not correctly reflect what
   the function does and should be used for. Wherever big file are
   still needed, the patch uses create_file() instead.

Removing the need to archive or restore big files at a limited rate
represents quite a speed-up on sanity-hsm.

Test-Parameters: trivial testlist=sanity-hsm,sanity-hsm
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: Ib9eb7599f9e16d8790630c69c9d1c7be3df416a1
Reviewed-on: https://review.whamcloud.com/24394
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jean-Baptiste Riaux <riaux.jb@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-1757 osc: clarify short_io_bytes is maximum value 73/33173/3
Andreas Dilger [Sat, 15 Sep 2018 18:39:07 +0000 (12:39 -0600)]
LU-1757 osc: clarify short_io_bytes is maximum value

Clarify in the code that the "osc.*.short_io_bytes" parameter is
the maximum IO size to pack into request/reply not the minimum.

Allow short_io to be disabled completely if it is set to zero.

It would be nice to also change the name of the /proc functions
in a similar manner but that also changes the /proc tunable name
(via LUSTRE_RW_ATTR() macro) and has compatibility implications
for sites that may have changed this value.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3a91420d7e0405445558ba9203233d7f977cab07
Reviewed-on: https://review.whamcloud.com/33173
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11057 tests: exercise 'network' client mount option 89/33189/10
Sebastien Buisson [Tue, 18 Sep 2018 09:59:32 +0000 (18:59 +0900)]
LU-11057 tests: exercise 'network' client mount option

Test 'network' client mount option that enables to limit connections
from the client to be on the specified network NID.

This option is currently not compatible with Dynamic Peer Discovery.
test_31 will have to be updated once Dynamic Peer Discovery is
modified so that it does not conflict with 'network' client mount
option.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I13f016fad52a7b73524f652b369c6434985fc0c6
Reviewed-on: https://review.whamcloud.com/33189
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11196 tests: clean up after conf-sanity test_101 68/33268/4
Andreas Dilger [Tue, 2 Oct 2018 20:27:09 +0000 (14:27 -0600)]
LU-11196 tests: clean up after conf-sanity test_101

conf-sanity test_101() creates up to 50000 files in the top-level
test directory, which can sometimes cause the later test_103() setup
to fail, because "rm -rf" fails with "Argument list too long" when
trying to clean up the test directory.

Create the test_101 files in a subdirectory for cleanliness, and
remove them at the end of the test so that we don't run out of space.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1167339d03340e1cc545d2855c4b32eef18cab07
Reviewed-on: https://review.whamcloud.com/33268
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11511 fix build breakage with LMV_HASH_FLAG_DEAD undeclared 56/33356/2
Oleg Drokin [Fri, 12 Oct 2018 03:56:52 +0000 (23:56 -0400)]
LU-11511 fix build breakage with LMV_HASH_FLAG_DEAD undeclared

It was being deprecated with 2.11.56, but actually 2.8 was waaay too
recent to kill it like that, let's postpone this until 2.12.53 for now
and definitely let's fix it by then.

Change-Id: Ibfc2cd858803e7802536041775fb09ae6960f211
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33356
Tested-by: Jenkins
21 months agoNew tag 2.11.56 2.11.56 v2_11_56 v2_11_56_0
Oleg Drokin [Thu, 11 Oct 2018 18:42:45 +0000 (14:42 -0400)]
New tag 2.11.56

Change-Id: I9e75c41c31acdaddffef64eee83d68523ebbd3d2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
21 months agoRevert "LU-11058 test: reenable sanity 77k test" 54/33354/2
Oleg Drokin [Thu, 11 Oct 2018 18:41:54 +0000 (18:41 +0000)]
Revert "LU-11058 test: reenable sanity 77k test"

I guess we spoke too soon and there's now again a bunch of
failures tracked under LU-11058 for this test.

This reverts commit fb1875c314cf3650aa7ba6b2cdb72ef18e812d5f.

Change-Id: I1d17f4b7457f8a057279e58114f93a4affbf115c
Reviewed-on: https://review.whamcloud.com/33354
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11422 lnet: Fix selftest backward compatibility post health 42/33242/8
Sonia Sharma [Sun, 23 Sep 2018 16:15:31 +0000 (12:15 -0400)]
LU-11422 lnet: Fix selftest backward compatibility post health

Post LNet health feature landing, lnet-selftest loses
backward compatibility. This patch fixes that by
adding a new structure lnet_counters_common similar
to lnet_counters(pre-Health version). Now,
lnet_counters_common is the struct that selftest depends on.

Also, adds a struct lnet_counters_health specifically
for health stats.

Change-Id: Ia066ff7b3522738080d192e80c14cf5ac55a33e2
Test-Parameters: trivial testlist=lnet-selftest clientjob=lustre-b2_10 clientbuildno=136
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33242
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Jenkins
Tested-by: Andreas Dilger <adilger@whamcloud.com>
21 months agoLU-11388 test: disable replay-single test_131b 79/33279/2
Mikhail Pershin [Wed, 3 Oct 2018 18:58:37 +0000 (21:58 +0300)]
LU-11388 test: disable replay-single test_131b

Add test to ALWAYS_EXCEPT list for now due to LU-11388
problem. Change also 'bs' and 'count' in test to have
only one RPC being sent.

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I76fb56896d53674c7eb9456a8bcbb1b2a23629c7
Reviewed-on: https://review.whamcloud.com/33279
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11375 mdc: use old statfs format 62/33162/7
Alex Zhuravlev [Thu, 13 Sep 2018 18:07:08 +0000 (21:07 +0300)]
LU-11375 mdc: use old statfs format

when the client talks to old server with no support
for aggregated statfs

Test-Parameters: clientjob=lustre-b2_10 clientbuildno=136 testgroup=review-ldiskfs

Change-Id: I447b312d46db56da152f62835b3f98401f997cf0
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33162
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
21 months agoLU-6142 osd-ldiskfs: Fix style issues for osd_iam_lvar.c 50/32850/3
Arshad Hussain [Sat, 21 Jul 2018 23:41:59 +0000 (05:11 +0530)]
LU-6142 osd-ldiskfs: Fix style issues for osd_iam_lvar.c

This patch fixes issues reported by checkpatch
for file lustre/osd-ldiskfs/osd_iam_lvar.c

Change-Id: I11d4836e869314accc1123f2167db556f82e823f
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/32850
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-7004 tests: move from lctl conf_param to lctl set_param -P 87/30087/24
James Simmons [Thu, 20 Sep 2018 18:32:11 +0000 (14:32 -0400)]
LU-7004 tests: move from lctl conf_param to lctl set_param -P

To ensure that the work to make lctl set_param -P functional
we need to provide a way to test either lctl conf_param or
lctl set_param -P in the test suite.

Change-Id: I2f58a9b5262eed03ddc3a2ff15ac96b752d97735
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/30087
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-6202 libcfs: replace libcfs_register_ioctl with a blocking notifier_chain 84/33284/4
NeilBrown [Fri, 5 Oct 2018 13:02:41 +0000 (09:02 -0400)]
LU-6202 libcfs: replace libcfs_register_ioctl with a blocking notifier_chain

libcfs allows other modules to register handlers for ioctls.
The implementation it uses for this is nearly identical to a
blocking notifier chain, so change to use that.

The biggest difference is that the return value from notifier has a
defined format, where libcfs_register_ioctl uses -EINVAL to mean
"continue".  This requires a little bit of conversion.

Linux-commit: 912a846027c203370f4837a2b2db7ba2ebe1b47c

Change-Id: I84657fc1befd004eb09de37b5549af8bff034738
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33284
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11441 obdclass: make mod rpc slot wait queue FIFO 82/33282/3
Vladimir Saveliev [Thu, 4 Oct 2018 11:50:56 +0000 (14:50 +0300)]
LU-11441 obdclass: make mod rpc slot wait queue FIFO

Relatively big load may cause a process to spin for a long time
without successful grabbing a free mod rpc slot. It has been observed
a process spinning more than 100 seconds when there were 72 mdtest-s
and 8 IOR-s.

Make mod rpc slot wait queue to run FIFO so that waiting thread got
free mod rpc slot in order they entered the queue.

Cray-bug-id: LUS-6380
Change-Id: I4ef2cf529cf1bb4c8500d7a2b181a05ca080223e
Signed-off-by: Alexander Zarochentsev <c17826@cray.com>
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-on: https://review.whamcloud.com/33282
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-930 doc: update data_version command in lfs man page 78/33278/2
Nikitas Angelinas [Wed, 3 Oct 2018 18:14:14 +0000 (11:14 -0700)]
LU-930 doc: update data_version command in lfs man page

Update the lfs man page to document the [rw] options of the
data_version command, and list some of the command use cases.

Signed-off-by: Nikitas Angelinas <nangelinas@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Cray-bug-id: LUS-5890
Test-Parameters: trivial
Change-Id: I2522de9f9a987f5c085d370f6dafc0df4080f5fa
Reviewed-on: https://review.whamcloud.com/33278
Tested-by: Jenkins
Reviewed-by: Joseph Gmitter <jgmitter@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11451 utils: fix to dump usage messages to stdout 56/33256/2
Wang Shilong [Sun, 30 Sep 2018 05:48:26 +0000 (13:48 +0800)]
LU-11451 utils: fix to dump usage messages to stdout

-h option output should be expected to stdout, rather
than stderr.

Test-parameters: trivial
Change-Id: I6209327a926c4482eb8b9174bb44aa2c5ba76c2d
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/33256
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
21 months agoLU-11370 lnet: cleanup ni_cptlist 55/33155/2
Sonia Sharma [Fri, 31 Aug 2018 08:14:50 +0000 (04:14 -0400)]
LU-11370 lnet: cleanup ni_cptlist

With the changes added for the multi-rail feature,
ni_cptlist related code was removed from
lnet_startup_lndni() and other places. It lurked
behind at few places, cleaning up from there with
this patch

Change-Id: Ied557802df4feb869cea57cb7f44724a550b1ec1
Test-Parameters: trivial
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33155
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11364 osd: remove unused 'ignore quota' parameters 38/33138/3
John L. Hammond [Tue, 11 Sep 2018 16:17:47 +0000 (11:17 -0500)]
LU-11364 osd: remove unused 'ignore quota' parameters

Remove the unused 'ignore quota' parameters from dt_write(),
dt_insert(), and their implementations.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib6e61c5dff8c2b1027ed3a7e0808fe208fd17d84
Reviewed-on: https://review.whamcloud.com/33138
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11058 test: reenable sanity 77k test 99/33099/4
James Simmons [Thu, 4 Oct 2018 18:07:57 +0000 (14:07 -0400)]
LU-11058 test: reenable sanity 77k test

Reenable sanity 77k test because test_77k was fixed via patch
https://review.whamcloud.com/33190 commit bda43cbe36

Test-Parameters:trivial testlist=sanity envdefinitions=ONLY=77k

Change-Id: I01b8c2f2b81bcb4a0de71fa73e71fa32e7f9dc61
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33099
Tested-by: Jenkins
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-10595 mgc: don't proccess cld during stopping 90/33190/2
Alexander Boyko [Tue, 18 Sep 2018 12:21:52 +0000 (08:21 -0400)]
LU-10595 mgc: don't proccess cld during stopping

The patch fixes the log processing during stopping. It was general
protection fault at mgc_process_cfg_log() at lsi access. Lsi pointer
was wrong 38323172756f6663, and all cld->cld_cfg.cfg_sb had invalid
data.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-6199
Change-Id: Ie4f35ba5be707ab8d274cc26fd2c230ffcb0a16e
Reviewed-on: https://review.whamcloud.com/33190
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-8066 llite: move remaining single item proc files to sysfs 15/32515/4
James Simmons [Wed, 23 May 2018 15:22:11 +0000 (11:22 -0400)]
LU-8066 llite: move remaining single item proc files to sysfs

Remove the remaining single item proc files for llite that are
not present in the linux client to sysfs.

Change-Id: Ic7c8d61a0798e8f2385d878a398f29e8b231c6fe
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32515
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
21 months agoLU-11287 ldlm: update l_blocking_lock under lock 24/33124/6
Mikhail Pershin [Fri, 7 Sep 2018 10:34:46 +0000 (18:34 +0800)]
LU-11287 ldlm: update l_blocking_lock under lock

Update l_blocking_lock under with locking to prevent race
between lock_handle_convert0() and ldlm_work_bl_ast() code.

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I881a1daf6f3b09677abcd6a85f6891d409926cc8
Reviewed-on: https://review.whamcloud.com/33124
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-6142 obdclass: Fix style issues for obd_sysfs.c 83/32983/2
Arshad Hussain [Sun, 12 Aug 2018 05:44:27 +0000 (11:14 +0530)]
LU-6142 obdclass: Fix style issues for obd_sysfs.c

This patch fixes issues reported by checkpatch
for file lustre/obdclass//obd_sysfs.c

Change-Id: I77fd2279a2f53ee18557eda3f92bca8286db3ce7
Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-on: https://review.whamcloud.com/32983
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
21 months agoLU-8066 llite: change how "dump_page_cache" walks a hash table 11/33011/3
NeilBrown [Mon, 17 Sep 2018 17:44:56 +0000 (13:44 -0400)]
LU-8066 llite: change how "dump_page_cache" walks a hash table

The "dump_page_cache" seq_file currently tries to encode
a location in the hash table into a 64bit file index so that
the seq_file can seek to any location.

This is not necessary with the current implementation of seq_file.
seq_file performs any seeks needed itself by rewinding and calling
->next and ->show until the required index is reached.

The required behaviour of ->next is that it always returns the next
object after the last one returned by either ->start or ->next.
It can ignore the ppos, but should increment it.

The required behaviour of ->start is one of:
1/ if *ppos is 0, then return the first object
2/ if *ppos is the same value that was passed to the most recent call
   to either ->start or ->next, then return the same object again
3/ if *ppos is anything else, return the next object after the most
   recently returned one.

To implement this we store a vvp_pgcache_id (index into hash table)
in the seq_private data structure, and also store 'prev_pos' as the
last value passed to either ->start or ->next.

We remove all converstion of an id to a pos, and any limits on the
size of the vpi_depth.

vvp_pgcache_obj_get() is changed to ignore dying objects so that
vvp_pgcache_obj only returns NULL when it reaches the end of a hash
chain, and so vpi_bucket needs to be incremented.

A reference to the current ->clob pointer is now kept as long as we
are iterating over the pages in a given object, so we don't have to
try to find it again (and possibly fail) for each page.

And the ->start and ->next functions are changed as described above.

Test-Parameters: trivial envdefinitions="ONLY=63b" testlist=sanity
Test-Parameters: trivial envdefinitions="ONLY=118" testlist=sanity
Test-Parameters: trivial envdefinitions="ONLY=20" testlist=sanityn

Change-Id: I2c6d2be47f809cb4a944aa3de6f561ce4f08bbf4
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33011
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11455 build: Remove conflicting lustre and Lustre 65/33265/2
Nathaniel Clark [Tue, 2 Oct 2018 12:08:56 +0000 (08:08 -0400)]
LU-11455 build: Remove conflicting lustre and Lustre

Some systems (Mac) are still case insensivite under some conditions,
so having lustre and Lustre in the same directory causes problems.
Seperate all the resource agents into their own directory.

Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: I6df370744ffecec9b9e52ffa9f131f02f351f6c5
Reviewed-on: https://review.whamcloud.com/33265
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
21 months agoLU-11412 kernel: kernel update [SLES12 SP3 4.4.155-94.50] 36/33236/3
Jian Yu [Thu, 27 Sep 2018 17:07:21 +0000 (10:07 -0700)]
LU-11412 kernel: kernel update [SLES12 SP3 4.4.155-94.50]

Update SLES12 SP3 kernel to 4.4.155-94.50.

Test-Parameters: envdefinitions=CONF_SANITY_EXCEPT=103 \
mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs \
clientdistro=sles12sp3 ossdistro=sles12sp3 mdsdistro=sles12sp3 \
testlist=sanity,conf-sanity,sanity-sec

Change-Id: I47b72420664fe614a2da7c864c401a9729d96c55
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33236
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11368 build: link the shared libraries properly 46/33146/2
Li Dongyang [Wed, 12 Sep 2018 12:13:02 +0000 (22:13 +1000)]
LU-11368 build: link the shared libraries properly

Make sure the -l options come after the objects.
Otherwise on distros(e.g. ubuntu18) use --as-needed
by default, we won't actully link against those libs.

Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: If828fc409a54e48e0818f8a11087c266d46652c1
Reviewed-on: https://review.whamcloud.com/33146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-9966 tests: sanity-411 check LBUG direct 93/32293/6
Yang Sheng [Fri, 4 May 2018 10:20:49 +0000 (18:20 +0800)]
LU-9966 tests: sanity-411 check LBUG direct

The sanity test_411 intends to catch LBUG while IO
under memory pressure. It assumes that 'dd' would
fail because memory alloction failure. But it is
not ture since RHEL7 has some problem in memory
accounting. So we can ignore the 'dd' status.

Test-Parameters: trivial

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ie9af0fe68c85a9e2af4da6b49d0a697d00f3761b
Reviewed-on: https://review.whamcloud.com/32293
Tested-by: Jenkins
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
21 months agoLU-10772 utils: incorrect check in build_layout_from_yaml_node 37/31537/3
Sonia Sharma [Tue, 6 Mar 2018 08:39:27 +0000 (00:39 -0800)]
LU-10772 utils: incorrect check in build_layout_from_yaml_node

In lustre/utils/lfs.c, build_layout_from_yaml_node(),
check and fail for NULL pointer 'string' before
dereferencing it.

Issue found in Static analysis.

Change-Id: I272432d3997f3bfae520ff3aa48d175309ccd386
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-on: https://review.whamcloud.com/31537
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11424 lnet: copy the correct amount of cpts to lnet_cpts 29/33229/2
James Simmons [Tue, 25 Sep 2018 03:28:57 +0000 (23:28 -0400)]
LU-11424 lnet: copy the correct amount of cpts to lnet_cpts

The incorrect size was used in the memory copy of the requested
cpts to net->lnet_cpts. This lead to the following in testing
RIP: 0010:lnet_match2mt.isra.8+0x2b/0x40 [lnet]

lnet_mt_of_attach+0x72/0x1b0 [lnet]
LNetMEAttach+0x60/0x1f0 [lnet]
ptl_send_rpc+0x26f/0xbb0 [ptlrpc]
libcfs_debug_msg+0x57/0x80 [libcfs]
ptlrpc_send_new_req+0x4c9/0x860 [ptlrpc]
ptlrpc_check_set.part.21+0x855/0x18b0 [ptlrpc]
? try_to_del_timer_sync+0x4d/0x80
? del_timer_sync+0x35/0x40
ptlrpcd_check+0x3ae/0x3f0 [ptlrpc]
ptlrpcd+0x2be/0x320 [ptlrpc]
? wait_woken+0x80/0x80

Changing the size from ncpts to ncpts * sizeof(*net->net_cpts)

Change-Id: I10832430e53ccc5b40ebce3ddfd2cf9ea330b0df
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33229
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Jenkins
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
21 months agoLU-11187 ldiskfs: don't mark mmp buffer head dirty 38/33038/10
Li Dongyang [Tue, 21 Aug 2018 00:10:45 +0000 (10:10 +1000)]
LU-11187 ldiskfs: don't mark mmp buffer head dirty

Marking mmp bh dirty before writing it will make writeback
pick up mmp block later and submit a write, we don't want the
duplicate write as kmmpd thread should have full control of
reading and writing the mmp block.
Another reason is we will also have random I/O error on
the writeback request when blk integrity is enabled, because
kmmpd could modify the content of the mmp block(e.g. setting
new seq and time) while the mmp block is under I/O requested
by writeback.

Linux-commit: fe18d649891d813964d3aaeebad873f281627fbc

Test-Parameters: testgroup=review-ldiskfs testlist=mmp
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: I5aa9fd384a4ea25ee52f1198528fae4ecc9c28c7
Reviewed-on: https://review.whamcloud.com/33038
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>