Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-9320 test: Skip sanity test_80[12]* 16/26616/3
Saurabh Tandan [Fri, 14 Apr 2017 00:55:35 +0000 (17:55 -0700)]
LU-9320 test: Skip sanity test_80[12]*

Skip sanity test_80[1-2]* if MDS or OSS version is before
2.9.55

Skipping following tests: test_801a, test_801b, test_801c,
test_802

Test-Parameters: trivial testlist=sanity,sanity
Signed-off-by: Saurabh Tandan <saurabh.tandan@intel.com>
Change-Id: I98ace61c312466381ffcc406644276d86faac782
Reviewed-on: https://review.whamcloud.com/26616
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
6 years agoLU-9383 test: use a subdir in sanityn test_71b() 71/26771/2
John L. Hammond [Fri, 21 Apr 2017 14:16:25 +0000 (09:16 -0500)]
LU-9383 test: use a subdir in sanityn test_71b()

In sanityn test_71b() use a test specific subdir to avoid changing the
default file striping on the filesystem root.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic3bfbf24a9f6d00f07392014b48af0c5062756f6
Reviewed-on: https://review.whamcloud.com/26771
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
7 years agoLU-9318 test: sanity-lsnapshot skipped for all non-zfs configs 00/26600/3
Saurabh Tandan [Thu, 13 Apr 2017 18:08:44 +0000 (11:08 -0700)]
LU-9318 test: sanity-lsnapshot skipped for all non-zfs configs

The problem with the script was that it tried to check
for ZFS file system after the script tried to add snapshot
to the debug list.

As part of solution the script just needs to check for ZFS
file system or the version is too old at the start for of
the script.

Test-Parameters: trivial testlist=sanity-lsnapshot,sanity-lsnapshot,sanity-lsnapshot
Signed-off-by: Saurabh Tandan <saurabh.tandan@intel.com>
Change-Id: Ie59dac7543d1e35b924c84d19c34a5ec5b903a14
Reviewed-on: https://review.whamcloud.com/26600
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9271 tests: remove unnecessary sanity-scrub test delay 57/26457/3
Fan Yong [Tue, 22 Nov 2016 17:39:05 +0000 (01:39 +0800)]
LU-9271 tests: remove unnecessary sanity-scrub test delay

In sanity-scrub test_5, we want to check the OI scrub state machine.
For that, we inject some failure stub to delay the test for checking
status. But sometimes, we want to check the status within some short
time that may be not enough because of the injected test delay. This
patch removes one unnecessary status checking since it has been done
in former check. On the other hand, the subsequent checking also can
indicate the correctness of the skipped status.

Test-parameters: trivial

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I14b5096db3d7ca255f3de1a8853dde85ead54215
Reviewed-on: https://review.whamcloud.com/26457
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9314 osd: cleaup qsd once commit callbacks are done 96/26496/4
Alex Zhuravlev [Tue, 11 Apr 2017 07:01:23 +0000 (10:01 +0300)]
LU-9314 osd: cleaup qsd once commit callbacks are done

otherwise osd_trans_commit_cb() calling qsd_op_end() may
find qsd structure released.

Change-Id: Ifd64b17d636f5e728ed6a4ad1a2d4d43998c90ec
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/26496
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9287 kernel: kernel update [SLES11 SP4 3.0.101-97] 36/26336/3
Bob Glossman [Mon, 3 Apr 2017 23:03:36 +0000 (16:03 -0700)]
LU-9287  kernel: kernel update [SLES11 SP4 3.0.101-97]

Update SLES11 SP4 kernel to 3.0.101-97

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I5214114b5c0bb0bfe5a68dbe8cf2a1f26705d352
Reviewed-on: https://review.whamcloud.com/26336
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9275 kernel: kernel update [SLES12 SP2 4.4.49-92.14] 63/26263/3
Bob Glossman [Thu, 30 Mar 2017 15:56:29 +0000 (08:56 -0700)]
LU-9275 kernel: kernel update [SLES12 SP2 4.4.49-92.14]

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: I1d9c109904a61989b8eeb82c21ab99154db464cf
Reviewed-on: https://review.whamcloud.com/26263
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-930 doc: update LFSCK documentation 53/26253/3
Andreas Dilger [Wed, 29 Mar 2017 21:53:49 +0000 (15:53 -0600)]
LU-930 doc: update LFSCK documentation

Update the LFSCK usage document to include information about logging
LFSCK changes to the console or separate log file.

Improve the description of some options, putting more commonly-used
options first.

Update URLs to reference lustre.org instead of other websites.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I980a43143297400c0a544281b716c32881d65172
Reviewed-on: https://review.whamcloud.com/26253
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Joseph Gmitter <joseph.gmitter@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9259 tests: set fail_loc on the right MDT 25/26225/2
Fan Yong [Sun, 13 Nov 2016 11:14:48 +0000 (19:14 +0800)]
LU-9259 tests: set fail_loc on the right MDT

In sanity test_17o, we need to set the fail_loc on the MDT on which
the target file resides. So "getstripe -M" should be done after the
file created. In further client side ldlm locks should be cancelled
before failover the MDT.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I35acefb6b7a361f25593843e1f2a097e786e5f11
Reviewed-on: https://review.whamcloud.com/26225
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9166 mdt: Add trailing newlines to proc files 77/25977/4
Steve Guminski [Tue, 21 Mar 2017 19:04:19 +0000 (15:04 -0400)]
LU-9166 mdt: Add trailing newlines to proc files

Adds trailing newlines to two proc files.  A new sanity test ensures
that all non-empty readable proc files end with a newline.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Id65dd5a43edc41be9f572d476b38975f0144fbaf
Reviewed-on: https://review.whamcloud.com/25977
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9076 ptlrpc: Prevent possible dereference of NULL pointers 09/25909/2
Steve Guminski [Wed, 1 Mar 2017 18:46:19 +0000 (13:46 -0500)]
LU-9076 ptlrpc: Prevent possible dereference of NULL pointers

Check pointers for NULL before passing to other functions.

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I5ad1e6675e9c5e41aee2dc59045ed67e9da5ea0d
Reviewed-on: https://review.whamcloud.com/25909
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9186 tests: fix sanityn test_76 and related code 47/25847/6
Andreas Dilger [Tue, 7 Mar 2017 03:05:42 +0000 (20:05 -0700)]
LU-9186 tests: fix sanityn test_76 and related code

Fix sanityn.sh test_76 to skip already open files when checking
whether mdt.*.exports.*.open_files accurately lists open files.
Otherwise, if some previous test leaves a file descriptor open
it will cause this test to fail spuriously.

Limit the number of open files to 256*MDSCOUNT rather than 2048,
so the test runs faster (80s vs. 215s in my VM with 2 MDTs).

Properly close the open shell FDs using "FD<&-" rather than
redirecting them to /dev/null, otherwise they stay open forever.

Print a '.' only once per 32 files opened/closed.

List open files in *.open_files in the order they were opened,
rather than reverse order, since this makes it easier to see which
files have been open longer.

Print out the pathname of the open files being skipped.

Don't explicitly mount $MOUNT2 in sanityn.sh.  This is already
handled inside check_and_setup_lustre() at the start of sanityn.sh.

Improve free_fd() to accept a "last_fd" argument to avoid searching
all open FDs on each call if it is known the fds are not closing.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I274b6db96f49a52c086f836c005558ef4b3ebbe5
Reviewed-on: https://review.whamcloud.com/25847
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9184 grants: move grant code to the target 20/25820/7
Mikhal Pershin [Tue, 6 Dec 2016 11:06:48 +0000 (14:06 +0300)]
LU-9184 grants: move grant code to the target

Make grants code common for MDT and OST.
- move grants field from OFD to the lu_target
- same for statfs
- make ofd_grants.c independent from OFD
- move ofd_grants.c to the tgt_grants.c

This work was done for Data-on-MDT feature but it
is needed also for better space control on MDT as
well, e.g. for lfsck, HSM, etc.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I43930b32b271c9e850aa2783795e7cce12830cd5
Reviewed-on: https://review.whamcloud.com/25820
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9183 libcfs: handle dump_trace() and related callbacks removal 16/25816/6
Dmitry Eremin [Thu, 2 Mar 2017 19:23:00 +0000 (22:23 +0300)]
LU-9183 libcfs: handle dump_trace() and related callbacks removal

In commit c8fe4609827aedc9c4b45de80e7cdc8ccfa8541b all previous users
of dump_trace() have been converted to use the new unwind interfaces,
so the dump_trace() and the related print_context_stack() and
print_context_stack_bp() callback functions were removed.

Test-Parameters: trivial
Change-Id: Ifa7a112d622b23f733d6daab05f9838afdf31a86
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25816
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-3434 scripts: check for mdsfilesystemtype= option 04/25804/2
Andreas Dilger [Sat, 4 Mar 2017 05:27:32 +0000 (22:27 -0700)]
LU-3434 scripts: check for mdsfilesystemtype= option

Check if the Test-Parameters line is using the old mdsfilesystemtype=
option and ask for it to be removed.  The mdtfilesystemtype= option
should be used instead.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I52765fd94f4dec896593c86763737fa64f3ebbe5
Reviewed-on: https://review.whamcloud.com/25804
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Charlie Olmstead <charlie.olmstead@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9171 osc: GPF while doing ELC with no_wait_policy 00/25700/4
Andriy Skulysh [Wed, 1 Mar 2017 18:34:11 +0000 (20:34 +0200)]
LU-9171 osc: GPF while doing ELC with no_wait_policy

osc_ldlm_weigh_ast() uses osc_object from ldlm_lock
without taking a reference.

It should take a reference like osc_ldlm_glimpse_ast()/
osc_dlm_blocking_ast0() does.

Change-Id: I33a817e4c08c2955f5395b13ffe8cd11f3bdf691
Seagate-bug-id: MRP-4179
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: https://review.whamcloud.com/25700
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7502 utils: add --mdt-count & --mdt-hash options 15/25515/10
Yang Sheng [Mon, 10 Apr 2017 07:31:26 +0000 (15:31 +0800)]
LU-7502 utils: add --mdt-count & --mdt-hash options

    lfs find --mdt-count and --mdt-hash options
    lfs getdirstripe --mdt-count and --mdt-hash options

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I55f2d7660c4e4fea5a197a57407b614c4004974c
Reviewed-on: https://review.whamcloud.com/25515
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4423 osc: use 64-bit timestamps in debugfs output 07/25407/14
Arnd Bergmann [Thu, 30 Mar 2017 13:32:59 +0000 (09:32 -0400)]
LU-4423 osc: use 64-bit timestamps in debugfs output

Some lustre debugfs files contain the current time. Make sure
we use a format here that does not overflow in 2038.

Linux-commit: 86655400c6e74751a73be82ea40d5ae6979c3225

Change-Id: I8a79e60bd15ce7c162b30025ca3b572fec2ee58f
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25407
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8603 test: Separate tests in metadata_updates 50/24450/5
James Nunez [Tue, 20 Dec 2016 21:12:28 +0000 (14:12 -0700)]
LU-8603 test: Separate tests in metadata_updates

The metadata-updates script is one continuous piece of code
that runs three different tests. These tests need to be broken
out into sub-tests and some of the comments echoed to the
console should be logged.

Test-Parameters: trivial testlist=metadata-updates
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I7e420ee8e0e02d2c2a66ac644301bb457a8b2256
Reviewed-on: https://review.whamcloud.com/24450
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8703 libcfs: use int type for CPT identification. 04/23304/6
Dmitry Eremin [Fri, 21 Oct 2016 12:10:39 +0000 (15:10 +0300)]
LU-8703 libcfs: use int type for CPT identification.

This patch bring the lustre CPT code into alignment with the Linux kernel.

 * use int type for CPT identification like CPU identification.
 * fix coding style.

Change-Id: I5df33f37757eb6d47ab4e824ec1b800a40730f61
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23304
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7819 tests: fix checkfiemap for stripecount > 1 79/18679/9
Ashish Purkar [Fri, 26 Feb 2016 04:55:47 +0000 (20:55 -0800)]
LU-7819 tests: fix checkfiemap for stripecount > 1

If sanityn test_71 is ran with stripecount > 1, it fails
with "error while ioctl 95" i.e. EOPNOTSUPP.

FIEMAP_FLAG_DEVICE_ORDER flag must be set while issuing
FS_IOC_FIEMAP ioctl.

New test case 71b to check fiemap for stripe count > 1
Renamed original test_71 to 71a

Test-Parameters: trivial testlist=sanityn envdefinitions=ONLY=71
Seagate-bug-id: MRP-2858
Signed-off-by: Ashish Purkar <ashish.purkar@seagate.com>
Change-Id: If62370fbcfd586607e0f0da2b348070641bed0d1
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@seagate.com>
Reviewed-on: https://review.whamcloud.com/18679
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
7 years agoLU-7529 test: fix tiny problems of tests in conf-sanity.sh 07/17507/11
teddy [Sun, 9 Apr 2017 03:14:33 +0000 (11:14 +0800)]
LU-7529 test: fix tiny problems of tests in conf-sanity.sh

1)test_68:
Mount MGS in the end of test if MGS and MDS are seperated.
2)test_75:
Reformat all devices otherwise 76a might fail.

Change-Id: Iee8a5fa1c6acccbae86cdcbe14c8715a71b0ae2b
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: teddy <jjkky@yahoo.com>
Reviewed-on: https://review.whamcloud.com/17507
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9307 lov: NULL pointer deref in lov_delete_composite 56/26456/2
Bobi Jam [Sun, 9 Apr 2017 09:12:19 +0000 (17:12 +0800)]
LU-9307 lov: NULL pointer deref in lov_delete_composite

When lov_init_composite() cannot allocate memory and bails out,
lov_delete_composite() is then called, and it should check the
composite entry's existence before trying to delete each component.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I013c596a19a114b763f3eebbaafa1559fa09d8d9
Reviewed-on: https://review.whamcloud.com/26456
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9019 quota : migrate to 64 bit time 52/26452/2
James Simmons [Sat, 8 Apr 2017 16:52:15 +0000 (12:52 -0400)]
LU-9019 quota : migrate to 64 bit time

Replace cfs_time_current_sec() to avoid the overflow
issues in 2038 with ktime_get_real_seconds(). The
quota uses the libcfs 64 bit time abstraction it
developed before the linux kernel has created its
own. Replace all the libcfs 64 bit time handle with
generic time64_t handling.

Change-Id: Ibf9475c7ba8312561a57d48516ffa9b0b3ae4112
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/26452
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9286 ptlrpc: fix wrong error handlers 19/26319/2
Alexander Boyko [Mon, 3 Apr 2017 11:35:53 +0000 (14:35 +0300)]
LU-9286 ptlrpc: fix wrong error handlers

If ptlrpc_request_pack finish with 0, we need to call
ptlrpc_req_finished for later errors.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-4285
Change-Id: I97dec565c1aa95c4457b32cb5d72b4f8abdd3d1d
Reviewed-on: https://review.whamcloud.com/26319
Tested-by: Jenkins
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9207 test: Add new disk image for 2.9.0 92/26292/5
Wei Liu [Fri, 31 Mar 2017 21:48:39 +0000 (14:48 -0700)]
LU-9207 test: Add new disk image for 2.9.0

Add new disk image for 2.9.0 of both ldiskfs and zfs
for conf-sanity test_32

Test-Parameters: trivial envdefinitions=ONLY=32 testlist=conf-sanity
Test-Parameters: trivial envdefinitions=ONLY=32 testlist=conf-sanity \
mdtfilesystemtype=zfs ostfilesystemtype=zfs

Change-Id: Iab57283e118cf92b19adda5794488cfe7bfcd6c0
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/26292
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9065 osc: fix for cl_env_get in low memory 71/25171/7
Alexander Boyko [Tue, 31 Jan 2017 11:26:24 +0000 (14:26 +0300)]
LU-9065 osc: fix for cl_env_get in low memory

In low memory situation cl_env_get->cl_env_new->kmem_cache_alloc
could fail with ENOMEM error. Some parts doesn`t handle error
case, for example:
...(osc_lock_upcall()) ASSERTION( !IS_ERR(env) ) failed:
...(osc_lock.c:315:osc_lock_upcall()) LBUG

For osc_lock_upcall() the patch changes cl_env_get to
cl_env_percpu_peek, this prevents memory allocation and
couldn`t fail in low memory case.
For osc_extent_truncate() the patch adds error handle.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Change-Id: I4fbca9f3bdc77a5c52979eeb0e00e915ff9ad9b0
Seagate-bug-id: MRP-4120
Reviewed-on: https://review.whamcloud.com/25171
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9019 obd: remove s2dhms time function 69/23269/4
James Simmons [Thu, 30 Mar 2017 17:49:13 +0000 (13:49 -0400)]
LU-9019 obd: remove s2dhms time function

Lustre created the s2dhms function to report a time
lapse in a days:hour:minute:seconds format. This is
over kill so remove s2dhms and just report the number
of seconds that has lapse.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I834661e57bf14c5ae397a40784bdec69b9bd55a8
Reviewed-on: https://review.whamcloud.com/23269
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8998 misc: minor clean ups 86/26486/4
Andreas Dilger [Fri, 7 Apr 2017 22:34:04 +0000 (16:34 -0600)]
LU-8998 misc: minor clean ups

Use LCME_ID_INVAL instead of comparing component IDs to 0.

Swab layout fields in lfsck_lmm2layout() to match existing usage.

Handle the (potential) case where LCME_ID_MAX isn't ~LCME_ID_MASK.

Fix man page dates.

Test-Parameters: trivial testlist=sanity-pfl
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I45b10156ac0081b2246b15c6790e42764b5cab07
Reviewed-on: https://review.whamcloud.com/26486
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9187 lfsck: handle parameters properly 49/25849/4
Fan Yong [Tue, 1 Nov 2016 18:48:23 +0000 (02:48 +0800)]
LU-9187 lfsck: handle parameters properly

Currently, because of improper handling the parameters as to
related parameters (such as "failout", "dryrun") only work for
OI scrub, but do not work for namespace LFSCK and layout LFSCK.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ib38f7480758a59ba6a042948a8b49c36b401f100
Reviewed-on: https://review.whamcloud.com/25849
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8119 osd: remove dcb entry from the list prior processing. 02/24202/6
Mikhal Pershin [Wed, 7 Dec 2016 16:23:03 +0000 (19:23 +0300)]
LU-8119 osd: remove dcb entry from the list prior processing.

The osd_trans_commit_cb() processes list of commit callbacks
but there is list_del_init() missed prior calling dcb_func().
The dcb_func() call frees dcb entry itself, so list head become
corrupted. Patch adds this list_del_init().

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I561add170f408a7d16631424218b2a049d81f4fd
Reviewed-on: https://review.whamcloud.com/24202
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9339 ldiskfs: Make ldiskfs buildable on kernels with no project quota 47/26647/3
Oleg Drokin [Sun, 16 Apr 2017 04:50:28 +0000 (00:50 -0400)]
LU-9339 ldiskfs: Make ldiskfs buildable on kernels with no project quota

Update ldiskfs patches to ensure buildability on unpatched rhel7.2/7.3
Also update lustre_user.h definition of LL_IOC_FSSETXATTR in the face
of missing define of FS_IOC_FSSETXATTR

Change-Id: I518e46e727086ed5e10b4820c4e69b2ea896fd43
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/26647
Tested-by: Jenkins
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9339 quota: Replace MAXQUOTAS usage with LL_MAXQUOTAS 48/26648/3
Oleg Drokin [Sun, 16 Apr 2017 06:29:34 +0000 (02:29 -0400)]
LU-9339 quota: Replace MAXQUOTAS usage with LL_MAXQUOTAS

This is especially important when kernel idea of
MAXQUOTAS is smaller than LL_MAXQUOTAS

Change-Id: I0fb8b15a0bab34993e9570efb8de548955962590
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/26648
Tested-by: Jenkins
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
7 years agoLU-9140 tests: disable sanityn test_77j and test_77k 15/26615/2
Andreas Dilger [Thu, 13 Apr 2017 22:57:56 +0000 (16:57 -0600)]
LU-9140 tests: disable sanityn test_77j and test_77k

These tests are failing regularly, disable until fixed.

Test-Parameters: trivial testlist=sanityn
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I9aa88b0a564e6c74e021627bdc372d40df92c3f6
Reviewed-on: https://review.whamcloud.com/26615
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: add project quota support to lfs quota/setquota 55/23955/8
Wang Shilong [Thu, 30 Mar 2017 09:38:07 +0000 (17:38 +0800)]
LU-4017 quota: add project quota support to lfs quota/setquota

This patch adds project quota support to utils,
lfs quota/setquota now could be aware of project quota.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I274949293e098b94b9af4a1de7dd62c643993743
Reviewed-on: https://review.whamcloud.com/23955
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: enable project quota limits 54/23954/14
Li Xi [Wed, 2 Apr 2014 08:26:32 +0000 (16:26 +0800)]
LU-4017 quota: enable project quota limits

With this patch, lctl conf_param can be used to enable
or disable project quota limits

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I051c1395f909891f7e0ff60fa2f98195914cfa4b
Reviewed-on: https://review.whamcloud.com/23954
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: add setting/getting project id function 02/26202/13
Wang Shilong [Mon, 27 Mar 2017 05:43:30 +0000 (13:43 +0800)]
LU-4017 quota: add setting/getting project id function

Extend Attr RPC to support project ID attribute, new
ioctl is introduced to get/set project id, it is kept
same ioctl number as VFS, you could use:

lsattr -p <file>
chattr -p <file>

Redefine LL_MAXQUOTAS as 3, change
@qsd_acct_failed into qqi, otherwise osd-zfs
could not use USR/GRP quota normally.

Remove osd_quota_migration(), it only output
some messages in case upgrading from 1.8 which
give us extra efforts for project quota, remove
it indead.

also fix a typo bug in osp_attr_set().

Change-Id: I4b537be9efa29fda730592b6d5e41c6b60fb6c0d
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/26202
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9278 quota: avoid crash when access failed quota proc file 77/26277/4
Wang Shilong [Fri, 31 Mar 2017 02:50:44 +0000 (10:50 +0800)]
LU-9278 quota: avoid crash when access failed quota proc file

If quota dose not have accounting objects because of failing to
load or unsupported type, @lqp_obj will be NULL, we could not access
directly, add proper handling to avoid following crash

[<ffffffffa0c60730>] ? lprocfs_quota_seq_show+0x460/0x460 [lquota]
[<ffffffff8126bd8f>] proc_reg_open+0x6f/0x100
[<ffffffff811fbfb7>] do_dentry_open+0x1a7/0x2e0
[<ffffffff812a8bfc>] ? security_inode_permission+0x1c/0x30
[<ffffffff8126bd20>] ? proc_reg_release+0x70/0x70
[<ffffffff811fc18f>] vfs_open+0x5f/0xe0
[<ffffffff81209b58>] ? may_open+0x68/0x110
[<ffffffff8120ccfd>] do_last+0x1ed/0x12a0
[<ffffffff8120de72>] path_openat+0xc2/0x490
[<ffffffff8118075b>] ? unlock_page+0x2b/0x30
[<ffffffff8120ffeb>] do_filp_open+0x4b/0xb0
[<ffffffff8121cc77>] ? __alloc_fd+0xa7/0x130
[<ffffffff811fd4f3>] do_sys_open+0xf3/0x1f0
[<ffffffff811fd60e>] SyS_open+0x1e/0x20
[<ffffffff81696d49>] system_call_fastpath+0x16/0x1b

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I8dfc2b35c1f38416ed0f933296bdaa455e117926
Reviewed-on: https://review.whamcloud.com/26277
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-4017 quota: add project id support 12/25812/10
Oleg Drokin [Sun, 9 Apr 2017 07:02:01 +0000 (03:02 -0400)]
LU-4017 quota: add project id support

This patch is infrastrcuture change for Lustre project quota,
project ID is considered as file attribute like UID/GID,
MDS will return back project id to client upon open/getattr.

Extend llog_setattr64_rec_v2 to be able to store project
ID, upgrade from old format could be handled properly,
if you want to downgrade again, need to make sure llog
have been handled completely.

Change-Id: Id7d27188f22169d6cffb74ea8b792ad4b133ef1d
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/25812
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
7 years agoLU-4017 ldiskfs: export __ext4_ioctl_setproject for lustre 45/23945/12
Wang Shilong [Wed, 19 Aug 2015 09:56:09 +0000 (05:56 -0400)]
LU-4017 ldiskfs: export __ext4_ioctl_setproject for lustre

Export this helper so that lustre can save project id to
MDS and OST objects

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I5c374e6dc7a509c0cbd46ac383b8d99f7f67d6b6
Reviewed-on: https://review.whamcloud.com/23945
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: add project quota support for Lustre 47/23947/12
Li Xi [Wed, 2 Apr 2014 07:26:59 +0000 (15:26 +0800)]
LU-4017 quota: add project quota support for Lustre

Thsi patch adds necessary support of project quota,
so that OSTs can be mounted successully

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I0c56b14b4ebb0b495497d2f05981a03218f686d7
Reviewed-on: https://review.whamcloud.com/23947
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: add project quota support to system header 46/23946/10
Li Xi [Thu, 3 Apr 2014 07:47:21 +0000 (15:47 +0800)]
LU-4017 quota: add project quota support to system header

System header contains the quota macros. Project quota support
should be added to it so that user space utils can be compiled
successfully

This patch redefines some macros in the system header file,
which avoids to change the sytem header file directly.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I1ed8014b1050684891df43d4c3db3c2e90b7814c
Reviewed-on: https://review.whamcloud.com/23946
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4017 quota: cleanup codes of quota for new type 94/18894/17
Oleg Drokin [Sat, 8 Apr 2017 18:11:42 +0000 (14:11 -0400)]
LU-4017 quota: cleanup codes of quota for new type

This patch cleanups codes of quota to prepare for
new type other than USRQUOTA/GRPQUOTA.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I5b6fadf4eead957c8c94c91a4993de8798d87d3d
Reviewed-on: https://review.whamcloud.com/18894
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
7 years agoLU-4017 ldiskfs: add project quota support 70/17770/27
Wang Shilong [Thu, 31 Dec 2015 11:51:05 +0000 (19:51 +0800)]
LU-4017 ldiskfs: add project quota support

Pick following patchs from upstream:

commit 847aac644e92e5624f2c153bab409bf713d5ff9a
vfs: Add general support to enforce project quota limits
This patch adds support for a new quota type PRJQUOTA for
project quota enforcement. Also a new method get_projid()
is added into dquot_operations structure.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
commit 334e580a6f97e2e84d1c19a8679603956acaa622
fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion
Hoist the ioctl definitions for the XFS_IOC_FS[SG]SETXATTR
API from fs/xfs/libxfs/xfs_fs.h to include/uapi/linux/fs.h
so that the ioctls can be used by all filesystems,
not just XFS. This enables (initially) ext4 to use
the ioctl to set project IDs on inodes.

Based-on-patch-from: Li Xi <lixi@ddn.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Above two chages are wrapped into vfs-project-quotas-rhel7.patch

commit 040cb3786d9b25293b8b0b05b90da0f871e1eb9b
ext4: adds project ID support

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Jan Kara <jack@suse.cz>
commit 689c958cbe6be4f211b40747951a3ba2c73b6715
ext4: add project quota support
This patch adds mount options for enabling/disabling project quota
accounting and enforcement. A new specific inode is also used for
project quota accounting.

[Includes fix from Dan Carpenter to correct error checking from dqget(). ]

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Jan Kara <jack@suse.cz>
commit 9b7365fc1c82038faa52d56173b20221cf422cbe
ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support
This patch adds FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR ioctl interface
support for ext4. The interface is kept consistent with
XFS_IOC_FSGETXATTR/XFS_IOC_FSGETXATTR.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Jan Kara <jack@suse.cz>
This patch add ldiskfs project quota support
Did following adjustment from original patches:

1.adds padding structure to superblock, so that @s_prj_num is
in the same position of superblock from upstream.

2.Patch aslo disable kabi check for rhel7, since
any of vfs patch's include files change will break the check

Also fix conf-sanity: test_55, because now debugfs output
Project ID, we should output file size.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I2392f402d9853af969e4cd37318a83f2c4941c3e
Reviewed-on: https://review.whamcloud.com/17770
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8998 pfl: PFL feature implementation 23/26423/3
Jinshan Xiong [Sat, 8 Apr 2017 18:03:13 +0000 (14:03 -0400)]
LU-8998 pfl: PFL feature implementation

Merge remote-tracking branch 'origin/pfl'

Please check out the HLD of PFL here:
        http://wiki.lustre.org/PFL_Prototype_High_Level_Design

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ide007c7fffc17dc6a51500b537f19d2391387f9d

7 years agoLU-9300 test: need copytool setup for sanity-hsm 1b 34/26434/3
Bobi Jam [Fri, 7 Apr 2017 03:12:10 +0000 (11:12 +0800)]
LU-9300 test: need copytool setup for sanity-hsm 1b

sanity-hsm test_1b() needs setup/cleanup copytool in the test.

Test-Parameters: trivial testlist=sanity-hsm,sanity-pfl
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I40b083db37eb4e764e06606d0912ac635dc8c2a1
Reviewed-on: https://review.whamcloud.com/26434
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-7659 mdc: expose changelog through char devices 00/18900/15
Henri Doreau [Wed, 13 Jan 2016 14:53:00 +0000 (15:53 +0100)]
LU-7659 mdc: expose changelog through char devices

Register one character device per MDT in order to allow non-llapi to
read them and to make delivery more efficient.

- open() spawns a thread to prefetch records and enqueue them into a
  local buffer (unless the device is open in write-only mode).
- lseek() can be used to jump to a specific record, in which case the
  offset is a record number (with SEEK_SET) or a number of records to
  skip (SEEK_CUR). Movement can only be done forward.
- read() copies records to userland. No truncation happens, so short
  reads are likely.
- write() is used to transmit control commands to the device.
  The only available one is changelog_clear, which is done by writing
  "clear:cl<user>:<recno>" into the device.
- close() terminates the prefetch thread if any, and releases resources.

It is possible to poll() on the device to get notified when new records
are available for read.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I14709fdbac76b5512e58099e4e536cf9c973868c
Reviewed-on: https://review.whamcloud.com/18900
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9165 pfl: MDS handling of write intent IT_LAYOUT RPC
Bobi Jam [Wed, 1 Mar 2017 09:25:49 +0000 (17:25 +0800)]
LU-9165 pfl: MDS handling of write intent IT_LAYOUT RPC

* Instantiate the OST objects of the 1st component of the PFL when its
  data are being created or its layout being set.

* Hence component_add won't instantiate OST objects, the instantiation
  is relayed to later write/truncate access.

* When the client tries to write beyond OST-object-instantiated extent
  range, it will issue an IT_LAYOUT intent lock RPC, indicating the
  write range, MDS needs to handle this RPC to allocate all OST
  objects of components covering the range.

* MDS also needs to handle the replay of write intent IT_LAYOUT RPC,
  which contains the current layout objects which the client knows, so
  that MDS won't initialize those objects again.

Reviewed-on: https://review.whamcloud.com/25717

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Idcb242af55788dd8d7f01a6ecec4fbe508375512
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-9008 pfl: dynamic layout modification with write/truncate
Bobi Jam [Thu, 6 Apr 2017 00:13:41 +0000 (08:13 +0800)]
LU-9008 pfl: dynamic layout modification with write/truncate

* in lov_init_composite(), skip init sub object without LCME_FL_INIT
  layout component.
* issue layout intent RPC during write/trunc ops when try to write to
  an un-init-ed component (even if at the lock stage).
* After layout intent RPC issued, restart the IO.
* get rid of unused lov_layout_operations::llo_install() interface.
* add an empty mdt_layout_change() interface to handle intent layout
  write RPC.

Reviewed-on: https://review.whamcloud.com/25317

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I2f79482187d2af2660dd86e55da3f5dc0138e94a
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 pfl: test cases for lfsck on PFL
Fan Yong [Thu, 6 Apr 2017 00:11:24 +0000 (08:11 +0800)]
LU-8998 pfl: test cases for lfsck on PFL

New test cases for check and repair inconsistent PFL
files, and related failures injections.

Reviewed-on: https://review.whamcloud.com/24884

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I102079f6a4bbdd4b1ca2739524e0e21ef5f79b98
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 docs: add llapi_ man pages to Makefile.am
Andreas Dilger [Thu, 6 Apr 2017 00:10:32 +0000 (08:10 +0800)]
LU-8998 docs: add llapi_ man pages to Makefile.am

Reformat lustre/doc/Makefile.am to have one entry per line to
match master, so the merge is more straight forward.

Add the llapi_layout_comp_*.3 and llapi_layout_file_comp_*.3 man
pages to lustre/doc/Makefile.am so they are included into the RPMs.

Replace references to the non-existent "liblustreapi.7" man page
with "lustreapi.7" instead, and add all llapi_* man pages to it.

Remove the long-obsolete llbackup.8 man page.

Reviewed-on: https://review.whamcloud.com/26275

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Change-Id: Ic97ea204f9635668fd5a4448687019f84f5cab07
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 docs: add lfs-setripe manpage to dist
Jinshan Xiong [Thu, 6 Apr 2017 00:09:18 +0000 (08:09 +0800)]
LU-8998 docs: add lfs-setripe manpage to dist

It's missing from commit a1e0fd6f.

Reviewed-on: https://review.whamcloud.com/26268

Test-Parameters: trivial
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I8212cb1e48faaa6b19cd58d1ea6ab00a6f78644c
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8998 pfl: layout LFSCK handles PFL file
Fan Yong [Thu, 6 Apr 2017 00:07:12 +0000 (08:07 +0800)]
LU-8998 pfl: layout LFSCK handles PFL file

Enhance the layout LFSCK logic to handle the PFL file,
including all the inconsistent cases corresponding to
the non-PFL file cases. In addition, for PFL file, the
LFSCK can also verify and recover the PFL extent range.

Reviewed-on: https://review.whamcloud.com/24883

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iec5ac57fd556330130e33f187c6fbf8cc24e67b8
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 pfl: enhance PFID EA for PFL
Fan Yong [Thu, 6 Apr 2017 00:05:05 +0000 (08:05 +0800)]
LU-8998 pfl: enhance PFID EA for PFL

This is a misc patch that contains some adjustments to
store more stripe information in the OST-object's PFID
EA (XATTR_NAME_FID), including:

1) For regular file, store the stripe count and stripe
   size information in its OST-object's PFID EA. These
   information are necessary for the LFSCK to recover
   the MDT-object layout EA from orphan OST-object(s).

2) In addition, for PFL file, store the FPL component
   ID and extent information in its OST-object's PFID
   EA also. These information are also necessary for
   the LFSCK to recover the MDT-object PFL layout EA
   from orphan OST-object(s).

3) For ldiskfs backend, there may be not enough space
   in inode body (256 bytes by default) to hold the
   enlarged PFID EA. To avoid performance trouble if
   store the enlarged PFID EA in separated block, we
   make some hack (for the device with 256 bytes or
   smaller inode) inside osd-ldiskfs via merging the
   PFID EA into the LMA EA (XATTR_NAME_LMA) to save
   EA entry space, then allows both the original LMA
   EA and the PFID EA to be filled in the inode body
   without performance trouble. For that, introduce
   two compat flags: LMAC_STRIPE and LMAC_PFL.

4) It is client duty to transfer the stripe and PFL
   information to the OST via the write, setattr and
   punch RPC. Then OST will store these information
   in the PFID EA.

5) On the other hand, to recover the lost or crashed
   MDT-object's layout EA from orphan OST-object(s),
   the LFSCK on the OST needs to return the orphan's
   stripe and PFL (if have) information to the MDT.
   Originally, we only returned the MDT-object's FID
   (and owner) information. Now, we need to return
   related layout information also. For such purpose,
   new structure 'lu_orphan_rec_v2' replaces the old
   'lu_orphan_rec', and the idx_info::ii_recsize is
   used to indicates whether new 'lu_orphan_rec_v2'
   or old ''lu_orphan_rec' is used.

Reviewed-on: https://review.whamcloud.com/24882

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5a69dbe91b1f83eeb394ce54453352d84a285193
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 docs: man pages for composite layout APIs
Niu Yawei [Tue, 23 Feb 2016 09:27:25 +0000 (04:27 -0500)]
LU-8998 docs: man pages for composite layout APIs

Added man pages for the new layout component interfaces:

llapi_layout_comp_add(3)
llapi_layout_comp_del(3)
llapi_layout_comp_extent_get(3)
llapi_layout_comp_extent_set(3)
llapi_layout_comp_flags_get(3)
llapi_layout_comp_flags_set(3)
llapi_layout_comp_flags_clear(3)
llapi_layout_comp_id_get(3)
llapi_layout_comp_move(3)
llapi_layout_comp_move_at(3)
llapi_layout_file_comp_add(3)
llapi_layout_file_comp_del(3)

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I8fd466b9cb0352bb7812f0b748816801f20f5e71
Reviewed-on: https://review.whamcloud.com/25740
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8054 lfsck: enhance lfsck notify API
Fan Yong [Thu, 6 Apr 2017 00:04:04 +0000 (08:04 +0800)]
LU-8054 lfsck: enhance lfsck notify API

Originally, the lfsck_in_notify() contains too much functionalities,
including both the remote LFSCK control and local LFSCK notification.
These LFSCK requirements/callers share the structure "lfsck_request"
to transfer kinds of data, as to it is very difficult to enhance the
"lfsck_request" for more local LFSCK requirements. Because enlarging
or adjusting the "lfsck_request" fields will affect the LFSCK RPC on
wire protocol and cause interoperability issues.

The patch splits the local LFSCK notifications from lfsck_in_notify(),
and introduce new LFSCK API lfsck_in_notify_local() for them. Then
even if we have more local LFSCK requirements in the future, we can
enhance such API freely without affecting LFSCK RPC protocol.

Reviewed-on: https://review.whamcloud.com/24881

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8f285c6680de66a73050e167dc3874a4f6bf4ad0
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8050 osp: not use obdo::o_lcookie for non-onwire RPC data
Fan Yong [Fri, 22 Apr 2016 23:46:32 +0000 (07:46 +0800)]
LU-8050 osp: not use obdo::o_lcookie for non-onwire RPC data

Originally, obdo::o_lcookie is for destroy with unlink cookie from
MDS, it is obsolete in 2.8. And then, it is reused by the OSP to
avoid RAM allocations. But now, we needs more fields in the obdo
structure to transfer more information from client to OST. The
obdo::o_lcookie is good candidate. So this patch adjust OSP
logic to NOT use such field for non-onwire RPC data usage.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2bff0dce6f00f330657097a9ae9f775396e090cb
Reviewed-on: https://review.whamcloud.com/24876
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
7 years agoLU-8998 utils: enlarge default inode size
Niu Yawei [Tue, 10 May 2016 03:30:24 +0000 (23:30 -0400)]
LU-8998 utils: enlarge default inode size

Composite layout consumes more EA space, to hold a typical 3
components composite layout in inode, the default inode size
on MDT needs be bumped from 512 bytes to 1024 bytes. The default
OST inode size is changed from 256 bytes to 512 bytes as well,
because there will be more composite layout information stored
in OST object EA.

Performance tests shows that increased default inode size doesn't
impact performance, following are few numbers from the mdtest
result:

                  create  stat  removal  tree-create tree-remove
512/256 (origin): 16543  47292  32826    48          22
1024/512 (new)  : 16903  47404  32114    55          20

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ic5c08fd514f1111343f11129b1503a5ba2265ec7
Reviewed-on: https://review.whamcloud.com/24873
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
7 years agoLU-8998 tests: test scripts for PFL
Bobi Jam [Thu, 6 Apr 2017 00:01:31 +0000 (08:01 +0800)]
LU-8998 tests: test scripts for PFL

Added test scripts sanity-pfl.sh for PFL.

Reviewed-on: https://review.whamcloud.com/24872

Test-Parameters: testlist=sanity-pfl
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I2a09282d7ce26fc2b683eba994cfc63cd1ce166d
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 docs: man pages for tools of PFL
Niu Yawei [Wed, 24 Feb 2016 07:28:30 +0000 (02:28 -0500)]
LU-8998 docs: man pages for tools of PFL

Added new options to 'lfs find' and 'lfs getstripe' for composite
files. Moved "lfs setstripe/migrate" into separate man page, and
added new options for the operations to composite file.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9cafde834be5c3d890bf04a3efb2ea973364596a
Reviewed-on: https://review.whamcloud.com/25741
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 lfs: user space tools for PFL
Niu Yawei [Wed, 5 Apr 2017 23:59:49 +0000 (07:59 +0800)]
LU-8998 lfs: user space tools for PFL

* 'lfs getstripe' to support composite file:

   --component-count:
   Display component count only;

   --component-id|-I [comp_id]:
   When 'comp_id' is provided, display components matching the
   provided 'copm_id', otherwise, display component ID only;

   --component-flags [flags]:
   When the 'flags' is provided, dispaly components contains the
   provided 'flags', otherwise, display component flags only;

   --component-start [[+-]start]:
   When '[+-]start' is provided, display components which have
   'at most' or 'at least' or exactly same extent start, otherwise,
   display component extent start only;

   --component-end|-E [[+-]end]:
   When '[+-]end' is provided, display components which have
   'at most' or 'at least' or exactly sme extent end, otherwise,
   display component extent end only;

* 'lfs find' to support composite file:

   --component-count <[+-]count>:
   Find composite files according to component count;

   --component-flags <flags>:
   Find composite files according to component flags;

   --component-start <[+-]start>:
   Find composite files according to component extent start;

   --component-end|-E <[+-]end>:
   Find composite files according to component extent end;

* 'lfs setstripe' to support composite file:

   --component-del [-I <comp_id> | --component-flags <flags>] filename
   Delete specified component(s) from existing composite file;

   --component-add -E <end1> [stripe options]
                              -E <end2> [stripe options] ...:
   Add component(s) to an existing composite file;

   -E <end1> [stripe options] -E <end2> [stripe options] ...:
   Create composite file with specifed layout components;

* 'lfs migrate' to support migrate composite files:
   - composite layout-> plain layout;
   - plain layout -> composite layout;
   - composite layout -> composite layout;

Reviewed-on: https://review.whamcloud.com/24867

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ib0d3eeb7927cf83a173099c474df6539d1264370
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 lustreapi: composite llapi_layout
Niu Yawei [Thu, 28 Jan 2016 07:04:02 +0000 (02:04 -0500)]
LU-8998 lustreapi: composite llapi_layout

Extend the llapi_layout API to support composite layout.

- llapi_layout_comp_add():
  Add one component to an existing layout, the layout will
  be turned into composite if it was plain before adding.

- llapi_layout_comp_del():
  Delete current layout component from a composite layout,
  the component to be deleted must be the tail of layout
  component list, and it can't be the last one.

- llapi_layout_comp_extent_get/set():
  Get/Set current component extent of a layout. When set
  component extent, the layout will be turned into composite
  if it was plain.

- llapi_layout_comp_flags_get/set/clear():
  Get/Set/Clear current component flags of a composite layout.

- llapi_layout_comp_id_get():
  Get current component ID of a composite layout.

- llapi_layout_comp_move_at():
  Move the current component to a component with specified ID.

- llapi_layout_comp_move():
  Move the current component to a specified position: FIRST,
  NEXT, or LAST.

- llapi_layout_file_comp_add():
  Add component(s) to an existing composite file.

- llapi_layout_file_comp_del():
  Delete component(s) from an existing composite file.

- llapi_layout_file_comp_set():
  Set certain attribute of the specified layout component(s). Not
  implemented in PFL phase 2.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I44094149636be3162fc7f8b75a90c64abf2c3c02
Reviewed-on: https://review.whamcloud.com/24866
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
7 years agoLU-8998 clio: getstripe support comp layout
Niu Yawei [Thu, 12 Jan 2017 14:48:19 +0000 (09:48 -0500)]
LU-8998 clio: getstripe support comp layout

{get/set}stripe support composite layout

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Iafe5205a79f721be1ec5ec83ab80a86a4b537e18
Reviewed-on: https://review.whamcloud.com/24851
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 clio: Client side implementation for PFL
Bobi Jam [Wed, 5 Apr 2017 23:58:41 +0000 (07:58 +0800)]
LU-8998 clio: Client side implementation for PFL

Make client layer support composite layout.

Plain layout will be stored in LOV layer as a composite layout
containing a single component.

Reviewed-on: https://review.whamcloud.com/24850

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ic3b85a4b10c66745e5c72ff02ea313baa0b12bb5
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
7 years agoLU-8998 lov: add composite layout unpacking
Bobi Jam [Wed, 5 Apr 2017 23:57:54 +0000 (07:57 +0800)]
LU-8998 lov: add composite layout unpacking

Update struct lov_stripe_md to accommodate composite layouts. Add
methods to unpack composite layouts.

Reviewed-on: https://review.whamcloud.com/24849

Change-Id: Ife0b2ae7671dd0ec0020a1da04e7261ef9f7e5f3
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8998 lod: accomodate to composite layout
Bobi Jam [Wed, 5 Apr 2017 23:56:43 +0000 (07:56 +0800)]
LU-8998 lod: accomodate to composite layout

Modify the LOD to make it support the composite layout:

- Introduced lod_layout_component structure to represent each
  individual layout component, and added ldo_comp_entries and
  ldo_comp_cnt in the lod_object structure to hold the striping
  information for composite layout.

- Object allocation code is adjusted to not only check the used
  OSTs in this round of allocation, but also the used OSTs in
  the existing layout components.

- Support special xattr names to add/set/delete layout component(s).

- Store default layout xattr on the filesystem root inode.

Reviewed-on: https://review.whamcloud.com/24823

Change-Id: I73736df1cd529a3b0e32b2bb6a09b5c436e08c86
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
7 years agoLU-8998 pfl: Basic data structures for composite layout
Niu Yawei [Wed, 11 Jan 2017 02:56:38 +0000 (21:56 -0500)]
LU-8998 pfl: Basic data structures for composite layout

Added basic structures and magic numbers for composite layout.

Test-Parameters: trivial
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I02b4347d4959a935d4120d23f3c7b73511883a3f
Reviewed-on: https://review.whamcloud.com/24822
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9281 test: stop using invalid ps option 98/26298/4
Bob Glossman [Sat, 1 Apr 2017 20:49:20 +0000 (13:49 -0700)]
LU-9281 test: stop using invalid ps option

Use of the '-q' option in a ps commend was introduced in sanity.sh
test_161d by the recent commit ee25babfe72378f9496a9732742984f26eb7d4a5.
Thst option isn't valid in all versions of ps.  It doesn't exist in any
sles version.

Use the '-p' option which exists everywhere instead.

Test-Parameters: clientdistro=sles12sp2 testgroup=review-ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I143be0c1ad633889c9ed3ff7f5cb38bf54feb19a
Reviewed-on: https://review.whamcloud.com/26298
Tested-by: Jenkins
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9245 utils: fix string copy handling within lgss_sk 65/26165/4
Chris Hanna [Thu, 23 Mar 2017 18:20:46 +0000 (14:20 -0400)]
LU-9245 utils: fix string copy handling within lgss_sk

Strings are not copied correctly when the fsname or nodemap field of
a shared key is replaced. Instead of being zero-terminated, the new
string may overlap the original if it is smaller.

Fixed by using the buffer length instead of the string length in
strncpy().

Change-Id: I17bb5aa0ca7c25b2545c17c6f23e69045730a547
Test-Parameters: trivial
Signed-off-by: Chris Hanna <hannac@iu.edu>
Reviewed-on: https://review.whamcloud.com/26165
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Kit Westneat <kit.westneat@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-9236 kernel: new kernel RHEL 6.9 [2.6.32-696.el6] 11/26111/2
Bob Glossman [Tue, 21 Mar 2017 17:51:29 +0000 (10:51 -0700)]
LU-9236 kernel: new kernel RHEL 6.9 [2.6.32-696.el6]

Changes to support new kernel version in new el6.9 release distro
New kernel-config and target files.
Revised base kernel and ldiskfs patches.
Small adjustments to lbuild and autoconf.

Test-Parameters: clientdistro=el6.9 mdsdistro=el6.9 ossdistro=el6.9

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Idd341e4db98c3e6e91c9d8696a9a5e7f03ded6fe
Reviewed-on: https://review.whamcloud.com/26111
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8066 obd: make version_show sysfs compliant 32/25632/6
James Simmons [Thu, 9 Mar 2017 18:35:31 +0000 (13:35 -0500)]
LU-8066 obd: make version_show sysfs compliant

A patch was pushed upstream that added "lustre: "
to the lustre version sysfs file. This was
rejected due to the one item per sysfs rule.
Recently a patch was landed to update the
lustre tools to handle "lustre: " missing. Since
this is the case we can bring the version
sysfs file into compliance.

Change-Id: I74568d581b176c802f132cef3c022fe0fdded164
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25632
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8843 build: fix all remaining less than 0 comparison for unsigned values 84/25384/6
James Simmons [Tue, 28 Mar 2017 14:35:32 +0000 (10:35 -0400)]
LU-8843 build: fix all remaining less than 0 comparison for unsigned values

Remove the rest of the test of less than zero for unsigned values
found with -Wtype-limits.

Change-Id: I4ca764f359605a452cf4934e6a93106e91d2cc32
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25384
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8236 nrs: Add wildcard support for JOBID TBF rule 23/24523/7
Qian Yingjin [Thu, 12 Jan 2017 02:50:10 +0000 (10:50 +0800)]
LU-8236 nrs: Add wildcard support for JOBID TBF rule

This patch adds wildcard support for JOBID TBF rule.
The following kind of wildcard matching rules can be
used:
start ruleName jobid={dd.*} rate=20
start ruleName jobid={*.500} rate=10
start ruleName jobid={prog*.10*} rate=15

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I0a4c44fd15533dfccd9f6ab7374a0a7a24b1403e
Reviewed-on: https://review.whamcloud.com/24523
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
7 years agoLU-8823 ptlrpc: remove obsolete OST/MDT thread parameters 05/23705/3
Andreas Dilger [Thu, 10 Nov 2016 19:11:47 +0000 (12:11 -0700)]
LU-8823 ptlrpc: remove obsolete OST/MDT thread parameters

The mdt_num_threads parameter was only briefly available from 2.0-2.2,
while mds_num_threads has been available since 1.x to control the
number of service threads on the MDS respectively.  A warning message
is printed on startup since 2.3 if mdt_num_threads parameters were in
use, so there shouldn't be any users anymore.

The ost_num_threads parameter has been deprecated since 1.6 or so.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I587a1f3e4629d304412006a0f0e9fc1daeacab07
Reviewed-on: https://review.whamcloud.com/23705
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8152 utils: improve “lfs df” to show device status 30/23330/9
Jian Yu [Fri, 9 Dec 2016 06:39:37 +0000 (22:39 -0800)]
LU-8152 utils: improve “lfs df” to show device status

This patch improves “lfs df” to check OS_STATE_* flags,
and show the device status as follows:

D stands for OS_STATE_DEGRADED
R stands for OS_STATE_READONLY
S stands for OS_STATE_ENOSPC
I stands for OS_STATE_ENOINO

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ic7389d935f1258bc4217dfe36fcbf2b468b14f20
Reviewed-on: https://review.whamcloud.com/23330
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>
7 years agoLU-8458 pacemaker: Script to monitor Server status 97/22297/7
Gabriele Paciucci [Mon, 8 Aug 2016 16:29:24 +0000 (17:29 +0100)]
LU-8458 pacemaker: Script to monitor Server status

A new script to be used in Pacemaker to monitor
the Lustre Servers status compatible with ZFS and
LDISKFS based Lustre server installations.

This RA is able to monitor a Lustre Server
using the Pacemaker's clone technology.

pcs resource create [Resource Name] ocf:lustre:healthLUSTRE
dampen=[seconds 5s]
--clone

where:
* dampen The time to wait (dampening) further changes occur

This script should be located in /usr/lib/ocf/resource.d/lustre/
of both the Lustre servers with permission 755.

Test-Parameters: trivial
Signed-off-by: Gabriele Paciucci <gabriele.paciucci@intel.com>
Change-Id: Ibfbad748e8c1b0c7faecc91984def87002070033
Reviewed-on: https://review.whamcloud.com/22297
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7470 nrs: extend TBF with NID/JobID/OPCode expression 45/17345/15
Qian Yingjin [Mon, 13 Jun 2016 01:27:00 +0000 (09:27 +0800)]
LU-7470 nrs: extend TBF with NID/JobID/OPCode expression

Extend the NRS TBF policy to support complex rules with
expressions of NID/JobID/OPCode conditions.

Start the generic extended TBF policy:
    lctl set_param ost.OSS.ost_io.nrs_policies="tbf"

Following rule is valid:
    lctl set_param ost.OSS.ost_io.nrs_tbf_rule=
"start $NAME opcode={ost_write}&jobid={dd.0},
 nid={192.168.1.[1-128]@tcp 0@lo} rate=100"
In the rule:
"&" represents the conditional conjunction;
"," represents the conditional disjunction;

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I7541f9d09b2a952853eab97f0aa23f53e2c30a12
Reviewed-on: https://review.whamcloud.com/17345
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1538 tests: improve sanityn test_51 error messages 56/5256/7
Andreas Dilger [Sat, 2 Feb 2013 09:02:40 +0000 (02:02 -0700)]
LU-1538 tests: improve sanityn test_51 error messages

While changing sanityn.sh it caused test_51[abc] to fail in an
obscure manner, and no error messages were being printed or
reporting test failures.

Improve the messages in these tests and fix some code style.

Test-Parameters: trivial testlist=sanityn
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I798f6a7f5ab40714e867b537f4e32e59ea500c1e
Reviewed-on: https://review.whamcloud.com/5256
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8900 tests: add snapshot in racer tests 99/26199/3
Fan Yong [Sun, 13 Nov 2016 09:34:10 +0000 (17:34 +0800)]
LU-8900 tests: add snapshot in racer tests

To check whether snapshot may cause trouble or not.

Test-Parameters: trivial envdefinitions=SLOW=yes,RACER_ENABLE_SNAPSHOT=true mdtfilesystemtype=zfs ostfilesystemtype=zfs mdscount=2 mdtcount=4 testlist=racer
Test-Parameters: trivial envdefinitions=SLOW=yes,RACER_ENABLE_SNAPSHOT=false mdtfilesystemtype=zfs ostfilesystemtype=zfs mdscount=2 mdtcount=4 testlist=racer
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I09dababec7175c95f1a21519460e75e82ef7bc2f
Reviewed-on: https://review.whamcloud.com/26199
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoNew tag 2.9.55 2.9.55 v2_9_55 v2_9_55_0
Oleg Drokin [Wed, 5 Apr 2017 05:59:28 +0000 (01:59 -0400)]
New tag 2.9.55

Change-Id: Ib04394e3a8c49dc5050ee12d8de5e559b031c34a
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9222 build: workaround for sles11sp4 MOFED 45/26045/2
Minh Diep [Thu, 16 Mar 2017 20:26:17 +0000 (13:26 -0700)]
LU-9222 build: workaround for sles11sp4 MOFED

MOFED assume that kernel-source is in the
standard place /usr/src but lbuild is using
different directory

Change-Id: I236659baf344cb3b3dcb62840c576c55febc1523
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/26045
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-2435 osd-zfs: use zfs native dnode accounting 94/15294/28
Jinshan Xiong [Fri, 17 Feb 2017 02:09:33 +0000 (18:09 -0800)]
LU-2435 osd-zfs: use zfs native dnode accounting

If ZFS userobj_accounting feature exists, use it for osd-zfs object
accounting; otherwise estimate object use by block space.

Disable quota check in conf-sanity:32b and sanity-quota:7e if the
underlying zfs version is below 0.7.0. For conf-sanity test, if the
running ZFS is version 0.7.0 or higher, upgrade the zpool image to
enable native dnode accounting. That ensures we also test the upgrade
procedure.

Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity-quota,sanity-quota,sanity-quota,conf-sanity,conf-sanity envdefinitions=SLOW=yes
Change-Id: I0fe47fd0e3d787663a4c72fd708678827fdfb474
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: https://review.whamcloud.com/15294
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9224 fid: race between client_fid_fini and seq_client_flush 79/26079/4
Fan Yong [Tue, 8 Nov 2016 16:47:59 +0000 (00:47 +0800)]
LU-9224 fid: race between client_fid_fini and seq_client_flush

When the client mount failed or umount, the client_fid_fini() will
be called. At that time, the async connection failure will trigger
seq_client_flush() which parameter may have been released by the
client_fid_fini() by race.

Introduce client_obd::cl_seq_rwsem to protect client_obd::cl_seq.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I96b195676b0d1356a8ae7438cdf69d2e258abd23
Reviewed-on: https://review.whamcloud.com/26079
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9019 obd: use 64-bit time for obd_recovery_* fields 04/25604/7
James Simmons [Thu, 23 Mar 2017 13:56:52 +0000 (09:56 -0400)]
LU-9019 obd: use 64-bit time for obd_recovery_* fields

The obd_recovery_* fields stores absolute times in 32-bit
time_t quantities, which will overflow in 2038. This
changes it to use time64_t.

Change-Id: I59e41bc876eeeb563921abb764cafc7e40781aad
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25604
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9129 llite: ignore layout for ll_writepages() 74/25474/3
Jinshan Xiong [Wed, 15 Feb 2017 19:16:59 +0000 (11:16 -0800)]
LU-9129 llite: ignore layout for ll_writepages()

ll_writepages() would be called inside the direct IO context and
if the layout has been changed during this time, the layout_conf()
has to wait for active IO to complete before applying the layout
change, this is a case of deadlock.

It should ignore layout to avoid this problem. This is safe as long
as pages exist, the layout won't be changed on this client.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I457133a4a30215b8513d5eaec449fc129cc43a3e
Reviewed-on: https://review.whamcloud.com/25474
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9088 osd: use od_is_ost check OST FID 30/25330/2
wangdi [Thu, 15 Dec 2016 21:06:43 +0000 (16:06 -0500)]
LU-9088 osd: use od_is_ost check OST FID

Because OST FLDB is not created until 2.6, so
if the DNE system is upgraded from 2.5 to >=
2.6, then the local FLDB will not be loaded
in fld_index_init(), which might cause OSD
can not tell OST FID created by 2.5. So let's
use od_is_ost in this case.

Change-Id: I5da3e95bc24e43aca1b3c840df427cc5a7306194
Signed-off-by: wangdi <di.wang@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/25330
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-6401 uapi: split lustre_disk.h into two headers 94/25194/11
James Simmons [Thu, 23 Mar 2017 15:09:30 +0000 (11:09 -0400)]
LU-6401 uapi: split lustre_disk.h into two headers

The header lustre_disk.h is used by both user and
kernel space but it contains kernel specific material.
Split out the material that is used by both user land
and kernel space into a new header. Change the utilities
over to using this new UAPI header while the lustre
kernel code keeps using the kernel version of
lustre_disk.h.

Change-Id: I2cc75e4e465e17cc45bebb3b61e2e16d4bd615f0
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25194
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7131 utils: add "--erase-param" option to tunefs.lustre 59/16359/17
Nikitas Angelinas [Fri, 30 Oct 2015 04:08:00 +0000 (12:08 +0800)]
LU-7131 utils: add "--erase-param" option to tunefs.lustre

This patch is to fix the following issues:

- A new option "--erase-param" is added to tunefs.lustre, which allows
to remove all instances of a specific parameter.

- The behavior of option "--param" is improved a little. It will erase
all previously stored instances of the parameter, and then store all
new values specified in the command line.

- For zfs only, the patch introduces a "null value" rule in the form
of "<key>=" to mark a property to be removed from dataset by
zfs_write_ldd() finally.

- To keep the right semantics, if "--erase-params" is specified, all
old parameters should be erased before any new changes are done.

- test_89 conf-sanity.sh is added to verify these new features.

Seagate-bug-id: MRP-153
Signed-off-by: Nikitas Angelinas <nikitas.angelinas@seagate.com>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ibc8d81227045471b8e5c56c7faf1275ad8bbbf86
Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-on: https://review.whamcloud.com/16359
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8900 doc: Lustre snapshot man page 70/24270/13
Fan Yong [Tue, 18 Oct 2016 00:36:57 +0000 (08:36 +0800)]
LU-8900 doc: Lustre snapshot man page

To describe how to use barrier and snapshot commands.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia1833ddd2949aaf5b63411214310c7792b41384d
Reviewed-on: https://review.whamcloud.com/24270
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8900 snapshot: user space snapshot tools 69/24269/19
Fan Yong [Sat, 12 Nov 2016 20:59:11 +0000 (04:59 +0800)]
LU-8900 snapshot: user space snapshot tools

The user space snapshot tools are implemented as part of the
lctl tools set. They use other user-space tools, such as lctl
commands for write barrier on all MDTs, fork/erase Lustre
configuration, zfs/zpool commands for backend zfs snapshot.

1. Create the snapshot
lctl snapshot_create [-b | --barrier [on | off]]
[-c | --comment comment] <-F | --fsname fsname> [-h | --help]
<-n | --name ssname> [-r | --rsh remote_shell]
[-t | --timeout timeout]

2. Destroy the snapshot
lctl snapshot_destroy [-f | --force] <-F | --fsname fsname>
[-h | --help] <-n | --name ssname> [-r | --rsh remote_shell]

3. Modify the snapshot
lctl snapshot_modify [-c | --comment comment]
<-F | --fsname fsname> [-h | --help] <-n | --name ssname>
[-N | --new new_ssname] [-r | --rsh remote_shell]

4. Query the snapshot(s)
lctl snapshot_list [-d | --detail] <-F | --fsname fsname>
[-h | --help] [-n | --name ssname] [-r | --rsh remote_shell]

5. Mount the snapshot
lctl snapshot_mount <-F | --fsname fsname> [-h | --help]
<-n | --name ssname> [-r | --rsh remote_shell]

6. Umount the snapshot
lctl snapshot_umount <-F | --fsname fsname> [-h | --help]
<-n | --name ssname> [-r | --rsh remote_shell]

The system config information, such as each target's hostname,
pool name, local filesystem name, role, index, and so on, will
be written in the snapshot config file "/etc/ldev.conf". To be
compatible with old snapshot usage, it will firstly check whether
the "/etc/ldev.conf" exists or not, it yes, it will load the
configuration from such file preferentially, otherwise, the file
"/etc/lsnapshot/${fsname}.conf" will be used.

Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs mdscount=2 mdtcount=4 testlist=sanity-lsnapshot
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I1191c2ea35c355e8554bd2bd022c1b9d32741392
Reviewed-on: https://review.whamcloud.com/24269
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9231 tests: cleanup obdecho before iokit exit 92/26092/2
Fan Yong [Mon, 14 Nov 2016 16:34:53 +0000 (00:34 +0800)]
LU-9231 tests: cleanup obdecho before iokit exit

Otherwise under some failure cases, it may leave the
FID_SEQ_LOCAL_NAME local object which is used by the
obdecho in the system, then the subsequent tests can
NOT exit cleanly.

Lustre-commit: c5675497b411d8b3f0f08fec3271fd528b4a52cf
Lustre-change: http://review.whamcloud.com/23738

Test-Parameters: alwaysuploadlogs envdefinitions=PTLDEBUG=-1,DEBUG_SIZE=150 mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs clientdistro=el7 ossdistro=el7 mdsdistro=el7 mdscount=2 mdtcount=4 testlist=mds-survey,mmp,mds-survey,mmp,mds-survey,mmp
Signed-off-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I741cf20875df679ecdf72d5461cc14eec166e3ae
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: https://review.whamcloud.com/26092
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9223: Server on Linux 4.4: XATTR_NAME_POSIX_ACL_ACCESS 76/26076/2
Keith [Fri, 17 Mar 2017 19:11:16 +0000 (15:11 -0400)]
LU-9223: Server on Linux 4.4: XATTR_NAME_POSIX_ACL_ACCESS

Add linux/xattr.h to Lustre_compat.h to allow the server
code to Build in Linux 4.4.

Change-Id: Iccf87acffc04d7c1084a384ae146d1077eed53fd
Signed-off-by: Keith <keith.mannthey@intel.com>
Reviewed-on: https://review.whamcloud.com/26076
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9197 llog: return 0 if llog destroy fails 69/26069/2
Di Wang [Wed, 8 Mar 2017 14:04:42 +0000 (09:04 -0500)]
LU-9197 llog: return 0 if llog destroy fails

In llog_cancel_rec(), let's return 0 if only destroying the
final plain llog fails, because the bitmap has been cleared
successfully, and the orphan supposed to be handled by LFSCK
anyway. So let's not try to destroy again, which will pretty
much complicate the code here.

And also in this case, we do not need restore the llh_count and
bitmap, because the record has been deleted for llog anyway.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I762def0f0de08a2960997ab9463f4e72fbad531d
Reviewed-on: https://review.whamcloud.com/26069
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9213 scripts: check MGT status in lustre init script 95/25995/3
Jian Yu [Wed, 15 Mar 2017 06:44:13 +0000 (23:44 -0700)]
LU-9213 scripts: check MGT status in lustre init script

This patch fixes health_check() in lustre init script to
account for the status of MGT on a dedicated node.

Test-Parameters: trivial

Change-Id: Ifdf2e4a1002e870c25925b6e7fce82b132cc24f2
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: https://review.whamcloud.com/25995
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-6051 utils: improve efficiency of lfs_migrate cmp 78/25878/2
Andreas Dilger [Wed, 8 Mar 2017 00:12:18 +0000 (17:12 -0700)]
LU-6051 utils: improve efficiency of lfs_migrate cmp

The file comparison used by lfs_migrate could be more efficient by
using the "cmp -s" option to avoid printing byte-by-byte differences.
This allows faster comparisons via memcmp() and comparing the file
size.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I424538388d7e31609fa1f875128f03fef33ebbe5
Reviewed-on: https://review.whamcloud.com/25878
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9170 test: fix for hostlist_expand 98/25698/4
Yang Sheng [Wed, 1 Mar 2017 17:38:53 +0000 (01:38 +0800)]
LU-9170 test: fix for hostlist_expand

Fix string substitution in hostlist_expand. It
may produce a wrong result in some case.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Iba33833ec4955dafeeefe5042508a0162c2d477e
Reviewed-on: https://review.whamcloud.com/25698
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-1095 obdclass: improve missing operation message 86/25586/3
Andreas Dilger [Fri, 2 Oct 2015 19:19:05 +0000 (13:19 -0600)]
LU-1095 obdclass: improve missing operation message

Some tests in the past reported missing OBD operations, so improve
the error message to include the device name to make it easier to
debug where this is happening.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id49ab801158690510f9ac191c4e8f7a253bcab07
Reviewed-on: https://review.whamcloud.com/25586
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9085 llstat: don't use a hash as a reference 20/25320/5
Emoly Liu [Wed, 8 Feb 2017 08:07:30 +0000 (16:07 +0800)]
LU-9085 llstat: don't use a hash as a reference

This patch is to fix "Using a hash as a reference is deprecated"
in llstat file. In the newer perl version, we should use "$xxx"
instead of "%xxx" for a hash reference.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I67a1d1e365076b412550de775b115ac373589c60
Reviewed-on: https://review.whamcloud.com/25320
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8907 llite: handle client racy case during create 96/25296/5
Bruno Faccini [Tue, 7 Feb 2017 11:30:35 +0000 (12:30 +0100)]
LU-8907 llite: handle client racy case during create

Some very infrequent situations exists on client side
able to cause a race during create when concurrent access
by fid occurs. The result of the race can allow a d_alias
to be already present when it was not expected when original
code/LBUG has been written.

One of the identified scenario is when a concurrent access of
inode thru the .lustre/fid/<[FID]> method occurs.

New sanity/test_161d has been added to reproduce this scenario.

Final fix is to remove inaccurate
LASSERT(ll_d_hlist_empty(&inode->i_dentry));
in ll_create_node().

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I1ff19883cc5b53831f1d5c577f4152225fa9e0fb
Reviewed-on: https://review.whamcloud.com/25296
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8930 lfsck: sync failure with others no check LF_INCOMPLETE 00/24900/2
Fan Yong [Wed, 28 Sep 2016 02:32:43 +0000 (10:32 +0800)]
LU-8930 lfsck: sync failure with others no check LF_INCOMPLETE

During the first stage scanning, if the MDT has ever failed to
verfiy some OST-objects (related OSTs inaccessable temporarily
because of network trouble or OSTs restart), it needs to sync
failures with other MDTs at the end of the first stage scanning
to avoid improper repairing in the second stage scanning. Such
sync failure should be done even if the "LF_INCOMPLETE" is set
locally, otherwise, other MDTs may have no chance to know that.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8466d8560b5d5070873f10746189fd82bf6f0172
Reviewed-on: https://review.whamcloud.com/24900
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: Oleg Drokin <oleg.drokin@intel.com>