Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-10735 kernel: kernel update [SLES12 SP2 4.4.114-92.67] 54/31454/2
Bob Glossman [Tue, 27 Feb 2018 22:05:00 +0000 (14:05 -0800)]
LU-10735 kernel: kernel update [SLES12 SP2 4.4.114-92.67]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ib3714f089b1145e380bbff50c75234a50729f1ac
Reviewed-on: https://review.whamcloud.com/31454
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10731 kernel: kernel update [SLES12 SP3 4.4.114-94.14] 52/31452/2
Bob Glossman [Tue, 27 Feb 2018 17:22:55 +0000 (09:22 -0800)]
LU-10731 kernel: kernel update [SLES12 SP3 4.4.114-94.14]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Id4be7ff0fb1606283b5e3b4eed7dcf69e6b4f4bf
Reviewed-on: https://review.whamcloud.com/31452
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10663 utils: clear errno before check 30/31430/2
John L. Hammond [Wed, 14 Feb 2018 18:27:54 +0000 (12:27 -0600)]
LU-10663 utils: clear errno before check

In jt_obd_destroy() clear errno before calling strtoull() and checking
it.

Test-Parameters: testlist=obdfilter-survey

Lustre-change: https://review.whamcloud.com/#/c/31305/
Lustre-commit: 9e488fe9413184e61dcf405c9c87ca348dd6824a

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I686cd6eb0a57248177e5b0878df5e3f450fbc942
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31430
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-6051 utils: Remove incorrect request for getstripe help 00/30800/3
Steve Guminski [Fri, 18 Aug 2017 12:37:29 +0000 (08:37 -0400)]
LU-6051 utils: Remove incorrect request for getstripe help

The option flag for stripe-size in the getstripe command was changed
in Lustre 1.8.  To detect the correct flag to use, the help was
parsed.  However, the help was incorrectly invoked by using the
"--help" option, instead of the correct "lfs help getstripe".
Since interoperability with 1.8 is no longer needed, the incorrect
code is removed and the correct flag is hard-coded.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/28597
Lustre-commit: ad45173d94e0be94de90368019be52a905bcb993

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I29ae644c7d6b2ed247573d83c943cb556cfb6325
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30800
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9135 osp: do not fail if last_rcvd update failed 13/31013/2
Alex Zhuravlev [Thu, 16 Nov 2017 12:43:32 +0000 (15:43 +0300)]
LU-9135 osp: do not fail if last_rcvd update failed

just ignore an error in this case and hope the next time
OST will be able to serve well and OSP cancel the record.

Lustre-change: https://review.whamcloud.com/30129
Lustre-commit: d764d538d601fa7e980a32a02899f9c32772844c

Change-Id: Ib1bbe77132e81322f353909620b6a413981ae342
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31013
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10316 tests: skip checksum check for sanity 77c 53/30653/4
James Nunez [Wed, 6 Dec 2017 00:17:16 +0000 (17:17 -0700)]
LU-10316 tests: skip checksum check for sanity 77c

sanity test 77c does not need to verify the checksum for
some versions of Lustre servers. The code to skip the
checksum verification is in place, but it is missing a
'retun 0;' to exit the test.

This is a port from master to b2_10 of
Lustre change: https://review.whamcloud.com/#/c/30402/
Lustre commit: 1332698e39723ce5684f062ed969efdcf2d01536

Test-Parameters: trivial

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I9ea19f699d1142475f84d59b9c31880b7daf7f52
Reviewed-on: https://review.whamcloud.com/30653
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
6 years agoLU-5024 mdc: don't assert on name pack 55/30355/2
Lai Siyao [Fri, 22 Sep 2017 02:42:07 +0000 (10:42 +0800)]
LU-5024 mdc: don't assert on name pack

For old version of MDTs which don't support ATTRFID, open will pack
dentry name in the request, but this name may change if there is
concurrent rename, as a result an assertion will be triggerred.

It's inconvenient to copy name in advance or take dentry lock in the
call chain, so It's better to remove this assert, which is safe.

Lustre-change: https://review.whamcloud.com/29161
Lustre-commit: dd9d7cc845dfd2853498091573b7e13a0a35c161

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I58d8b8fbbd8057aa2e8618e8923d0432f31dac96
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30355
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10052 test: relate fs_log_size to recordsize 46/31146/2
Hongchao Zhang [Thu, 18 Jan 2018 08:58:42 +0000 (16:58 +0800)]
LU-10052 test: relate fs_log_size to recordsize

If the backend filesystem is ZFS, the block usage difference is
related to the recordsize of it, the maximum difference are 2 blocks.
This affects several different tests that have intermittent failures.

    replay-dual test_14b, replay-single test_20b, test_89

Lustre-change: https://review.whamcloud.com/30916
Lustre-commit: 804ea3abc4265c035d2b3941400c842e6d6fdb96

Change-Id: I36b184587306bd2b9221e5771bf1adfe071653ca
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10052 tests: wait for OST objects to be deleted 45/31145/2
Hongchao Zhang [Mon, 4 Dec 2017 19:47:30 +0000 (03:47 +0800)]
LU-10052 tests: wait for OST objects to be deleted

In test_20b of replay-single, the used space difference after
the file creation and deletion shows that a block is not freed,
wait for OST objects to be destroyed after recovery is done.

Test-Parameters: trivial testlist=replay-single.sh ostfilesystemtype=zfs mdtfilesystemtype=zfs

Lustre-change: https://review.whamcloud.com/30678
Lustre-commit: 1eae3bfd5de6eecbe70d24681890ad070e8446f8

Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Change-Id: I6311d8b8fa4cea713a9755cfb6a3d63e693c8344
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31145
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9972 osd: cache OI mapping in dt_declare_ref_add 11/31211/4
Alex Zhuravlev [Mon, 23 Oct 2017 16:32:15 +0000 (19:32 +0300)]
LU-9972 osd: cache OI mapping in dt_declare_ref_add

so that subsequent calls to manipulate /PENDING don't need to
consult with OI.
use OIC in osd_index_ea_delete() to optimize FLDB lookups.

Lustre-change: https://review.whamcloud.com/29709
Lustre-commit: b6e718def348c53759a12afee9450207fc7ab56f

Change-Id: I779bbddb429b577aecf1ad092d74d0802e43d567
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31211
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoRevert "LU-7340 mdd: changelogs garbage collection"
John L. Hammond [Mon, 26 Feb 2018 21:31:20 +0000 (15:31 -0600)]
Revert "LU-7340 mdd: changelogs garbage collection"

This introduced MDT instability described in LU-10680.

This reverts commit b87511a0578a03447c51a8495966d60c90fcee61.

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

6 years agoLU-9411 tests: remove spaces around '+=' 12/31112/2
James Nunez [Thu, 4 Jan 2018 21:13:37 +0000 (14:13 -0700)]
LU-9411 tests: remove spaces around '+='

In sanity test 27D, the variable that collects tests to
skip needs to have spaces removed when the variable is
being concatenated with new tests to skip.

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/30725
Lustre-commit: ecc770c3435b8dc277f7b7606e93f22d2c6a6069

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ie57efecd2867b748f56998bc2fc375ea9d566611
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31112
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7746 tests: skip tests for older (upstream) client 11/31111/2
Andreas Dilger [Fri, 25 Aug 2017 19:02:01 +0000 (13:02 -0600)]
LU-7746 tests: skip tests for older (upstream) client

Skip some tests when running newer sanity.sh on an older client.
This typically only happens when testing the upstream client,
since otherwise the tests will always match the client version.

Lustre-change: https://review.whamcloud.com/28718
Lustre-commit: a8d33a29e77e102505ee3916782dc697ad121ff8

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I78e1b0a6ae98879a2039817696c3a0dd15621fcc
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31111
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9833 utils: resolve buffer over runs in lustre_rsync 14/31014/5
James Simmons [Fri, 12 Jan 2018 19:05:52 +0000 (14:05 -0500)]
LU-9833 utils: resolve buffer over runs in lustre_rsync

Newer version of gcc will report of snprintf is used in an
incorrect way. For the case of the lustre_rsync application
many times two buffers of size PATH_MAX are being placed into
one buffer of the size PATH_MAX. This can easily lead to a
buffer overrun. This patch resolves those bugs.

Test-Parameters: trivial testlist=lustre-rsync-test

Lustre-change: https://review.whamcloud.com/30373
Lustre-commit: b9bdd849f076302550221ff195e83e31dd7bddfc

Change-Id: I035b4a3b1d9695a16822649c2165e492e9f2879d
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31014
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10516 doc: recommend e2fsprogs 1.42.13.wc6 67/30967/2
Andreas Dilger [Mon, 15 Jan 2018 23:04:55 +0000 (16:04 -0700)]
LU-10516 doc: recommend e2fsprogs 1.42.13.wc6

Update the recommended e2fsprogs version to 1.42.13.wc6 in
lustre/ChangeLog as this has been released for some time already.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/30871
Lustre-commit: c1c493113b91912d82b8b8f1b184ea8733365216

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id4663e02849675f1c8a4b9c13e191ed9d735ab56
Reviewed-by: Peter Jones <peter.a.jones@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30967
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10392 fid: improve seq allocation error messages 13/30813/3
Emoly Liu [Wed, 20 Dec 2017 09:32:37 +0000 (17:32 +0800)]
LU-10392 fid: improve seq allocation error messages

When MDTs are waiting for MDT0000 to start the master sequence
server and be granted a meta sequence for the first time, in case
of "-EINPROGRESS", the limited console messages would be clearer
and better than many error messages.

Lustre-change: https://review.whamcloud.com/30623
Lustre-commit: 6f86519b3483b4cc754b42bddc98617de14cef2b

Change-Id: I64e80508cf9fb837a328b4f8228f29bfb764845d
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30813
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9145 nodemap: new_init_ucred doesn't do nodemapping 12/30812/3
Kit Westneat [Fri, 14 Apr 2017 15:06:02 +0000 (11:06 -0400)]
LU-9145 nodemap: new_init_ucred doesn't do nodemapping

The new_init_ucred path was missed in the original nodemap
implementation. This patch adds the mapping calls to new_init_ucred.

WIP: There are some issues/questions:
 - some of the new_init_ucred code should be merged with
old_init_ucred_common.
 - Why does new_init check for setuid/setgid/setgrp, but not old_init?
 - What is ptlrpc_user_desc and should it interact with nodemap?

Lustre-change: https://review.whamcloud.com/26624
Lustre-commit: 37db778f48f952747575e323cb341ed663852fff

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: Ia0e07078f32c43ec319be5a4cea753667056d645
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30812
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9594 tests: remove sanity tests from ALWAYS_EXCEPT 10/30810/2
James Nunez [Wed, 25 Oct 2017 14:01:45 +0000 (08:01 -0600)]
LU-9594 tests: remove sanity tests from ALWAYS_EXCEPT

Remove the following sanity tests from the ALWAYS_EXCEPT list:

45 - bz3561 'osc io page accounting' because associated bugzilla
ticket contain no activity.

68b - bz5188 test no longer exists.

Lustre-change: https://review.whamcloud.com/27413
Lustre-commit: 8958319aa929498d5ebbd8e2a9395bc7b997d1fa

Signed-off-by: dilip krishnagiri <dilipx.krishnagiri@intel.com>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ia6aa47872ffa7fe9e54131de7f7d3a6f8a70bd27
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30810
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10011 utils: refactor lfs quota codes 72/30272/3
Wang Shilong [Fri, 22 Sep 2017 04:38:50 +0000 (12:38 +0800)]
LU-10011 utils: refactor lfs quota codes

'lfs quota' default output logic is a bit hard to
understand, refactor codes to make it eaiser to
read.

Lustre-change: https://review.whamcloud.com/29165
Lustre-commit: 49fd1d15daf6a0ccb08dc0269f36530019994be1

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I9b2a5867ed0416ccb92856538ef029bc59ac2c4b
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30272
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7988 hsm: split mdt_hsm_add_actions() 83/29583/3
Frank Zago [Tue, 3 May 2016 20:13:05 +0000 (16:13 -0400)]
LU-7988 hsm: split mdt_hsm_add_actions()

Split a portion of mdt_hsm_add_actions() to the new function
mdt_hsm_process_hal() in order to re-use it in a subsequent patch.

Lustre-change: https://review.whamcloud.com/20272
Lustre-commit: 3c0b677cdffae7d329e6f0ab73784b20af2f11f5

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I32785c549a744592d4e84787fd16d12e7ffd7322
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Ben Evans <bevans@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29583
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10653 kernel: kernel update [SLES12 SP2 4.4.114-92.64] 74/31274/2
Bob Glossman [Fri, 9 Feb 2018 18:26:17 +0000 (10:26 -0800)]
LU-10653 kernel: kernel update [SLES12 SP2 4.4.114-92.64]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I98f3784eddc05e4faf00091e05b751d78090f66d
Reviewed-on: https://review.whamcloud.com/31274
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10634 kernel: kernel update [SLES12 SP3 4.4.114-94.11] 25/31225/2
Bob Glossman [Wed, 7 Feb 2018 23:04:40 +0000 (15:04 -0800)]
LU-10634 kernel: kernel update [SLES12 SP3 4.4.114-94.11]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3ffcd4c368b2976cffa6a517f9fabcf674781ac9
Reviewed-on: https://review.whamcloud.com/31225
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-5152 quota: enforce block quota for chgrp 10/31210/2
Hongchao Zhang [Sat, 27 Jan 2018 21:21:35 +0000 (05:21 +0800)]
LU-5152 quota: enforce block quota for chgrp

When an unprivileged user calls chgrp to change the group
of one of his files, the block quota limit of that new group
should be checked to ensure it not exceeds the limit.

The side effect of this patch could be,
1.The performance of chgrp from non-privileged user will be
very slow, no matter if quota is enabled. Since we assume that
chgrp issued from non-privileged user is very rare, the performance
impact possibly is acceptable.
2.If MDT crash while performing chgrp, inconsistency (group ownership
among MDT and OST objects) will be created. It should be acceptable.

This patch has fixed the bug while calculating the disk space of
some file for ldiskfs and zfs, the block unit is always 512.

Lustre-change: https://review.whamcloud.com/30146
Lustre-commit: 8a71fd5061bd073e055e6cbba1d238305e6827bb

Change-Id: I4b781e94493fe63c8cbd5700dc68293b2504c2ac
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31210
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10531 gss: fix GSS support for DNE 09/31209/2
Sebastien Buisson [Tue, 23 Jan 2018 12:33:52 +0000 (21:33 +0900)]
LU-10531 gss: fix GSS support for DNE

Part of the patch https://review.whamcloud.com/24236 was
inadvertently reverted by patch https://review.whamcloud.com/27823.
So re-apply missing part to have full DNE support in GSS code.

This patch is necessary because with DNE, an OSP can be used on MDT
for connections to other MDTs. So to determine exactly every
connection's purpose, use client_obd's cl_sp_to in
import_to_gss_svc().

Lustre-change: https://review.whamcloud.com/30984
Lustre-commit: 7327f66c2ca1d9762f6ea722f1433e4435f0a5b5

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I029dbfc52eeabb2c6f0f6d2c972ceea1879405e7
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31209
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10531 obd: handle case tgt equals fsname for obdname2fsname 08/31208/2
James Simmons [Fri, 19 Jan 2018 07:55:11 +0000 (02:55 -0500)]
LU-10531 obd: handle case tgt equals fsname for obdname2fsname

The function obdname2fsname() was updated to handle the case of
when tgt was for the format:

llite.lustre*.xattr_cache
llite.lustre-*.xattr_cache

but the case of tgt being exactly equal to the fsname is also
valid as in the case of sptlrpc: fsname.srpc.flavor.default.cli2ost

Lustre-change: https://review.whamcloud.com/30937
Lustre-commit: ac01abc2db2e82f87061eb0e6b2c03e28dad6a5b

Change-Id: I9bb4082ee5f194842c7d72ae25e14f6998c0b8ed
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31208
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7004 obd: make LCFG_SET_PARAM functional 07/31207/2
James Simmons [Wed, 13 Dec 2017 20:05:56 +0000 (15:05 -0500)]
LU-7004 obd: make LCFG_SET_PARAM functional

The LCFG_SET_PARAM infrastructure was meant to replace the
class_process_proc_param() functionality but various software
bugs have prevented its adoption. This patch does the following:

1) Take the better print_lustre_cfg() of the mgs module and use
   that in llog_swab.c instead with the intent of exporting this
   function. I add to process_param2_config() a call to
   print_lustre_cfg() for debugging purposes.

2) Move obdname2fsname to obd_mount.c and make it exportable.
   Expanded the functionality to work for both lctl conf_param
   and lctl set_parm -P.

3) Split mgs_setparam() into two functions since the difference
   in LCFG_SET_PARAM and LCFG_PARAM are large enough.

Currently virtual attributes failover.nid, sptlrpc, and quota
are not fully supported. They will be addressed in later patches.

Lustre-change: https://review.whamcloud.com/28590
Lustre-commit: dfe60d0b98a1a888ca4ffce14788938c192b1520

Change-Id: Iced6505f39a3270139c1630270cfe1dc4a2e49ed
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31207
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9761 dkms: Add ldiskfs dkms support 01/31201/2
Nathaniel Clark [Fri, 5 Aug 2016 15:22:21 +0000 (11:22 -0400)]
LU-9761 dkms: Add ldiskfs dkms support

This breaks out lustre-dkms into lustre-zfs-dkms and
lustre-ldiskfs-dkms (or lustre-all-dkms) as "flavours" of lustre
server dkms.  The reason for the flavours is to prevent lustre
ldiskfs dkms build from having ZFS dependencies, and to maintain
lustre zfs dkms build ordering when rebuilding for new kernels.
This also prevents building of tests and utils when --disable-tests
and --disable-utils (respectively) are passed to configure.

Lustre-change: https://review.whamcloud.com/#/c/27990/
Lustre-commit: 89d9b65326f9f9a117b8013d721378ce1f77fdf0

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iba500d9830a8f57662066141a176c381151861f4
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31201
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10565 mdc: add __GFP_COLD for back compatible 00/31200/2
Yang Sheng [Fri, 1 Dec 2017 14:44:46 +0000 (22:44 +0800)]
LU-10565 mdc: add __GFP_COLD for back compatible

The __GFP_COLD has been removed in upstream. Add
it for compatible.

Lustre-change: https://review.whamcloud.com/31028
Lustre-commit: 8b3cb154856623a03b3cb0dc3e3fbce9a693e831

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I70d0978fa1cdfb9ea22f0b1511a26b28523048b6
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31200
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10565 osd: use readdir while iterate is kabi_extend 99/31199/2
Yang Sheng [Thu, 25 Jan 2018 17:43:37 +0000 (01:43 +0800)]
LU-10565 osd: use readdir while iterate is kabi_extend

Sometime iterate interface is not initialized in ldiskfs.
So we use readdir in such case.

Lustre-change: https://review.whamcloud.com/31018
Lustre-commit: 7db38378aa07f7ce5fb79bc379271fd4218d95bd

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I43260a6d27003895b0ddd1bdf7b0539cc2ad64c5
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31199
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9735 compat: heed the fs_struct::seq 06/31106/2
Bobi Jam [Fri, 8 Sep 2017 13:56:03 +0000 (21:56 +0800)]
LU-9735 compat: heed the fs_struct::seq

2.6.37 kernel uses a seqlock in the fs_struct to enable us to take
an atomic copy of the complete cwd and root paths.

Lustre-change: https://review.whamcloud.com/28907
Lustre-commit: fff1163fdb41190b59adb8d90919e0adf37f68fb

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I35384b8f5c468a8c142a59032f3148b698a0c79e
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31106
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9836 osd-ldiskfs: read directory completely 19/31019/2
Fan Yong [Tue, 16 Jan 2018 03:21:05 +0000 (11:21 +0800)]
LU-9836 osd-ldiskfs: read directory completely

For ldiskfs backend, the return of readdir() does NOT means
the whole directory being read. Instead, it is the caller's
duty to count whether there are new items read via the last
readdir() then determine whether or not the whole directroy
has been read.

Unfortunately, some old osd-ldiskfs logic, such as OI scrub,
did not handle that properly, as to some directory, such as
lost+found, may be partly scanned. That is why some orphans
cannot be recovered.

Lustre-change: https://review.whamcloud.com/30770
Lustre-commit: 1e2cd1c7025080879a27f9ad9a3896fd3e0e8753

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ib328643c4cdcdb14b548807ed05e8835f80bbf6a
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31019
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8346 obdclass: protect key_set_version 17/31017/2
Hongchao Zhang [Sat, 13 Jan 2018 10:08:29 +0000 (18:08 +0800)]
LU-8346 obdclass: protect key_set_version

In lu_context_refill, the key_set_version should be protected
before comparing it to version stored in the lu_context.

This patch is a supplement of the previous patch
https://review.whamcloud.com/#/c/28405/, which adds protection
for key_set_version from modification in lu_context_refill
and lu_context_key_degister.

Lustre-change: https://review.whamcloud.com/27448
Lustre-commit: 4538de675cc1ee05408fa912e71c65d9109d7027

Change-Id: I201f56214382a717cfc31ba573e06fec9fbedae4
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31017
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10463 osd-zfs: use 1MB RPC size by default 69/30969/2
Andreas Dilger [Sat, 6 Jan 2018 01:39:06 +0000 (18:39 -0700)]
LU-10463 osd-zfs: use 1MB RPC size by default

Revert back to using 1MB RPC size for ZFS back-end storage, if it
is not otherwise specified, and as long as the ZFS recordsize is
1MB or smaller.  Continue to use the ZFS recordsize if it is larger.

For ldiskfs, continue to use 4MB RPC size, unless the bigalloc
feature is enabled and has a larger chunksize.

Testing has shown that while 4MB RPC size is good for ldiskfs, it
does not improve ZFS performance, and increases IO variability in
some cases.

Lustre-change: https://review.whamcloud.com/30757
Lustre-commit: af34a876d2ebde2b4717c920683c7fc8b5eae1cf

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I4b306843667bfd960ad07ecc3886a696fd3ebbe5
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30969
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10237 mdc: interruptable during RPC retry for EINPROGRESS 03/30903/2
Fan Yong [Sun, 19 Nov 2017 05:55:11 +0000 (13:55 +0800)]
LU-10237 mdc: interruptable during RPC retry for EINPROGRESS

Sometimes, some system resource may be inaccessible temporarily,
for example, related OI mapping is crashed and has yet not been
rebuilt. Under such case, the server will reply the client with
"-EINPROGRESS", then client will retry the RPC some time later.

Currently, the client will retry infinitely until related RPC
succeed or get other failure. But we do not know how long it
will be before related resource becoming available. It may be
very long time as to the RPC sponsor - the application or the
user does not want to retry any more, then we need to make the
logic to be interruptable. This patch is for such purpose.

Lustre-change: https://review.whamcloud.com/30166
Lustre-commit: 9c596a4996ee242aa1b954f5f2f19101d3941bf0

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I4f939f9a350d3a99ce3d3af37d0dea8ab8030fee
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30903
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10444 utils: Don't remount debugfs every time 00/30900/2
Oleg Drokin [Sat, 30 Dec 2017 03:16:30 +0000 (22:16 -0500)]
LU-10444 utils: Don't remount debugfs every time

Check if debugfs is mounted at /sys/kernel/debug and only
mount if it is not.

Lustre-change: https://review.whamcloud.com/30675
Lustre-commit: 767f03b161ae44bd9d33dae7e03e71e73852813f

Change-Id: Ib31bd8f7c5c93ab942c6708ed3a4d17a11159e95
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30900
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8999 test: ignore unrelated quota id 96/30896/2
Hongchao Zhang [Wed, 6 Dec 2017 04:59:23 +0000 (12:59 +0800)]
LU-8999 test: ignore unrelated quota id

In test_38 of sanity_quota, the quota id larger than 9999
should be ignored.

Lustre-change: https://review.whamcloud.com/30730
Lustre-commit: 8a0a9190cd0a68a88e42210e9c3dac324319fa6d

Change-Id: I12e7936c0c1abc2dcaad7646a048c98bb37de254
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30896
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-6051 utils: allow lfs_migrate to migrate links 99/30799/2
Andreas Dilger [Sat, 10 Jun 2017 02:39:11 +0000 (20:39 -0600)]
LU-6051 utils: allow lfs_migrate to migrate links

When running on a server that supports "lfs migrate", it is possible
to migrate hard links transparently.  This is still not possible for
servers that do not support "lfs migrate" (layout swap) so we still
need to keep the hard-link check if "lfs migrate" fails.

Add test for migrating many hardlinks on supported kernels.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/27553
Lustre-commit: 6086d0d69c84ce57c4daff18595fa7b620ed2b04

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7fa1c70611aa7dd61f822844d5fe339f730640e5
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30799
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10357 hsm: open file to be archived before starting 21/30721/2
John L. Hammond [Fri, 8 Dec 2017 19:59:43 +0000 (13:59 -0600)]
LU-10357 hsm: open file to be archived before starting

In the archive case of llapi_hsm_action_begin(), open the file to be
archived before calling the LL_IOC_HSM_COPY_START ioctl. Store the
open FD in struct hsm_copyaction_private, return a dup of it
llapi_hsm_action_get_fd(), and close it in
llapi_hsm_action_end(). Calling open() first avoids 3 extra RPCs
(MDS_GETATTR, LDLM_ENQUEUE for layout to get data version,
LDLM_ENQUEUE for fstat()) when archiving.

Lustre-change: https://review.whamcloud.com/30456
Lustre-commit: 77cd1a21e312ca00b37b33689091734a12eec048

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idea0a7f4cb63bd9d712ff2ce9fcb59a3b278d0f2
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30721
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10341 hsm: filter kkuc write by client UUID 19/30719/2
John L. Hammond [Thu, 7 Dec 2017 02:21:48 +0000 (20:21 -0600)]
LU-10341 hsm: filter kkuc write by client UUID

Add a struct obd_uuid kr_uuid member to struct kkuc_reg to hold the
UUID of the client (super block) that owns the kkuc pipe. Modify
libcfs_kkuc_group_{put,rem,foreach}() to accept a UUID pointer which
filters the kkuc pipes operated on. Modify mdc_hsm_copytool_send() to
pass the UUID of the MDC device when calling
libcfs_kkuc_group_put(). The effect of all this is that HALs received
by a given MDC will only be delivered to copytools registered on the
corresponding mount point.

Remove the cluuid member of struct lmv_obd since it is always the same
as the obd_uuid member of the corresponding struct obd_device. Remove
the kcd_uuid member of struct kkuc_ct_data as it is no longer needed.

Lustre-change: https://review.whamcloud.com/30419
Lustre-commit: c73736545fafac4373569187e064aab9cd435320

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ibbda253979739a1d56d3e132a51a482a02a0ec27
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30719
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9998 libcfs: split single NUMA node into partitions 90/30690/3
Dmitry Eremin [Tue, 17 Oct 2017 09:02:35 +0000 (12:02 +0300)]
LU-9998 libcfs: split single NUMA node into partitions

For machines with single NUMA node change default behavior
and slpit it with cpu_npartitions as it was before 2.8.59.
See LU-5050 libcfs: default CPT matches NUMA topology

Lustre-change: https://review.whamcloud.com/29645
Lustre-commit: c9d14a01263bd0fb7a5fac853b5e2d34ff8cadab

Change-Id: I7f9122931a88fd5770628d7ae21b764efc21c134
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30690
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10462 lod: Correct lfs --component-add striping 48/31048/3
Giuseppe Di Natale [Mon, 8 Jan 2018 16:50:39 +0000 (08:50 -0800)]
LU-10462 lod: Correct lfs --component-add striping

lfs --component-add -E <end> -c -1 would apply the default
stripe count to a file when it should be striping across
all OSTs. This was due to incorrect handling of sentinel
values in various portions of lod_object.

Lustre-change: https://review.whamcloud.com/30790
Lustre-commit: b7285d387c78fbd11579c577230593ba1b0be84e

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: I178f13be81ee546f44edcdadcf7086a1a57f7e9a
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31048
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10437 lod: clear layout header when generating layout 84/30784/2
Jinshan Xiong [Mon, 8 Jan 2018 21:29:51 +0000 (21:29 +0000)]
LU-10437 lod: clear layout header when generating layout

LOD needs to clear layout header otherwise the lcm_flags and
lcm_padding will be random data, which will create issues when
those fields are used by future module.

It already confused FLR because it uses lcm_flags and mirror_count
to do sanity check.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If9511e6691144debd51ccab575ef4479d0c9b865
Reviewed-on: https://review.whamcloud.com/30784
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10297 lod: prepare inuse array always 86/30486/3
Bobi Jam [Fri, 1 Dec 2017 01:56:47 +0000 (09:56 +0800)]
LU-10297 lod: prepare inuse array always

The OST inuse array should be prepared for composite files and for
plain files as well, since creating OST objects in both cases needs
to use it.

Lustre-change: https://review.whamcloud.com/30334
Lustre-commit: 2cca16ba7da4070c319cc6230b7dbb3e7a91e323

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ibb37b680c68f8883650cdee6bebebc1c4d844623
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30486
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10422 lfsck: misc fixes to avoid unexpected repairing 28/30628/2
Fan Yong [Thu, 21 Dec 2017 12:39:02 +0000 (20:39 +0800)]
LU-10422 lfsck: misc fixes to avoid unexpected repairing

There are several issues that will misguide LFSCK to
trigger unexpected RPC or repairing by wrong, including:

1) object_update_result_insert() should pack the OUT RPC
   result (not the return value) into the reply buffer via
   object_update_result::our_data. But it did that in some
   wrong address.

2) out_xattr_get() used wrong index to obtain the EA buffer
   as to may overwrite former update (such as OUT_XATTR_GET)
   results.

3) osp_declare_xattr_get() does not consider the last '0'
   of the EA name for the length parameter for
   osp_insert_async_request().

4) osp_xattr_get_interpterer() missed to handle the positive
   value for the given parameter @rc. That will cause the PFID
   EA to be double read when the target OST-object has it.

Back port from master:
Lustre-commit: bf0448c16e6d311b4773a80ec02ed9c48e8c11f4
Lustre-change: http://review.whamcloud.com/30612

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibf0e095ae2735c60b9b88e4b0992389c906728f9
Reviewed-on: https://review.whamcloud.com/30628
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10321 lfsck: not start lfsck during umount 14/30514/3
Fan Yong [Wed, 13 Dec 2017 05:50:11 +0000 (13:50 +0800)]
LU-10321 lfsck: not start lfsck during umount

There is race condition bewtween lfsck_start and umount:
the LFSCK may be triggered just after the LFSCK stopped
during umount the target, then nobody will stop the new
started LFSCK, as to the umount may be blocked.

This patch sets flag on the lfsck instance when umount
that will prevent subsequent lfsck_start.

This is a port to b2_10 of
Lustre-change: https://review.whamcloud.com/#/c/30513/
Lustre-commit: 6263064b369dd4fddbb0dfa9ab49013a0d791629

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I779f862d4195d4289bb9dd96575cd7746ac4b35b
Reviewed-on: https://review.whamcloud.com/30514
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10321 lfsck: allow to stop the in-starting lfsck 22/30422/3
Fan Yong [Thu, 7 Dec 2017 08:03:34 +0000 (16:03 +0800)]
LU-10321 lfsck: allow to stop the in-starting lfsck

The LFSCK start logic will hold li_mutex on the lfsck instance
during LFSCK start processing. The LFSCK stop logic also needs
to take the li_mutex on the lfsck instance when stop the LFSCK.
If someone triggers lfsck_stop (such as when umount the target)
before the lfsck_start return, then lfsck_stop will be blocked
on the li_mutex. And if the li_mutex holder is blocked by other
things, for example, it may be waiting for the LFSCK RPC to be
handled by remote server (MDT/OST) but the connection or remote
server is not ready yet, then the lfsck_stop will be blocked.

To avoid such cascade block trouble, the patch makes lfsck_stop
can go ahead without taking li_mutex, then it can directly tell
related LFSCK engines the stop event even if former lfsck_start
does not complete yet.

This is a port to b2_10 of
Lustre-change: https://review.whamcloud.com/#/c/30420/
Lustre-commit: 7817928a62c8a212f5c2b040587042c193bd5c1a

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I6e168d955db33d74778142235a8ed2802d3577d9
Reviewed-on: https://review.whamcloud.com/30422
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10564 kernel: kernel update RHEL6.9 [2.6.32-696.20.1.el6] 66/31066/2
Bob Glossman [Thu, 25 Jan 2018 17:59:47 +0000 (09:59 -0800)]
LU-10564 kernel: kernel update RHEL6.9 [2.6.32-696.20.1.el6]

Update RHEL6.9 kernel to 2.6.32-696.20.1.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I5d72a5416e091b2690f56764eb4d195b8137d405
Reviewed-on: https://review.whamcloud.com/31066
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10563 kernel: kernel update RHEL7.4 [3.10.0-693.17.1.el7] 35/31035/2
Bob Glossman [Thu, 25 Jan 2018 17:35:45 +0000 (09:35 -0800)]
LU-10563 kernel: kernel update RHEL7.4 [3.10.0-693.17.1.el7]

update RHEL 7.4 kernel to 3.10.0-693.17.1.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1302c2de6d8eebb33ca741dd357b65579ce71d7d
Reviewed-on: https://review.whamcloud.com/31035
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9892 test: fix SuSe nfsserver setup 09/30809/2
Minh Diep [Mon, 11 Dec 2017 18:12:20 +0000 (10:12 -0800)]
LU-9892 test: fix SuSe nfsserver setup

Checking for SuSE-release and use nfsserver
Add export info to a /etc/exports

Test-Parameters: trivial testlist=parallel-scale-nfsv4 clientdistro=sles12sp3

Lustre-change: https://review.whamcloud.com/#/c/30476/
Lustre-commit: 9f07081fd9f57bd6bd52a8c26d28a477a0c20cfb

Change-Id: Id12370ae35d878e51bdf6f71a77b1b82b5e82c33
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30809
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10327 test: use nogroup instead of nobody 72/30772/3
Minh Diep [Fri, 15 Dec 2017 20:48:58 +0000 (12:48 -0800)]
LU-10327 test: use nogroup instead of nobody

In Ubuntu, there isn't any nobody group

Lustre-change: https://review.whamcloud.com/#/c/30559/
Lustre-commit: 6229a5ff318471fda18daceec79143007c4b204f

Change-Id: I2d4607b3d1384d2d619dd9640363533f92397356
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30772
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10161 lbuild: fix the problem of determine default_iface 73/30273/2
Li Xi [Wed, 25 Oct 2017 17:53:37 +0000 (13:53 -0400)]
LU-10161 lbuild: fix the problem of determine default_iface

The script of determining the default interface is broken.
Remove complexity and replace with hostname

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/29776
Lustre-commit: bac71754b9dbb83b3ccf10ae99c027cc6b2f9829

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I0d662e9e24bed17078e31b6b5ca305cff2c0548e
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30273
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9899 tests: mount client on MGS for tests with pools 17/30217/4
James Nunez [Thu, 5 Oct 2017 19:51:50 +0000 (13:51 -0600)]
LU-9899 tests: mount client on MGS for tests with pools

When a Lustre file system has the MGS and MDS on separate
nodes, the file system must be mounted on the MGS to allow
OST pools to work properly.

There are several tests that deal with creating, adding
to and deleting OST pools. Create functions to mount and
unmount the file system on the MGS in test-framework and call
these functions when necessary for the Lustre test suites
conf-sanity test 82b, 103
sanity tests 27D, 200, 220, 406 and
replay-single test 85b.

This is a port from master to b2_10 of
Lustre change: https://review.whamcloud.com/28806
Lustre commit: 75d6d35bcc48eefe490e8b4efd673c58b3373507

Test-Parameters: combinedmdsmgs=false testlist=sanity,replay-single,conf-sanity
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I4b3e331b8d1ea6c3f8c9ea8a571e26f66f4535f8
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/30217
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9946 nodemap: have fileset on default nodemap. 43/29943/4
Sebastien Buisson [Tue, 5 Sep 2017 15:04:56 +0000 (00:04 +0900)]
LU-9946 nodemap: have fileset on default nodemap.

When a directory is defined as fileset on the default nodemap entry,
all clients that fall into default will be imposed subdirectory
mount on this directory.

Lustre-change: https://review.whamcloud.com/28858
Lustre-commit: 8ed31f48b3492909739a35ae6a0fbde111f7f028

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I3491bce4f8c2011629e56494bf1a0de57f19829d
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29943
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9052 lod: accept lfs mkdir from old client 42/30542/3
Di Wang [Wed, 25 Jan 2017 16:24:28 +0000 (11:24 -0500)]
LU-9052 lod: accept lfs mkdir from old client

MDS should also accept create striped directory request
from old client, but it will only honour stripe index in
this case, since the old client can only create remote
directory.

And also move the magic check from LOD to MDD to validate
LMV as early as possible.

Directory creation for echo client should go with lmv_user_md,
otherwise validation on user md will fail.

For striped directory, echo client should first choose stripe
before MD operation.

And also remove some unecessary lmv audit.

Re-enable 225b tests for DNE to test echo operations on
striped directory.

In mds-survey, if the current environment has more than one MDS,
let's skip the test. Because echo test will attach echo_client
individually on each MDSs(all of MDDs on the MDS), so each echo
client will not be able to access all of MDTs. But the test will
create a striped dir by MAX MDS count internally in mds_survey,
so echo client can not resolve the directory path in this case.

Lustre-change: https://review.whamcloud.com/25091
Lustre-commit: 069f593572509d6ee285ba6ea8950101ccb62d72

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I74a3712edfa36fd178f92965f8e35f5ff77ad422
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-on: https://review.whamcloud.com/30542
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8653 lod: use stripe_count instead of stripe_nr 42/29142/4
Andreas Dilger [Sat, 1 Oct 2016 00:07:17 +0000 (18:07 -0600)]
LU-8653 lod: use stripe_count instead of stripe_nr

Replace the use of stripenr and stripecnt in the code with
stripe_count to be consistent the rest of the code.

Introduce LOV_PATTERN_NONE instead of using "0" around the
code to indicate no layout has been specified.

Introduce LOV_PATTERN_DEFAULT to indicate the entire layout
is unset, instead of using "0xffffffff" in the code.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/26681
Lustre-commit: 53d3890f16e4c6e5717c4d020ef213897a36c2b7

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I6056aebc1a381b09c1a436fb4a7986a51f3ebbe5
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29142
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoNew release 2.10.3. 2.10.3 v2_10_3
John L. Hammond [Wed, 31 Jan 2018 19:49:35 +0000 (13:49 -0600)]
New release 2.10.3.

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

6 years agoNew tag 2.10.3-RC1. 2.10.3-RC1 v2_10_3_RC1
John L. Hammond [Mon, 8 Jan 2018 16:36:25 +0000 (10:36 -0600)]
New tag 2.10.3-RC1.

First release candidate for 2.10.3 release.

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

6 years agoLU-10399 test: use /dev/urandom in sanity-hsm test_1b() 22/30722/2
John L. Hammond [Fri, 15 Dec 2017 18:48:21 +0000 (12:48 -0600)]
LU-10399 test: use /dev/urandom in sanity-hsm test_1b()

In sanity-hsm test_1b() use /dev/urandom instead of /dev/random so we
won't have to wait for the second law of thermodynamics to become
true.

Test-Parameters: trivial testlist=sanity-hsm
Lustre-change: https://review.whamcloud.com/30556
Lustre-commit: 54cf0962e286b8f1bcfca490cf828fd126f1fa60

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib64691fd6ee1a172c631ffa55956e1d69f24d349
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30722
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10371 ptlrpc: check for posix_acl a_entries 91/30691/3
Thomas Stibor [Tue, 12 Dec 2017 14:27:30 +0000 (15:27 +0100)]
LU-10371 ptlrpc: check for posix_acl a_entries

Since commit 2211d5ba5c6c4e972ba6dbc912b2897425ea6621
posix_acl_xattr_entry a_entries[0] was removed.
Make sure the LASSERTF test works with Kernels
after this commit.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/30495
Lustre-commit: 429ad0e18eccd7261011ee2c7c193b822747e732

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: If2404c89775a5f9077c7d9379d73c8187b796a3a
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30691
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-618 llite: IO accounting of page read 70/30570/3
Hongchao Zhang [Thu, 30 Nov 2017 10:10:52 +0000 (18:10 +0800)]
LU-618 llite: IO accounting of page read

When CONFIG_TASK_IO_ACCOUNTING is used with Lustre, writes are
accounted for but not read.

The accounting is normally done in the kernel for page writeback
and readahead functionlity, Therefore, as Lustre implements its
own readahead, it must also maintain its own accounting on read
(but not for write)

Lustre-change: https://review.whamcloud.com/1636
Lustre-commit: 48de9b195d71cb57ee50636d75c59d78ee068cee

Change-Id: I19f330be65324a8da002f9d61cb9262345ecb012
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-on: https://review.whamcloud.com/30570
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10377 build: Update ZFS Version to 0.7.5 23/30523/4
Nathaniel Clark [Wed, 13 Dec 2017 21:25:02 +0000 (16:25 -0500)]
LU-10377 build: Update ZFS Version to 0.7.5

Update SPL and ZFS version that is built against.

https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If010d3a7e78b66a2acbd70242fe517218a438c02
Reviewed-on: https://review.whamcloud.com/30523
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10464 kernel: kernel update [SLES12 SP2 4.4.103-92.56] 50/30750/2
Bob Glossman [Thu, 4 Jan 2018 18:57:07 +0000 (10:57 -0800)]
LU-10464 kernel: kernel update [SLES12 SP2 4.4.103-92.56]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0eb5dc783bcbcd4ee8643431345daefb9cb89eb1
Reviewed-on: https://review.whamcloud.com/30750
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10458 kernel: kernel update [SLES12 SP3 4.4.103-6.38] 43/30743/2
Bob Glossman [Thu, 4 Jan 2018 17:59:29 +0000 (09:59 -0800)]
LU-10458 kernel: kernel update [SLES12 SP3 4.4.103-6.38]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ib7a308dbce58d94c5f5775cd54f33563cf067e75
Reviewed-on: https://review.whamcloud.com/30743
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10456 kernel: kernel update RHEL6.9 [2.6.32-696.18.7.el6] 37/30737/2
Bob Glossman [Thu, 4 Jan 2018 16:26:03 +0000 (08:26 -0800)]
LU-10456 kernel: kernel update RHEL6.9 [2.6.32-696.18.7.el6]

Update RHEL6.9 kernel to 2.6.32-696.18.7.el6

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

Change-Id: Ib0b7d5ff7f50f96c8bbc064541ae5c8bf2a4367f
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/30737
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10455 kernel: kernel update RHEL7.4 [3.10.0-693.11.6.el7] 35/30735/2
Bob Glossman [Thu, 4 Jan 2018 15:57:37 +0000 (07:57 -0800)]
LU-10455 kernel: kernel update RHEL7.4 [3.10.0-693.11.6.el7]

update RHEL 7.4 kernel to 3.10.0-693.11.6.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Id3428aa00e4b1501b642587db7911b6adafd51ef
Reviewed-on: https://review.whamcloud.com/30735
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10427 kernel: kernel update [SLES12 SP2 4.4.103-92.53] 52/30652/2
Bob Glossman [Thu, 21 Dec 2017 23:14:05 +0000 (15:14 -0800)]
LU-10427 kernel: kernel update [SLES12 SP2 4.4.103-92.53]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I065ab670ad58fda19610e14440e1c304d0eae74f
Reviewed-on: https://review.whamcloud.com/30652
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10425 kernel: kernel update [SLES12 SP3 4.4.103-6.33] 48/30648/2
Bob Glossman [Thu, 21 Dec 2017 18:13:08 +0000 (10:13 -0800)]
LU-10425 kernel: kernel update [SLES12 SP3 4.4.103-6.33]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ibdaf6edeb34388d3d9bf39dc7f84639d5fb9992f
Reviewed-on: https://review.whamcloud.com/30648
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8999 test: check chown result 31/30631/2
Hongchao Zhang [Fri, 17 Nov 2017 15:05:17 +0000 (23:05 +0800)]
LU-8999 test: check chown result

For test_38 in sanity-quota, the chown operation should be
checked whether it succeeds or not. the patch also collects
the output of quota users if the test failed.

Lustre-change: https://review.whamcloud.com/30243
Lustre-commit: 817b367707d0d4f5c406b4f18cffceea2aae8406

Change-Id: I6c04f9519f3f097af7126064380faf1bdc4fff6a
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30631
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10232 lov: call cl_object_attr_get under cl_attr lock 86/30586/2
Mikhail Pershin [Sun, 12 Nov 2017 21:20:26 +0000 (00:20 +0300)]
LU-10232 lov: call cl_object_attr_get under cl_attr lock

cl_object_attr_get() must be called under cl_object_attr_lock
get. There is place in lov_getstripe where it is called
without that lock.

Lustre-change: https://review.whamcloud.com/30052
Lustre-commit: 80515fa15ee76fb0174fd3be80c4a113a8d3c875

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ia0a2322ba4ff0ff4affb081375cb108fbf2988c4
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30586
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10346 utils: use the correct lib path in mount_utils.c 84/30584/2
Quentin Bouget [Thu, 7 Dec 2017 15:48:28 +0000 (15:48 +0000)]
LU-10346 utils: use the correct lib path in mount_utils.c

The backfs_load_module() function of mount_utils.c used an outdated
to link itself against the osd library. This patch fixes it.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/30431
Lustre-commit: 74eb79b0fe4815daa0bebd3293c71f052c5b19d4

Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I90a523b45b5772c05f7520e810eec7eac14b75be
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30584
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9535 tests: check server version in sanityn 77j 83/30583/2
James Nunez [Tue, 5 Dec 2017 23:31:21 +0000 (16:31 -0700)]
LU-9535 tests: check server version in sanityn 77j

The QoS feature in the TBF policy was added to Lustre with
tag 2.9.53 and a patch with commit hash d2c403363f6. Thus,
sanityn test 77j should only be run for servers with version
2.9.53 and later.

Test-Parameters: trivial mdsjob=lustre-b2_9 ossjob=lustre-b2_9 serverbuildno=2 testlist=sanityn

Lustre-change: https://review.whamcloud.com/30385
Lustre-commit: 8552476c5495a94d22501d002a35830181b5ea7d

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ia2a04b5ae688809d4a84a2dc8459598f02932119
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30583
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10267 llog: fix EOF handling in llog_client_next_block() 82/30582/2
John L. Hammond [Wed, 29 Nov 2017 14:45:47 +0000 (08:45 -0600)]
LU-10267 llog: fix EOF handling in llog_client_next_block()

In llog_client_next_block() update *cur_idx and *cur_offset in the
special case that the handler has returned -EIO after reaching the end
of the log without finding the desired record. This fixes client side
EOF detection in llog_process_thread().

Lustre-change: https://review.whamcloud.com/30313
Lustre-commit: a485c51379a0218aaf01f7c0baf8e4cc993d8824

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If30ebec065ddd38fb7b06c3e16f96bb3cd76fa1b
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30582
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10268 lfsck: postpone lfsck start until initialized 21/30421/3
Fan Yong [Thu, 7 Dec 2017 08:02:08 +0000 (16:02 +0800)]
LU-10268 lfsck: postpone lfsck start until initialized

Sometimes, the LFSCK start request may comes (from remote server)
before local target initialized. If we start the LFSCK right away
on current server, the LFSCK engine may access NULL pointer, such
as lookup FID with NULL 'ss_server_fld'.

To avoid such trouble, start LFSCK logic will return -EINPROGRESS
to the request sponsor. It is the sponsor duty to retry the start
request some time later.

This is a port to b2_10 of
Lustre-change: https://review.whamcloud.com/#/c/30259/
Lustre-commit: 6ec4b7d3fb7351f699569e1a8f5ad2cfa7c78df9

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If7bc44e025b5f3c4f977b3a35e3784ada548a2df
Reviewed-on: https://review.whamcloud.com/30421
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10134 lfsck: not add requests if engine out of work 75/30375/3
Fan Yong [Wed, 22 Nov 2017 02:38:43 +0000 (10:38 +0800)]
LU-10134 lfsck: not add requests if engine out of work

There is race condition between LFSCK assistant engine and
LFSCK request generators: before the LFSCK assistant engine
exit, it will mark itself as 'stopping', then cleanup the
in-queue requests, and then mark itself as 'stopped'. It is
expected that the 'stopping' status will prevent generators
adding more LFSCK requests. But current implementation only
checks 'stopped' or not. So if the LFSCK engine thread exit
before the whole system scanned that may because of some
failures or on demand, more LFSCK requests may be added in
the queue after the cleanup.

The patch fixes the wrong logic by checking 'running' or not,
and stop adding more LFSCK requests if not 'running'.

This is a port to b2_10 of
Lustre-change: https://review.whamcloud.com/#/c/30165/
Lustre-commit: 159bde49676b9a49eb3e4cb57c8c3a58a49ba0af

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic2b5ca3f5e80b5be5a5c60aa24f0b54682b717d9
Reviewed-on: https://review.whamcloud.com/30375
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-5020 llite: don't reconnect MGC if connecting 81/30581/2
Hongchao Zhang [Fri, 13 Oct 2017 22:57:28 +0000 (06:57 +0800)]
LU-5020 llite: don't reconnect MGC if connecting

1. In mgc_set_info_async(KEY=KEY_INIT_RECOV_BACKUP "init_recov_bk"),
   the MGC import should be reconnected only if its state is
   LUSTRE_IMP_DISCON

2. in mgc_target_register, if the target will regenerate the config,
   we should use some longer delay limit to wait the MGC to connect
   to MGS for the target (server) will fail to exit if the request
   expired due to delay limit.

3. In case of parallel mount, the async cleanup of OSS will affects
   the following mount for the OSS can't be setup again, then there
   should be some barrier to sync with the OSS cleanup.

Lustre-change: https://review.whamcloud.com/10229
Lustre-commit: 1a7ff02c1fbb8e85ac2e8fa458ba3fb810a76ea4

Change-Id: I805b84cf12100ec2cc68f95bb65a9c396e0fbc1b
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30581
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-4134 obdclass: fix double free in failure path 87/30487/2
Yang Sheng [Mon, 27 Nov 2017 21:14:49 +0000 (16:14 -0500)]
LU-4134 obdclass: fix double free in failure path

We should just decref for obd if register is failed.
Since class_export_put will invoke class_free_dev,
then we may face a double free.

Lustre-change: https://review.whamcloud.com/29967
Lustre-commit: 77d2e604b6bc3c319adefca069b5182c325a43b0

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ia8d1e487c69c4de1c7c247158cc8615aa6b6093a
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30487
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-4134 obdclass: obd_device improvement 40/29740/3
Alexander Boyko [Thu, 15 Jun 2017 14:25:58 +0000 (17:25 +0300)]
LU-4134 obdclass: obd_device improvement

The patch removes self exports from obd's reference counting which
allows to avoid freeing of self exports by zombie thread.
A pair of functions class_register_device()/class_unregister_device()
is to make sure that an obd can not be referenced again once its
refcount reached 0. For target_handle_connect() take a reference for
obd_device during finding it by name.

Fix grant mismatch message
"tot_granted 4194304 != fo_tot_granted".

Lustre-change: https://review.whamcloud.com/8045
Lustre-commit: 45900a7777ac02130d8bf65724c4b6cffca9d546

Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-2139 MRP-3267
Change-Id: I9cc6860431c6bb7db6983e0d15a5d3d2b564265e
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29740
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10301 kernel: kernel update RHEL7.4 [3.10.0-693.11.1.el7] 41/30441/2
Bob Glossman [Thu, 30 Nov 2017 15:06:47 +0000 (07:06 -0800)]
LU-10301 kernel: kernel update RHEL7.4 [3.10.0-693.11.1.el7]

update RHEL 7.4 kernel to 3.10.0-693.11.1.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iea7a4604c333c26fdc1b2439e6a00f27472d2410
Reviewed-on: https://review.whamcloud.com/30441
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 llite: port lustre to unified handling of bdi 75/30575/2
Jan Kara [Wed, 18 Oct 2017 16:26:19 +0000 (12:26 -0400)]
LU-9558 llite: port lustre to unified handling of bdi

For the linux 4.12 kernel the bdi handling was unified for all
file systems. This was done by allocating struct backing_dev_info
separately instead of embedding it inside superblock. For older
kernels we move all the bdi handling lustre does to the function
super_setup_bdi_name() which is what exist in the latest kernels.

Linux-commit: 9594caf216dc0fe3e318b34af0127276db661241

Lustre-change: https://review.whamcloud.com/28511
Lustre-commit: 1defa62a19e71c021ec2cf9fc9e0481e9ab962e0

Change-Id: I5af60ea3661e3d3a97973fd99a79c28dcd1ce1cc
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/30575
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7340 mdd: changelogs garbage collection 73/30573/2
Bruno Faccini [Fri, 12 May 2017 21:34:49 +0000 (23:34 +0200)]
LU-7340 mdd: changelogs garbage collection

When changelogs are almost full (few number of
free entries in catalog), try to recover some space
by unregistering users that are idle since too long,
based on new Changelog User record field (in fact,
using previous cur_padding unused field) to keep
track of last user's changelog cancel request time,
or based on gap between user index and current
ChangeLog record, for older registered user.
sanity/test_160[f,g] have been added to verify feature.

Lustre-change: https://review.whamcloud.com/27103
Lustre-commit: 3442db6faf685fbdbd092bdfdc8d273e4990a141

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I2100b101772e6d027675e5efa5606d4be24342a0
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30573
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9558 kernel: replace CURRENT_TIME macro 72/30572/2
Deepa Dinamani [Tue, 1 Aug 2017 18:53:08 +0000 (14:53 -0400)]
LU-9558 kernel: replace CURRENT_TIME macro

CURRENT_TIME macro is not y2038 safe on 32 bit systems.

The patch replaces all the uses of CURRENT_TIME by current_time() for
filesystem times, and ktime_get_* functions for others.

struct timespec is also not y2038 safe.  Retain timespec for timestamp
representation here as lustre uses it internally everywhere.  These
references will be changed to use struct timespec64 in a separate patch.

This is also in preparation for the patch that transitions vfs
timestamps to use 64 bit time and hence make them y2038 safe.
current_time() is also planned to be transitioned to y2038 safe behavior
along with this change.

CURRENT_TIME macro will be deleted before merging the aforementioned
change.

Linux-commit: 47f38c539e9a42344ff5a664942075bd4df93876

Lustre-change: https://review.whamcloud.com/28305
Lustre-commit: 213db47f6497c0ea49ffef19de0d4673c932eefd

Change-Id: Iec67df8f48066801c227aba2bc9221d444dada65
Link: http://lkml.kernel.org/r/1491613030-11599-10-git-send-email-deepa.kernel@gmail.com
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30572
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-7991 quota: project quota against ZFS backend 40/30540/2
Fan Yong [Fri, 3 Nov 2017 01:22:12 +0000 (09:22 +0800)]
LU-7991 quota: project quota against ZFS backend

This patch enables the project quota feature against ZFS
backend. The project quota patch for ZFS itself will be
landed via https://github.com/zfsonlinux/zfs/pull/6290.
Such patch may be released via zfs-0.7.x (x >= 5).

This patch also cleanup the quota logic for ZFS backend
and sanity-quota.sh

Lustre-change: https://review.whamcloud.com/27093
Lustre-commit: a046e879fcadd601c9a19fd906f82ecbd2d4efd5

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic488efe19a6e34a3615811f79fb9ea7954ad9263
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/30540
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-7988 hsm: wake up cdt when requests are empty 38/30538/2
Ben Evans [Tue, 24 Oct 2017 15:34:06 +0000 (11:34 -0400)]
LU-7988 hsm: wake up cdt when requests are empty

The coordinator only runs once per second, we need a mechanism
to send more work when everything is done (cdt_request_count
goes to zero)

Without this, there is a hard limit of max_requests per sec
requests that can be processed, causing performance issues
with small files.

Lustre-change: https://review.whamcloud.com/29742
Lustre-commit: 7251fea8dc3c4d29e30c5a3f763c4c33d35f90a7

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I563666a1a3e53f0ec5908de593de71ff4d925467
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Sergey Cheremencev <cherementsev@gmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30538
Tested-by: Jenkins
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10256 hsm: enable setting archive_id in hsm_set 00/30500/2
Thomas Stibor [Fri, 17 Nov 2017 14:31:39 +0000 (15:31 +0100)]
LU-10256 hsm: enable setting archive_id in hsm_set

Setting HSM flags in lfs_hsm_change_flags(...,LFS_HSM_SET)
does not allow to specify the archive_id, that is,
in llapi_hsm_state_set(path, mask, 0, 0 /* archive_id */)
archive_id = 0 is always set, which means no identifier change.
For having full flexibility (e.g. for debugging), introduce
the additional option --archive-id in hsm_set. If the option
is not provided, the default behavior (archive_id = 0) is used
and no archive identifier change is done. In addition a
test case is provided to check the functionality and shell
function get_hsm_archive_id() is modified in favor of more
robust grep for contents after pattern approach.

Lustre-change: https://review.whamcloud.com/30150
Lustre-commit: d1855f8e22a929066a69470c7e3d082c70478575

Test-Parameters: trivial testlist=sanity-hsm

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I2145a18ecf32479527bb045140e5e881e58dd115
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-6210 utils: Use C99 struct initializers in lfs_hsm_state() 99/30499/2
Steve Guminski [Fri, 14 Apr 2017 19:45:59 +0000 (15:45 -0400)]
LU-6210 utils: Use C99 struct initializers in lfs_hsm_state()

This patch makes no functional changes.  Struct initializers that
use C89 or GCC-only syntax are updated to C99 syntax.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

This patch updates lfs_hsm_state() to use the C99 syntax.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/27525
Lustre-commit: 73c2c103f4f43f9bb37119a2e90d6c0fc1870711

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I32f427396e99f1b86d329eb8457883a9aaaed181
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30499
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9611 lov: allow lov.*.stripe{size,count}=-1 param 07/30407/3
Andreas Dilger [Thu, 6 Jul 2017 06:55:08 +0000 (00:55 -0600)]
LU-9611 lov: allow lov.*.stripe{size,count}=-1 param

Since LU-7344 patch http://review.whamcloud.com/16930 was landed,
lov_stripeoffset_seq_write() and lov_stripecount_seq_write() have
incorrectly checked that lov.*.stripecount and lov.*.stripeoffset
are not negative.  In fact they can both be "-1" to indicate that
the filesystem-wide default value should be used. These parameters
can also be set internally if using "lfs setstripe -c -1 $MOUNT"
or "lfs setstripe -i -1 $MOUNT" to set the system wide default,
generating console errors on the MDS from class_process_proc_param():

    lov.: error writing proc entry 'stripecount': rc = -34
    lov.: error writing proc entry 'stripeoffset': rc = -34

Fix these functions to allow "-1" as a valid value.

Lustre-change: https://review.whamcloud.com/27946
Lustre-commit: f93276d9a5b5df475c9f6007265692632d8e7222

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I295d2591d535b039634689524a29725e963ebbe5
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30407
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9474 tests: add the stack_trap() utility function 71/30371/2
Quentin Bouget [Tue, 17 Oct 2017 19:14:41 +0000 (19:14 +0000)]
LU-9474 tests: add the stack_trap() utility function

This patch implements the stack_trap() function and uses it in
test_24d of sanity-hsm (where the need for it first arose).

The stack_trap() function is meant to be used to register multiple
cleanup actions on a single sigspec (most likely EXIT). Over time,
any call to bash's trap builtin in tests should be replaced by a call
to stack_trap().

Note that cleanup functions do not need to start with "trap - EXIT".
Each test is run in a subshell of its own (in run_one_logged()) and
therefore traps do not leak from one test to another. This is true
with or without this patch.

This is a port to b2_10 of
Lustre change: https://review.whamcloud.com/#/c/29653/
Lustre commit: 1dfda720c080e39890e5a659a30c8988ca498a7c

Test-Parameters: trivial testlist=sanity-hsm,sanity-hsm
Change-Id: I47f92a963f094d3d7055592a748e81ce357bff75
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-on: https://review.whamcloud.com/29653
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dominique Martinet <dominique.martinet@cea.fr>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
(cherry picked from commit 1dfda720c080e39890e5a659a30c8988ca498a7c)
Reviewed-on: https://review.whamcloud.com/30371
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10330 tests: fix version check in sanity.sh test_101g 65/30365/5
Emoly Liu [Wed, 6 Dec 2017 07:06:00 +0000 (15:06 +0800)]
LU-10330 tests: fix version check in sanity.sh test_101g

The 16MB RPC patch is available in 2.7.x, so one more version
check needs to be added to 2.7.17 or later to avoid interop
failure.

Test-Parameters: trivial

Change-Id: I6eeefbf74017aaeeb8998accd6da04d8de75606c
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/30365
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9872 tests: modify check space requirements for NFS test 53/30353/2
James Nunez [Mon, 20 Nov 2017 04:22:38 +0000 (21:22 -0700)]
LU-9872 tests: modify check space requirements for NFS test

In parallel-scale-nfs testing, the Lustre clients NFS mounts
the Lustre file system. In some cases, the file system looks
like it has enough space (du) to run NFS testing, but one or
more OSTs is full or is almost full. Since the default striping
for Lustre is a single stripe, some NFS tests will fail because
the file it is writing gets written to that almost full OST.

Increase the default stripe to all OSTs for all
parallel-scale-nfs tests.

Lustre-change: https://review.whamcloud.com/29786
Lustre-commit: 0b8e9558e88930814857c97dfe2394f8c8e24a9a

Test-Parameters: trivial testlist=parallel-scale,parallel-scale-nfsv3,parallel-scale-nfsv4
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iff187dc6c158d9063cd36ced0801b88cdc8814ae
Reviewed-by: James Casper <jamesx.casper@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30353
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9509 tests: fix compilebench timeout 52/30352/2
Jadhav Vikram [Thu, 9 Feb 2017 06:25:57 +0000 (11:55 +0530)]
LU-9509 tests: fix compilebench timeout

With ext4 and lustre found compilebench always takes more time in
create dir operation whenever previous same test aborted without
deleting directory. As per test board result, found compilebench
test ran from suite parallel-scale-nfs.sh timedout before running
from suite parallel-scale.sh, so 1st timedout compilebench not
clear data, rerunning compilebench again causes timeout.

Fix is creating different directory on each run of compilebench.

Lustre-change: https://review.whamcloud.com/27131
Lustre-commit: d15fe1fbb261107b021cd6ebe8b8c435d2148e0f

Seagate-bug-id: MRP-3753
Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Reviewed-by: Alexander Lezhoev <alexander.lezhoev@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Change-Id: I9b47e28fe5c638f4167c05fb68e46ec5e90de09e
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30352
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9997 ldlm: check lock cancellation in ldlm_cli_cancel() 39/30339/2
Jinshan Xiong [Fri, 15 Sep 2017 19:23:58 +0000 (19:23 +0000)]
LU-9997 ldlm: check lock cancellation in ldlm_cli_cancel()

In that case, the assert for 'list_empty(&lock->l_bl_ast)' will fail
because the lock is already in a cancel list.

This patch checks if the lock is already being canceled in prior.

Lustre-change: https://review.whamcloud.com/29080
Lustre-commit: f4ea4017b4d6a420146b2959f9feb11866858b4a

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I04b9df789cf3b3b5e6dd61a647376307f9975f4a
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30339
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9894 lfsck: Print correct lfsck start info 65/30265/2
Patrick Farrell [Mon, 21 Aug 2017 09:45:05 +0000 (04:45 -0500)]
LU-9894 lfsck: Print correct lfsck start info

When printing which scan type was started, lfsck iterates
through an array of types and compares the given type to
the types in the array.  Type numbers are a bit mask.

However, LFSCK_TYPES_SUPPORTED and LFSCK_TYPES_DEF are the
full mask, and they are the first in the array.  This means
we always match LFSCK_TYPES_SUPPORTED, which results in
always printing "all" as the type of scan.

Reorder the struct to increasing bit order to fix this.

Test-Parameters: trivial testlist=sanity-scrub,sanity-lfsck
Lustre-change: https://review.whamcloud.com/28604
Lustre-commit: 0c6805b2a0d575331dff0c22a657da91f61a1809

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ibc82369ff6531b56ceda4b1c0a833720dc61f3f4
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30265
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-6210 utils: Use C99 initializer for lfsck_types_names 64/30264/2
Steve Guminski [Fri, 19 May 2017 19:25:37 +0000 (15:25 -0400)]
LU-6210 utils: Use C99 initializer for lfsck_types_names

This patch makes no functional changes.  The lfsck_types_names
struct initializer in lustre_lfsck.c is updated to C99 syntax.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/27791
Lustre-commit: a1d62378ed98e2663c1f95f955433e2a5b13d68c

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I8a3b44b56263b00a926550e4122193300c0c399f
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9860 tests: Add conf-sanity tests to ALWAYS_EXCEPT list 16/30216/2
James Nunez [Fri, 11 Aug 2017 19:45:52 +0000 (13:45 -0600)]
LU-9860 tests: Add conf-sanity tests to ALWAYS_EXCEPT list

The following tests fail when run with a separate MDS and MGS:
conf-sanity tests 33a, 43b, 53b, 54b, 70e, 80, 84, 87, 100,
102, 103, 104, 105 and 107.
We need to add these tests to the ALWAYS_EXCEPT list
when running with a separate MDS and MGS.

Test-Parameters: trivial combinedmdsmgs=false testlist=conf-sanity envdefinitions=SLOW=yes
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I1b17714216e14ad04eb9a492cb5f1aa4ed82bd1a
Reviewed-on: https://review.whamcloud.com/28497
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Dilip Krishnagiri <dilipx.krishnagiri@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit 5297bfa671bd2cbb18fb3188c4d9e3b8edf3284a)
Reviewed-on: https://review.whamcloud.com/30216
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9899 tests: mount client on MGS for ost-pools 15/30215/2
James Nunez [Mon, 21 Aug 2017 22:26:30 +0000 (16:26 -0600)]
LU-9899 tests: mount client on MGS for ost-pools

When a Lustre configuration has the MGS and MDS on separate
nodes, the file system must be mounted on the MGS to allow
OST pools to work properly.

Add the ability to mount the file system on the MGS when
necessary for the Lustre test suite ost-pools.sh.

Test-Parameters: trivial testlist=ost-pools
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iff0663a38b92bb8e71c313897b12fca98fdae932
Reviewed-on: https://review.whamcloud.com/28638
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Arshad Hussain <arshad.hussain@seagate.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit bb4c3bc38eeeeec111c14c024669465addb30c70)
Reviewed-on: https://review.whamcloud.com/30215
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10255 tests: Fix wrong comparison operator in sanity 129 51/30151/2
Nikolay Borisov [Fri, 17 Nov 2017 14:23:04 +0000 (16:23 +0200)]
LU-10255 tests: Fix wrong comparison operator in sanity 129

Currently sanity 129 uses numerica (-eq) operator to check whether
the has_warning variable is true or false depending on whether
expected warnings have been detected. This is wrong since bash
doesn't really have bolean types and true/false are not evaluated to
1/0. This results in the following bash error when the test is run:

    ./sanity.sh: line 9244: [: true: integer expression expected

Fix it by using the correct string operator '=' to check for
correct value.

Test-Paramters: clientdistro=sles12sp2 testlist=sanity
Test-Paramters: clientdistro=sles12sp3 testlist=sanity

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Change-Id: I071dcb3001ea9b2e5806d346dcd48bfcaf3297e9
Reviewed-on: https://review.whamcloud.com/30151
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10217 test: Make sanity 248 work with newer dds 44/30144/2
Nikolay Borisov [Thu, 9 Nov 2017 10:39:19 +0000 (12:39 +0200)]
LU-10217 test: Make sanity 248 work with newer dds

This patch fixes 2 problems when working with value from dd.

Firstly, extraction of the readings from dd rely on them always
being in field number 6. However, that's not true for newer dd
versions where the output has changed and the time reading is now in
field number 10. So to make the code more generic and work with both
old and new outputs switch to using an egrep regular expression to
extract the correct field.

Secondly, dd can output its time in scientific notation, with
decimal and floating point portion being separated by a comma rather
than a dot:
   4096 bytes (4,1 kB, 4,0 KiB) copied, 9,1229e-05 s, 44,9 MB/s

Unforuntately this is not understood by bc so it needs to be
processed by substituting the comma for a dot and also expanding
the scientific notation to multiplication of 10 to the correct power.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Change-Id: I83ec659874ffe702c68f94f828827ff93325db72
Reviewed-on: https://review.whamcloud.com/30144
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9660 ptlrpc: do not wakeup every second 69/29969/4
Alex Zhuravlev [Tue, 29 Aug 2017 12:08:42 +0000 (15:08 +0300)]
LU-9660 ptlrpc: do not wakeup every second

Even if there are no RPC requests on the set, there is no need to
wake up every second. The thread is woken up when a request is added
to the set or when the STOP bit is set, so it is sufficient to only
wake up when there are requests on the set to worry about.

Lustre-change: https://review.whamcloud.com/28776
Lustre-commit: e81847bd06519dd9847c31244abe6da978bcd016
Change-Id: Iac01d8c46e8645ecb6303ce72e0f6c59f16dcd5d
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29969
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10011 utils: suppress annoying messages for project quota 00/29600/4
Wang Shilong [Tue, 19 Sep 2017 13:10:48 +0000 (21:10 +0800)]
LU-10011 utils: suppress annoying messages for project quota

See following output:

[wsl@w003 ~]$ lfs quota /lustre1
Disk quotas for usr wsl (uid 14434):
      Filesystem  kbytes   quota   limit   grace   files   quota limit
grace
        /lustre1       0       0       0       -       0 0       0       -
Disk quotas for grp se (gid 1000):
      Filesystem  kbytes   quota   limit   grace   files   quota limit
grace
        /lustre1   44028       0       0       -      40 0       0       -
Unexpected quotactl error: Operation not supported
Disk quotas for prj <unknown> (pid 0):
      Filesystem  kbytes   quota   limit   grace   files   quota limit
grace
        /lustre1     [0]     [0]     [0]       -     [0]     [0] [0]       -
Some errors happened when getting quota info. Some devices may be not
working or deactivated. The data in "[]" is inaccurate.

Since project quota is disabled in default, unsupported project
quota messages will be annoying here.

Even Project quota is enabled, project id 0 will be outputed here,
it dose not make much sense either, instead, lfs quota <mnt> will only
output current user/group quota information in default

Lustre-change: https://review.whamcloud.com/29107
Lustre-commit: 0ba70b538768871f8504aca1ed6a24472f46a87d

Change-Id: Ie76ba14c4c4486a9246aafed0e8538eaae85ee98
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29600
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10098 scripts: Fix mounted check in Lustre RA 52/29352/5
Nathaniel Clark [Fri, 6 Oct 2017 16:49:23 +0000 (12:49 -0400)]
LU-10098 scripts: Fix mounted check in Lustre RA

The "Lustre" resource agent for pacemaker can mis-identify a resource
as being mounted if it's mountpoint is a substring match for anything
else in /proc/mounts.  Change the lustre_is_mounted() function to
check to make sure it's a lustre fs mounted at mountpoint and the
"source" (i.e. device) is the target we expect.

Lustre-change: https://review.whamcloud.com/29351
Lustre-commit: df96fab178534adb34067b20490a2d0629aabe2f

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib877b0dc3d3ce0d93fd4663aa2418ac21d670428
Reviewed-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/29352
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>