Whamcloud - gitweb
fs/lustre-release.git
5 years agoNew tag 2.10.5-RC1. 2.10.5-RC1 v2_10_5_RC1
John L. Hammond [Fri, 3 Aug 2018 20:50:01 +0000 (15:50 -0500)]
New tag 2.10.5-RC1.

First release candidate for 2.10.5 release.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ic94d4e47f37fab7400725c7651ebdb3fc94d67a7

5 years agoLU-11069 llite: correct file position after appending writes 61/32661/7
John L. Hammond [Wed, 6 Jun 2018 13:14:50 +0000 (08:14 -0500)]
LU-11069 llite: correct file position after appending writes

In ll_file_io_generic() use the position returned in the kiocb to set
the returned file position. This ensures that the file position is set
correctly after an appending write. Add sanity test_23d() to check
that calling lseek() for the current offset returns the correct value
in this situation.

Lustre-change: https://review.whamcloud.com/32641

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic76ce49db6e87d5294e18546d5b75a12793aa99c
Reviewed-on: https://review.whamcloud.com/32661
Reviewed-by: Jinshan Xiong <jinshan.xiong@gmail.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11149 build: enable KMP for Mellanox build 13/32913/3
Minh Diep [Thu, 19 Jul 2018 14:27:55 +0000 (07:27 -0700)]
LU-11149 build: enable KMP for Mellanox build

* We need to build Mellanox KMP to avoid error
in symbol dependency when installing lustre
* Remove all Mellanox config parameters and use
default
* We won't build with rhel6

Test-Parameters: trivial

Change-Id: I4676d01bd5f788581e1be6df98d2d787a5419c07
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32833
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32913
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11107 mdt: handle nonexistent xattrs correctly 10/32910/2
John L. Hammond [Mon, 2 Jul 2018 15:07:51 +0000 (10:07 -0500)]
LU-11107 mdt: handle nonexistent xattrs correctly

In mdt_getxattr_pack_reply() propagate -ENODATA returns from
mo_xattr_list() to mdt_getxattr(). Add sanity test_102s() to ensure
that getting a nonexistint xattr will fail.

Lustre-change: https://review.whamcloud.com/32753
Lustre-commit: 39c7ac4c0dce3c62795814cd12a78bec1877520b

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ic7a01feb3fcac66d39f84b4ebdfc86025c3e2779
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32910
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-11074 mdc: set correct body eadatasize for getxattr() 01/32901/2
John L. Hammond [Fri, 29 Jun 2018 21:11:45 +0000 (16:11 -0500)]
LU-11074 mdc: set correct body eadatasize for getxattr()

In mdc_intent_getxattr_pack() set mbo_eadatasize to the size of the
xattr values buffer rather than the size of the xattr names buffer.

Lustre-change: https://review.whamcloud.com/32739
Lustre-commit: dea1cde92014545d97406bf8adba20840abdb1a9

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: Ibbed6aba6718f50eed1a08d506d526b1e0e042c8
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32901
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-11167 kernel: new kernel [RHEL6.10 2.6.32-754.el6] 73/32873/3
Jian Yu [Wed, 25 Jul 2018 08:08:54 +0000 (01:08 -0700)]
LU-11167 kernel: new kernel [RHEL6.10 2.6.32-754.el6]

This patch makes changes to support new RHEL 6.10 release
for Lustre client.

Test-Parameters: clientdistro=el6.10

Change-Id: I4cec46b0189f1fc6779e15b6dca76bcf9d607bbc
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32873
Tested-by: Jenkins
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10992 llite: decrease sa_running if fail to start statahead 26/32526/3
Fan Yong [Fri, 4 May 2018 02:18:26 +0000 (10:18 +0800)]
LU-10992 llite: decrease sa_running if fail to start statahead

Otherwise the counter of ll_sb_info::ll_sa_running will leak as
to the umount process will be blocked for ever.

Lustre-change: https://review.whamcloud.com/32287
Lustre-commit:◁6b8638bf792086d9e4b249e95091095bba4ada02

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I6b3a0dfb39f120a0c58184a22211b52376b41bd9
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32526
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10165 llite: disable statahead if starting statahead fail 66/32366/4
Lai Siyao [Fri, 27 Oct 2017 03:48:30 +0000 (11:48 +0800)]
LU-10165 llite: disable statahead if starting statahead fail

Once starting statahead thread fails, it should disable statahead.
Current code only does this when "sai != NULL", instead it should
check whether current process is opening this dir, so for cases
like current file is not the first dirent, or sai allocation fail,
it won't retry statahead.

Lustre-change: https://review.whamcloud.com/29817
Lustre-commit: 8b1bd1b88ae915c89fcbdc83abebe217a681a9e7

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Iaedddd3659cdffeab51800f45b02f0b39c4a1ec1
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/32366
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10683 osd_zfs: set offset in page correctly 99/32899/2
Hongchao Zhang [Thu, 5 Jul 2018 11:44:38 +0000 (07:44 -0400)]
LU-10683 osd_zfs: set offset in page correctly

In osd_bufs_get_write, the offset in the first page should
Lustre-change the offset parameter instead of zero.

Lustre-change: https://review.whamcloud.com/32788
Lustre-commit: 83cb17031913ba2f33a5b67219a03c5605f48f27

Change-Id: I6592d8b5b0162b92953d59e2662a4381ba3e89ba
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32899
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11115 lod: skip max_create_count=0 OST in QoS and RR algorithms 59/32859/2
Jian Yu [Mon, 23 Jul 2018 22:00:46 +0000 (15:00 -0700)]
LU-11115 lod: skip max_create_count=0 OST in QoS and RR algorithms

While choosing OST to create object, both lod_alloc_qos() and
lod_alloc_rr() functions use lod_statfs_and_check() function
to check whether the OST is available for new OST objects or not.
However, OST with max_create_count=0 is not checked in that
function and just returned as an available OST.

This patch fixes the above issue by detecting OST with
max_create_count=0 in lod_statfs_and_check() and skip it.

Change-Id: Ic2129b483ead16f8971a062e326d5ecd537b7e6c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32859
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11159 kernel: kernel update RHEL7.5 [3.10.0-862.9.1.el7] 46/32846/2
Jian Yu [Fri, 20 Jul 2018 07:30:09 +0000 (00:30 -0700)]
LU-11159 kernel: kernel update RHEL7.5 [3.10.0-862.9.1.el7]

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

Change-Id: I7fb8ac89a4e153f47c3339f4047c356e57bd4f99
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32846
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11129 kernel: kernel update RHEL7.5 [3.10.0-862.6.3.el7] 95/32795/3
Yang Sheng [Sun, 8 Jul 2018 16:34:20 +0000 (00:34 +0800)]
LU-11129 kernel: kernel update RHEL7.5 [3.10.0-862.6.3.el7]

Update RHEL7.5 kernel to 3.10.0-862.6.3.el7

Test-Parameters: clientdistro=el7.5 mdsdistro=el7.5   ossdistro=el7.5 mdtfilesystemtype=ldiskfs   ostfilesystemtype=ldiskfs
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I59b362135b5c235ac76848afb2d48014b7a4e928
Reviewed-on: https://review.whamcloud.com/32795
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-11066 systemd: Add IB dependencies to lnet.service 93/32793/2
Nathaniel Clark [Thu, 31 May 2018 14:45:47 +0000 (10:45 -0400)]
LU-11066 systemd: Add IB dependencies to lnet.service

Add ordering for inkernel (rdma.server) and Mellanox MOFED
(openibd.service).

This ensures that systemd will shutdown lnet prior to IB, thus
preventing it from hanging.

Lustre-change: https://review.whamcloud.com/32646
Lustre-commit: 45bb717b9d80bbe95559b45b6a8a6a49ec28e071

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ia0be1ca60eb8f54edd2f4f6bfbca10cbc01cc638
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-on: https://review.whamcloud.com/32793
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-9551 utils: add l_tunedisk to fix disk tunings 83/32583/2
Nathaniel Clark [Wed, 28 Feb 2018 22:18:09 +0000 (17:18 -0500)]
LU-9551 utils: add l_tunedisk to fix disk tunings

This adds l_tunedisk utility to utilize osd_tune_lustre call for
mount_utils.h.  This can be called from udev.
This adds a udev rule to fix disk tunings.
This in some ways duplicates LU-9132, which sets this value at mount
time, but if a multipath component is removed then re-added, the
multipath's max_sectors_kb will not propgate to the newly added device
and this now will cause an error for I/Os that would violate this.

Lustre-change: https://review.whamcloud.com/31464
Lustre-commit: 892280742a2b6347df1464379b3ed223b2961ed4

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8fc7b296c0add29e98b625ac6395a0dee2e376df
Reviewed-on: https://review.whamcloud.com/32583
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
5 years agoLU-10989 utils: correct lustre_rsync changelog clear logic 25/32525/3
John L. Hammond [Wed, 2 May 2018 14:43:07 +0000 (09:43 -0500)]
LU-10989 utils: correct lustre_rsync changelog clear logic

In the non-extended rename case of lr_replicate() copy the record
number from ext to info. Then remove the spurious rename record
handling from lr_clear_cl().

Lustre-change: https://review.whamcloud.com/32247
Lustre-commit: 62ac9c6572e5d42183a9bf5fbbd6a8ead62408cd

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I615ec2f384f5f9d7807156acb3ce66ac47ca1e77
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Jian Yu <jian.yu@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/32525
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10843 mgs: allow snapshot after MGS remount 19/32519/3
Nathaniel Clark [Mon, 16 Apr 2018 21:10:49 +0000 (17:10 -0400)]
LU-10843 mgs: allow snapshot after MGS remount

If the MGS is unmounted/mounted without the MDS reconnecting,
the fsdb FSNAME-barrier would not be created.

This change allows mgs_barrier_freeze (called from snapshot_create)
to attempt the create the required fsdb.

This adds a test to sanity-lsnapshot.sh for this issue.

Test-Parameters: testlist=sanity-lsnapshot mgtfilesystemtype=zfs ostfilesystemtype=zfs mdtfilesystemtype=zfs combinedmdsmgs=false ostcount=2 standalonemgs=true

Lustre-change: https://review.whamcloud.com/31779
Lustre-commit: 2d63d5bc74a5b2477d795bf9e9b0eba94f7fc19f

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2432cc0bdaddb07f024744065ca2ced77288fd7b
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@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/32519
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10214 lnet: allow expressions for route config 48/32248/3
Amir Shehata [Thu, 12 Apr 2018 03:24:43 +0000 (20:24 -0700)]
LU-10214 lnet: allow expressions for route config

Support the ip2nets syntax for route gateway configuration. Only support
a maximum of 128 gateways per configuration command. This upper limit is
to prevent a large number of routes to be configured by mistake. This
feature is available from both command line and YAML interfaces.

Command line examples:
lnetctl route add --net tcp1 --gateway 12.3.4.[2-6]@tcp
lnetctl route del --net tcp1 --gateway 12.3.4.[2-6]@tcp

YAML examples:
route:
    - net: tcp1
      gateway: 12.3.4.[2-20]@tcp

Lustre-change: https://review.whamcloud.com/30511
Lustre-commit: 235e8dea46f6f9ec0021c789cb5b9214cee94e38

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I0d8a0f94cce7140602a64f13f0401ef209f3ca57
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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/32248
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10825 lnet: add ip2nets syntax handling for peer 50/32250/3
Amir Shehata [Fri, 23 Mar 2018 17:04:19 +0000 (10:04 -0700)]
LU-10825 lnet: add ip2nets syntax handling for peer

Allow peers to be added using ip2nets syntax, from
both command line and YAML block.

Command line example:
lnetctl peer add --ip2nets 10.10.10.[3-6,9]@tcp
lnetctl peer del --ip2nets 10.10.10.[3-6,9]@tcp

YAML example:
peer:
    ip2nets:
      - nid: 30.10.10.[3-8]@tcp
      - nid: 40.10.10.[9-40]@tcp

Lustre-change: https://review.whamcloud.com/31786
Lustre-commit: 70c95457f6836a9c0a9e95ae0c4bdd20f99a8747

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I904be8d496ad2be277c3d21dc7f72cbc7ed02b50
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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/32250
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10825 libcfs: generate ip addresses 49/32249/2
Amir Shehata [Mon, 19 Mar 2018 19:37:57 +0000 (12:37 -0700)]
LU-10825 libcfs: generate ip addresses

Add infrastructure API cfs_ip_addr_range_gen() to generate a
maximum of 'count' IP addresses from an expression.

Lustre-change: https://review.whamcloud.com/31785
Lustre-commit: 4c5f788397213aa41356df1f96f7ade58653973a

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I479dd7128eef404106a7863124a38c501150ba9e
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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/32249
Reviewed-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10419 lfsck: no delay for notify RPC 31/30831/2
Fan Yong [Thu, 11 Jan 2018 02:36:18 +0000 (10:36 +0800)]
LU-10419 lfsck: no delay for notify RPC

It is impossible that current MDT has trouble on the connection
with some other MDT(s) or OST(s). Under such case, the LFSCK on
current MDT should skip related MDT(s) or OST(s) to avoid whole
LFSCK process being blocked by the trouble connection or remote
targets via setting the LFSCK notify RPC as rq_no_delay.

This is back ported from master:
lustre-change: http://review.whamcloud.com/30768
lustre-commit: d8827a8ce44db121f80223dc7189e32f5bf3fd45

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ib35080cedcbe49f4ae8c4b3690a4743d5afe41b1
Reviewed-on: https://review.whamcloud.com/30831
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
5 years agoLU-10988 lfsck: load object attr when prepare LFSCK request 22/32522/2
Fan Yong [Wed, 2 May 2018 16:00:40 +0000 (00:00 +0800)]
LU-10988 lfsck: load object attr when prepare LFSCK request

It will avoid empty attrs in LFSCK request (lfsck_namespace_req).
The patch also shows invalid mode for dt_mode_to_dft() for debug.

Other cleanup for lfsck_namespace_striped_dir_rescan().

Lustre-change: https://review.whamcloud.com/32245
Lustre-commit: f7c354096a810df0a9333dace2f538d6dfbe486f

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2874160d9a0c9e3084d0d3d7f365940108c82018
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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/32522
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-8293 lnet: Add insserv header to lnet init script 18/32518/2
Chris Horn [Thu, 16 Jun 2016 17:57:37 +0000 (12:57 -0500)]
LU-8293 lnet: Add insserv header to lnet init script

The lnet init script does not contain header information as described
by the insserv man page. This header information is needed to ensure
the lnet init script is not run until openibd has been able to start

Lustre-change: https://review.whamcloud.com/20835
Lustre-commit: c99b645470427c74b0ba6ea9a031d747b92030b5

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I6f778e827f88ce34199dff70be5d5089f0ba51b9
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/32518
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-11065 kernel: kernel update [SLES12 SP3 4.4.132-94.33] 00/32600/2
Bob Glossman [Thu, 31 May 2018 13:57:52 +0000 (06:57 -0700)]
LU-11065 kernel: kernel update [SLES12 SP3 4.4.132-94.33]

Update target, kernel_config, and ldiskfs files for new version
One ldiskfs patch revised for ext4 changes.
Old unchanged ldiskfs patch kept to use for sles12sp2.

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: Ic6d0219a7133825d1dba0b2bfadf8354442cddb3
Reviewed-on: https://review.whamcloud.com/32600
Reviewed-by: Yang Sheng <yang.sheng@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>
5 years agoLU-11043 kernel: kernel update RHEL7.5 [3.10.0-862.3.2.el7] 42/32542/2
Bob Glossman [Mon, 21 May 2018 23:20:05 +0000 (16:20 -0700)]
LU-11043 kernel: kernel update RHEL7.5 [3.10.0-862.3.2.el7]

update RHEL 7.5 kernel to 3.10.0-862.3.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0defa14e83ce098c48b3228b4867afa73a2d9185
Reviewed-on: https://review.whamcloud.com/32542
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>
5 years agoLU-11042 kernel: kernel update RHEL6.9 [2.6.32-696.30.1.el6] 12/32512/2
Bob Glossman [Mon, 21 May 2018 22:34:35 +0000 (15:34 -0700)]
LU-11042 kernel: kernel update RHEL6.9 [2.6.32-696.30.1.el6]

Update RHEL6.9 kernel to 2.6.32-696.30.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: I7b02f48f05c18e0b9e29f302150e8386a2b15064
Reviewed-on: https://review.whamcloud.com/32512
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>
5 years agoLU-10869 build: package configuration files for Ubuntu / Debian 71/32471/2
James Simmons [Fri, 6 Apr 2018 16:06:35 +0000 (12:06 -0400)]
LU-10869 build: package configuration files for Ubuntu / Debian

For a long time Lustre never added /etc configuration files to its
debian packages. It could get away with but now you can see it
fail conf-sanity test 76a. This test the lctl set_param -P which
uses udev events to set the tunables for lustre. In order for it
to work a default udev rule has to be added to 99-lustre.rules.
Beside the missing 99-lustre.rules and in all the other files used
for configuration. Lastly create conffile which is the way Debian
handles potential stomping of configuration files. When installing
with apt-get install it will ask the person installing if they
want to over ride specific files.

Test-Parameters: clientdistro=ubuntu1604 trivial testlist=conf-sanity
Test-Parameters: envdefinitions=ONLY=76a testlist=conf-sanity

Lustre-change: https://review.whamcloud.com/31850
Lustre-commit: 8f221cf65b644d798493da489674abd2e2b7f23f

Change-Id: Ic0aaf2bba531ce23a3e23ef070a1501032ad1c9f
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: https://review.whamcloud.com/32471
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-11009 test: add version check to test_102 93/32393/2
Wei Liu [Mon, 14 May 2018 20:40:25 +0000 (13:40 -0700)]
LU-11009 test: add version check to test_102

Skip test_102 if server is equal or less than 2.9.53

Signed-off-by: Wei Liu <wei3.liu@intel.com>
Change-Id: Ib9702ee9b2d174742f229f0c3493524606eacca7
Reviewed-on: https://review.whamcloud.com/32393
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-9796 ldiskfs: improve inode allocation performance 95/32295/2
Wang Shilong [Thu, 26 Oct 2017 07:03:52 +0000 (15:03 +0800)]
LU-9796 ldiskfs: improve inode allocation performance

Backport following upstream patches:

------
ext4: cleanup goto next group

avoid duplicated codes, also we need goto
next group in case we found reserved inode.
------

ext4: reduce lock contention in __ext4_new_inode

While running number of creating file threads concurrently,
we found heavy lock contention on group spinlock:

FUNC                           TOTAL_TIME(us)       COUNT        AVG(us)
ext4_create                    1707443399           1440000      1185.72
_raw_spin_lock                 1317641501           180899929    7.28
jbd2__journal_start            287821030            1453950      197.96
jbd2_journal_get_write_access  33441470             73077185     0.46
ext4_add_nondir                29435963             1440000      20.44
ext4_add_entry                 26015166             1440049      18.07
ext4_dx_add_entry              25729337             1432814      17.96
ext4_mark_inode_dirty          12302433             5774407      2.13

most of cpu time blames to _raw_spin_lock, here is some testing
numbers with/without patch.

Test environment:
Server : SuperMicro Sever (2 x E5-2690 v3@2.60GHz, 128GB 2133MHz
         DDR4 Memory, 8GbFC)
Storage : 2 x RAID1 (DDN SFA7700X, 4 x Toshiba PX02SMU020 200GB
          Read Intensive SSD)

format command:
        mkfs.ext4 -J size=4096

test command:
        mpirun -np 48 mdtest -n 30000 -d /ext4/mdtest.out -F -C \
                -r -i 1 -v -p 10 -u #first run to load inode

        mpirun -np 48 mdtest -n 30000 -d /ext4/mdtest.out -F -C \
                -r -i 3 -v -p 10 -u

Kernel version: 4.13.0-rc3

Test  1,440,000 files with 48 directories by 48 processes:

Without patch:

File Creation   File removal
79,033          289,569 ops/per second
81,463          285,359
79,875          288,475

With patch:
File Creation   File removal
810669          301694
812805          302711
813965          297670

Creation performance is improved more than 10X with large
journal size. The main problem here is we test bitmap
and do some check and journal operations which could be
slept, then we test and set with lock hold, this could
be racy, and make 'inode' steal by other process.

However, after first try, we could confirm handle has
been started and inode bitmap journaled too, then
we could find and set bit with lock hold directly, this
will mostly gurateee success with second try.

Lustre-commit: 3f0a7241c434d9556308299eea069628715816c2
Lustre-change: https://review.whamcloud.com/29032

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I234ff3027c8d96155d374c56b12aab7c4dc0dafd
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/32295
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoNew release 2.10.4. 2.10.4 v2_10_4
John L. Hammond [Tue, 22 May 2018 17:09:28 +0000 (12:09 -0500)]
New release 2.10.4.

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

5 years agoNew tag 2.10.4-RC2. 2.10.4-RC2 v2_10_4-RC2
John L. Hammond [Tue, 15 May 2018 13:52:18 +0000 (08:52 -0500)]
New tag 2.10.4-RC2.

Second release candidate for 2.10.4 release.

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

5 years agoLU-11024 osd-zfs: properly detect ZFS dnode accounting 22/32422/2
Fan Yong [Wed, 16 May 2018 08:00:29 +0000 (16:00 +0800)]
LU-11024 osd-zfs: properly detect ZFS dnode accounting

Properly detect if native ZFS dnode accounting is available for
ZFS 0.7.x releases that do not contain ZFS project quota.  The
function signature changed after ZFS Project Quota was landed,
but we still need to check for the old function for 0.7.x.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icd40e0bdaa0b7738e9aa761836167780843ebbe5
Reviewed-on: https://review.whamcloud.com/32422
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-11008 kernel: kernel update RHEL6.9 [2.6.32-696.28.1.el6] 52/32352/3
Bob Glossman [Tue, 8 May 2018 21:35:54 +0000 (14:35 -0700)]
LU-11008 kernel: kernel update RHEL6.9 [2.6.32-696.28.1.el6]

Update RHEL6.9 kernel to 2.6.32-696.28.1.el6

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

Change-Id: I3f42c0e9236cbe220486a858c8b5c22918756d78
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/32352
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-11026 lustre-dkms should require patch or quilt 50/32450/2
Joe Grund [Wed, 16 May 2018 17:18:56 +0000 (13:18 -0400)]
LU-11026 lustre-dkms should require patch or quilt

Add patch requirement to lustre-dkms.spec.in
as it (or quilt) are needed for lustre-build-ldiskfs.

  - Add requires patch.

Lustre-change: https://review.whamcloud.com/#/c/32431/
Lustre-commit: ea52ed90e1ea079b269351a98d86ad6b06273df1

Change-Id: I640bae382511502c02a0237694c93c304047f339
Signed-off-by: Joe Grund <joe.grund@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32450
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>
5 years agoNew tag 2.10.4-RC1. 2.10.4-RC1 v2_10_4-RC1
John L. Hammond [Tue, 15 May 2018 13:52:18 +0000 (08:52 -0500)]
New tag 2.10.4-RC1.

First release candidate for 2.10.4 release.

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

5 years agoLU-10569 build: properly package lustre for Debian/Ubuntu 77/32277/4
James Simmons [Tue, 6 Mar 2018 20:10:56 +0000 (15:10 -0500)]
LU-10569 build: properly package lustre for Debian/Ubuntu

Remove the obsolete linux-patch since patched kernels for lustre
clients have been long gone. Place only the static libraries and
*.so symlinks for the dynamic libraries in lustre-dev. The normal
dynamic libraries are placed into the utilities packages. Add in
all the missing dependencies and fix how the lustre debs are
dependent on each other. Lastly add in the missing lustre-iokit
that is present for rpm packages. Only thing missing is a package
for lustre resources which can be done at a latter time.

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/31348
Lustre-commit: 020277f596168ed80d77ab50ef6a85a6e6e54d0a

Change-Id: I5fd2a23bc1ae73434cef8dcf3679b50878256ab3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Tested-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32277
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>
5 years agoLU-10897 kernel: kernel upgrade RHEL7.5 [3.10.0-862.2.3.el7] 71/32371/4
Bob Glossman [Fri, 11 May 2018 13:31:37 +0000 (06:31 -0700)]
LU-10897 kernel: kernel upgrade RHEL7.5 [3.10.0-862.2.3.el7]

With this mod we switch our supported el7 version to RHEL 7.5

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iedcea9498591d15eab69187274e4c32c57879e4e
Reviewed-on: https://review.whamcloud.com/32371
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-11019 build: Update ZFS/SPL to 0.7.9 89/32389/2
Nathaniel Clark [Mon, 14 May 2018 19:06:45 +0000 (15:06 -0400)]
LU-11019 build: Update ZFS/SPL to 0.7.9

This updates the ZFS version to 0.7.9.

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

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I9452a589d9dc719de7a63d3ed287dec8b6f7c0b6
Reviewed-on: https://review.whamcloud.com/32389
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10944 kernel: kernel update [SLES12 SP3 4.4.126-94.22] 46/32146/3
Bob Glossman [Mon, 23 Apr 2018 22:25:31 +0000 (15:25 -0700)]
LU-10944 kernel: kernel update [SLES12 SP3 4.4.126-94.22]

Update target, kernel_config, and ldiskfs files for new version
ldiskfs for sles12sp2 and sles12sp3 are no longer identical,
so revise some build files for sles12sp2 here too.

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: If554b24644f763462002d81309f8edfa016210e8
Reviewed-on: https://review.whamcloud.com/32146
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10912 mdc: use large xattr buffers for old servers 51/32251/2
John L. Hammond [Fri, 13 Apr 2018 15:57:28 +0000 (10:57 -0500)]
LU-10912 mdc: use large xattr buffers for old servers

Pre 2.10.1 MDTs will crash when they receive a listxattr (MDS_GETXATTR
with OBD_MD_FLXATTRLS) RPC for an orphan or dead object. So for
clients connected to these older MDTs, try to avoid sending listxattr
RPCs by making the bulk getxattr (MDS_GETXATTR with OBD_MD_FLXATTRALL)
more likely to succeed and thereby reducing the chances of falling
back to listxattr.

Lustre-change: https://review.whamcloud.com/31990
Lustre-commit: a95b85efdc97136d0fbf6959acf62919319901ed

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia96323c47c91a44495b73be2d95705298c7f7ac9
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@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/32251
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-5490 tests: Sanity/133d ensure stats read is on correct MDT 49/32149/2
Nathaniel Clark [Thu, 8 Mar 2018 15:40:40 +0000 (10:40 -0500)]
LU-5490 tests: Sanity/133d ensure stats read is on correct MDT

Ensure directories used to collect rename_stats are on the MDT
that is checked.  This ensures directories are created on
MDT0 and not striped and then rename_stats is read from MDT0.

Lustre-change: https://review.whamcloud.com/31585
Lustre-commit: 1d80fd72bf42f653a5d6a4a31fc2c5df571f1afc

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib27f5c531f2d8bd664ec3a4732c512b0c389dc43
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/32149
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10030 utils: add lfs tool to change/list project of file 98/32098/3
Wang Shilong [Mon, 16 Oct 2017 06:58:04 +0000 (14:58 +0800)]
LU-10030 utils: add lfs tool to change/list project of file

Currently, we are using chattr/lsattr for project quota
interface, this have some problems:

1)Client side need patched e2fsprogs or latest upstream e2fsprogs.
2)Project quota will be no longer osd-ldiskfs based, ZFS
too, zfs guys might dislike ldiskfs tool dependency for them.
3)customers argue chattr might be a little dangerous.

So this patch add native lfs tools for project quota.
usage: project [-p id] [-s] [-r] <file|directory..>
          set project ID and/or inherit flag for specified
          file(s) or directory.
       project [-d|-r [-0]] <file|directory...>
          list project ID and flags on file(s) or directory,
          print outliers
       project -c [-d|-r [-p id] [-0]] <file|directory..>
          check project ID and flags on file(s) or directory,
          print outliers
       project -C [-r] [-k] <file|directory..>
          clear the project inherit flag and ID on the file
          or directory

Test-Parameters: testlist=sanity-quota,sanity-quota,sanity-quota,\
    sanity-quota clientdistro=el7 serverdistro=el7 \
    ostfilesystemtype=ldiskfs mdtfilesystemtype=ldiskfs

Lustre-change: https://review.whamcloud.com/29190
Lustre-commit: 022c5a9a77d4612dce28b76a7691b7af1cefd058

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I45960fb8fbd12e22a654792fba517896c0447447
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@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/32098
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-9950 build: add support for Ubuntu(debian) arm64 01/32101/2
Gu Zheng [Wed, 6 Sep 2017 03:14:35 +0000 (21:14 -0600)]
LU-9950 build: add support for Ubuntu(debian) arm64

Add arm64 into the support arch list of debian control file.

Lustre-change: https://review.whamcloud.com/28870
Lustre-commit: ba4b4eaacc37bc29b6d99f24b0f6451c758f9c4a

Change-Id: I9c39a4d8c1896c1255432380bd956330c2edf476
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32101
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10030 llite: extend inode flags into GET/SETXATTR ioctl 99/32099/2
Wang Shilong [Tue, 14 Nov 2017 02:12:33 +0000 (10:12 +0800)]
LU-10030 llite: extend inode flags into GET/SETXATTR ioctl

This is very useful for projet quota tools to save RPC call
to change project inherit attribute together with project ID.

Lustre-change: https://review.whamcloud.com/30072
Lustre-commit: 311e8d539b1932593462de428c46ea176b8905db

Change-Id: I5b545bf2c5c601b552a85322c80994dabbca0b12
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32099
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-7001 osp: fix llog processing 97/32097/2
Alexander Boyko [Wed, 22 Mar 2017 11:39:48 +0000 (14:39 +0300)]
LU-7001 osp: fix llog processing

The osp_sync_thread base on fact that llog_cat_process
will not end until umount. This is worng when processing reaches
bottom of catalog, or if catalog is wrapped.
The patch fixes this issue.

For wrapped catalog llog_process_thread could process old
record.
1 thread llog_process_thread read chunk and proccing first record
2 thread add rec to this catalog at this chunk and
  update bitmap
1 check bitmap for next idx and process old record

Test conf-sanity 106 was added.

Lustre-change: https://review.whamcloud.com/26132
Lustre-commit: 8da9fb0cf14cc79bf1985d144d0a201e136dfe51

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-4235
Change-Id: Ifc983018e3a325622ef3215bec4b69f5c9ac2ba2
Reviewed-by: Andriy Skulysh
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32097
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10887 lfsck: offer shard's mode when re-create it 76/32076/2
Fan Yong [Mon, 9 Apr 2018 14:11:31 +0000 (22:11 +0800)]
LU-10887 lfsck: offer shard's mode when re-create it

The namespace will re-create the lost shard of a broken stripe
directory if "-C" option specified. Under such case, the @mode
parameter should be given properly.

Lustre-change: https://review.whamcloud.com/31915
Lustre-commit: 7d48050b7a3ba0b9db2ff823bc6fbc3091506597

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2441d8ca83c932a34ef1971d334f54ecd7343b27
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/32076
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10368 mdc: resend quotactl if needed 75/32075/2
Hongchao Zhang [Wed, 21 Mar 2018 15:21:08 +0000 (23:21 +0800)]
LU-10368 mdc: resend quotactl if needed

In mdc_quotactl, it is better to resend the quotactl request
if reconnection or failover is triggered during the process.

Lustre-change: https://review.whamcloud.com/31773
Lustre-commit: d511918e8eb725abba2561cc493e30651a89ac27

Change-Id: I64f96863a6f10026aa69cba3c59095966b58b98d
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/32075
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10901 build: Update ZFS/SPL to 0.7.8 70/32070/2
Nathaniel Clark [Wed, 11 Apr 2018 13:27:57 +0000 (09:27 -0400)]
LU-10901 build: Update ZFS/SPL to 0.7.8

This skips 0.7.7 due to regression fixed in 0.7.8

https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.8
https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.7

Lustre-change: https://review.whamcloud.com/31949
Lustre-commit: 33fa3ca05b5bb6abbcef01444c3f383d876ecba9

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Icd6a21793a5f7502c88121def8d86d9aa48c6ae8
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/32070
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10864 build: update changelog for ubuntu 16.04 59/32059/2
Minh Diep [Thu, 29 Mar 2018 17:37:59 +0000 (10:37 -0700)]
LU-10864 build: update changelog for ubuntu 16.04

update chanage to the kernel we are building

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/31826
Lustre-commit: ab4e054fca6c8e300d2fac96c5c882ed188a5237

Change-Id: Ic3a6accda4fc19d56676e2fb84f65942bc107539
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Peter Jones <peter.a.jones@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Joseph Gmitter <joseph.gmitter@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/32059
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10859 ldiskfs: fix deadlock with heavy memory preassure 58/32058/2
Wang Shilong [Wed, 28 Mar 2018 01:03:22 +0000 (09:03 +0800)]
LU-10859 ldiskfs: fix deadlock with heavy memory preassure

On one Customer site, we hit following deadlock:

Thread 1:
ofd_object_punch
 osd_punch
  ldiskfs_truncate
   ldiskfs_inode_attach_jinode
     ...
     do_try_to_free_pages
      lu_cache_shrink
       mutex_lock -->try to hold @lu_sites_guard

kswapd thread2:
kthread
 shrink_slab
  lu_cache_shrink
    mutex_lock ---->hold already.
     ...
     dqget
      ldiskfs_acquire_dquot
       jbd2__journal_start-->blocked to wait for more credits.

Thread3:
kthread
 kjournald2
  jbd2_journal_commit_transaction-->blocked to wait Thread2 finished,
 since Thread1 add a handle into transaction.

So deadlock happens because of Thread1 wait Thread2, Thread2 wait Thread3..
but Thread3 wait Thread1....

This problem still exists even we have switched @lu_sites_guard
into a read/write lock, sine we hold write lock at lu_cahce_shrink().

Fixed the problem by making ldiskfs_inode_attach_jinode() use
GFP_NOFS.

Test-Parameters: testgroup=review-ldiskfs \
mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Lustre-change: https://review.whamcloud.com/31806
Lustre-commit: 0506e1bd6a6d5fafe7fc5e558aa1b75e456c2642

Change-Id: I0ab143fc0cdb8e1b0c490c2c25e8af483c491a81
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.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/32058
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-10350 tests: make parsing routines pattern aware 48/32048/2
James Nunez [Thu, 21 Dec 2017 21:23:40 +0000 (14:23 -0700)]
LU-10350 tests: make parsing routines pattern aware

'lfs getstripe' now returns the pattern for each component
of a directory and files. The routines that parse
parameters, parse_layout_param() and parse_plain_param(),
need to look for the component pattern when parsing the output
of 'lfs getstripe'.

Lustre-change: https://review.whamcloud.com/30636
Lustre-commit: 503a78bde8a59e176356a02b2d078332e3201575

Test-Parameters: trivial testlist=sanity-pfl,ost-pools
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iab605f58e9c8f501fa0889806c511e3310cb6dd7
Reviewed-on: https://review.whamcloud.com/30636
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: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit 503a78bde8a59e176356a02b2d078332e3201575)
Reviewed-on: https://review.whamcloud.com/32048
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10334 tests: add tests to ALWAYS_EXCEPT for Ubuntu 47/32047/3
James Nunez [Wed, 18 Apr 2018 14:51:17 +0000 (08:51 -0600)]
LU-10334 tests: add tests to ALWAYS_EXCEPT for Ubuntu

Several tests are known to fail when running on Ubuntu clients:
tests 103a, 130a, 130b, 130c, 130d, 130e, 400a, and 410.

Add these tests to the ALWAYS_EXCEPT list to allow Ubuntu
testing to pass.

Lustre-change: https://review.whamcloud.com/31828
Lustre-commit: 68be7b634d8e46c110f11916dd87b9f1c36a90e1

Test-Parameters: trivial clientdistro=ubuntu1604 serverdistro=el7 testlist=sanity
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I096db598e9d8f5e1722f22a3213da5b3553cf89c
Reviewed-on: https://review.whamcloud.com/32047
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>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10795 quota: fix wrong skipping of reintegration 13/32013/3
Wang Shilong [Fri, 9 Mar 2018 07:38:51 +0000 (15:38 +0800)]
LU-10795 quota: fix wrong skipping of reintegration

There are two problems addressed by this patch:
1)In qsd_prepare(), if @qqi_acct_failed is true,
that only means one type of quota failed, Quota
should continue to handle.
2)In qsd_config(), only trigger reintegration if
this type of quota is newly enabled, this could
fix annoying messages when admin running

$ lctl conf_param lustre.quota.mdt=ug

LustreError: 0-0: lustre-MDT0000: can't enable
quota enforcement since space accounting isn't
functional. Please run tunefs.lustre --quota on
an unmounted filesystem if not done already

Lustre-change: https://review.whamcloud.com/31607
Lustre-commit: 7a216e31b74ef0b825adf36eed5f636da8b07533

Change-Id: I9bad618e7e8fa836902cac9f446714cd6c03f98a
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/32013
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10364 test: Add version check to test_255b 02/32002/2
Wei Liu [Mon, 11 Dec 2017 21:22:18 +0000 (13:22 -0800)]
LU-10364 test: Add version check to test_255b

Skip test if server version is older than 2.8.54 since
it does not support ladvise.

Lustre-change: https://review.whamcloud.com/30481
Lustre-commit: 043f5976d087a87bace840653c99e10cde13bb6d

Change-Id: Ie613c1b8d9d082b78529a3d72fd59150431f65ea
Test-Parameters: trivial
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@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/32002
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-9019 libcfs: add ktime_compare for platforms lacking it. 94/31994/2
James Simmons [Mon, 11 Dec 2017 18:18:42 +0000 (13:18 -0500)]
LU-9019 libcfs: add ktime_compare for platforms lacking it.

The function ktime_compare() was added to the linux kernel
starting with verison 3.19. Add to libcfs support for older
platforms lacking this function.

Lustre-commit: 4bbc835dc87cf947e87bd687553602781381fc81
Lustre-change: https://review.whamcloud.com/30475

Test-Parameters: trivial

Change-Id: I7826b8e78d0dc2c633490a2949210176a0003d9a
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/31994
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10707 lnet: revert to cfs_time functions 82/32082/3
Amir Shehata [Thu, 19 Apr 2018 17:47:32 +0000 (10:47 -0700)]
LU-10707 lnet: revert to cfs_time functions

In 2.10 the entire set of changes to using ktime function is not in
creating a situation where routers consider peers dead, essentially
breaking routing functionality.

Revert the changes that were made to LNet as part of LU-6245.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id0765e8332a8b97167d3a602e6410f5bb6a48137
Reviewed-on: https://review.whamcloud.com/32082
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10707 ksocklnd: revert back to jiffies 15/32015/2
James Simmons [Mon, 16 Apr 2018 23:20:41 +0000 (19:20 -0400)]
LU-10707 ksocklnd: revert back to jiffies

It was found for the case of routers which have LNet enabled
ethernet and infiniband that they couldn't communicate properly
with other. This was due to ko2iblnd still using jiffies and
the socklnd driver using time64_t. After some discussion it was
deceided that the best thing to do is roll back instead of
additional changes.

Revert "LU-9397 ksocklnd: move remaining time handling to 64 bits"

This reverts commit 59c25356208706b4dd0920bc7754f21e2db14a0f.

Change-Id: I42fd5620ab8131cd5fdf4bf0ef15553f6eabe550
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/32015
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-9444 tests: replace SINGLEMDS1 with SINGLEMDS 67/31967/2
James Nunez [Mon, 26 Feb 2018 17:59:50 +0000 (10:59 -0700)]
LU-9444 tests: replace SINGLEMDS1 with SINGLEMDS

In conf-sanity test 87, we use the global variable SINGLEMDS1
to get the version of the MDS. SINGLEMDS1 is not defined and
the test should use SINGLEMDS to check the version of the MDS.

Lustre-change: https://review.whamcloud.com/31420
Lustre-commit: 5f00d6f5fce28c7cee3b400601e265358e3cdc66

Test-Parameters: trivial testlist=conf-sanity
Test-Parameters: envdefinitions=ONLY=87 mdsjob=lustre-b2_9 ossjob=lustre-b2_9 serverbuildno=22 testlist=conf-sanity
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ic8b1f32b87cc596fcc2e98d5b6095b6e4171bfd7
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@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/31967
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10541 llite: setxattr directly in ll_set_acl 66/31966/2
John L. Hammond [Thu, 8 Mar 2018 18:55:42 +0000 (12:55 -0600)]
LU-10541 llite: setxattr directly in ll_set_acl

Call md_setxattr() directly from ll_set_acl().

Lustre-change: https://review.whamcloud.com/31588
Lustre-commit: 682939ffb60e9afff9a7d61cc1112611b2197b78

Test-Parameters: alwaysuploadlogs clientdistro=sles12sp3 testlist=parallel-scale-nfsv3
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie266ee4fe7a67338122a6a3effb545d3dbaee008
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31966
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
5 years agoLU-10837 ldiskfs: skip bitmap check if block bitmap is uninitialized 57/31957/2
Wang Shilong [Thu, 22 Mar 2018 05:59:55 +0000 (13:59 +0800)]
LU-10837 ldiskfs: skip bitmap check if block bitmap is uninitialized

See comments in ext4_free_clusters_after_init:
/* Return the number of free blocks in a block group.  It is used when
 * the block bitmap is uninitialized, so we can't just count the bits
 * in the bitmap. */
So extra check we enhanced here is wrong if this block group
bitmap is uninitialized, since we only check bitmaps here.

Further, Looking at EXT4_BG_BLOCK_UNINIT clear codes, Kernel
will reinit free_clusters_count when tried to clear the flag, so
extra check for uninited block bitmaps dosen't make much sense.

Let's skip uninited block bitmap check if EXT4_BG_BLOCK_UNINIT
is set, whatever free count group desc recorded is untrustable somehow

Lustre-change: https://review.whamcloud.com/31720
Lustre-commit: f7672143843a86656eaed5b9a8b89ce171b99d7a

Change-Id: I845f2e0e17e53b7e3073399bd8b0a85e3db66ef8
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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/31957
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10802 nrs: mismatch problem for wildcard in jobid TBF 56/31956/2
Qian Yingjin [Fri, 22 Sep 2017 03:02:24 +0000 (11:02 +0800)]
LU-10802 nrs: mismatch problem for wildcard in jobid TBF

When set the NRS JOBID rule
"start runas jobid={*.500} rate=10", run the dd with user 500,
the RPC rate is not under control.
This patch fix this mismatch problem for wildcard in TBF JOBID.

Test-Parameters: trivial testlist=sanityn
Lustre-change: https://review.whamcloud.com/29162
Lustre-commit: 96f5cc0eb36c0bc799016cb3c6f11c3ddf475157

Change-Id: I39a8e691c9dc8273ed9fce686eeef71be1ac3e43
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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/31956
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10560 lustre_compat: Convert GFP_TEMPORARY to GFP_KERNEL 26/31926/2
Mike Marciniszyn [Fri, 2 Feb 2018 16:45:54 +0000 (08:45 -0800)]
LU-10560 lustre_compat: Convert GFP_TEMPORARY to GFP_KERNEL

The 4.14 kernel removes this gfp.h define.

Adjust the code to use GFP_KERNEL as the upstream
patch does.

Lustre-change: https://review.whamcloud.com/31152
Lustre-commit: f01bed03905d424fab81bee84a7b622f141e4f79

Change-Id: I40fff2724499fa17aa285507e0fd9b21f4afc070
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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/31926
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10560 llite: remove extra headers from rw26.c 25/31925/2
Mike Marciniszyn [Fri, 2 Feb 2018 16:45:54 +0000 (08:45 -0800)]
LU-10560 llite: remove extra headers from rw26.c

Remove headers from llite_mmap.c that are no longer (or were possibly
never) needed.  This avoids a compile problem with 4.14 kernels:

CC [M]  lustre/llite/rw26.o
In file included from lustre/llite/rw26.c:43:0:
./arch/x86/include/asm/uaccess.h: In function ‘set_fs’:
./arch/x86/include/asm/uaccess.h:31:9:
error: dereferencing pointer to incomplete type
current->thread.addr_limit = fs;

It turns out <asm/uaccess.h> was included twice but we don't need
anything from that header.  Same for <linux/stat.h> and a number of
other extraneous headers.

Sort headers alphabetically so it is easier to avoid duplicates.

Lustre-change: https://review.whamcloud.com/31151
Lustre-commit: b8e87b5a1c17048a760ce9809fde904ca6dc449d

Change-Id: I4cbe2c1c7289466396b2bb2eac3c475d1041a283
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31925
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10560 llite: remove extra headers from llite_mmap.c 24/31924/2
Mike Marciniszyn [Fri, 2 Feb 2018 16:45:53 +0000 (08:45 -0800)]
LU-10560 llite: remove extra headers from llite_mmap.c

Remove headers from llite_mmap.c that are no longer (or were possibly
never) needed.  This avoids a compile problem with 4.14 kernels:

CC [M]  lustre/llite/llite_mmap.o
In file included from lustre/llite/llite_mmap.c:41:0:
./arch/x86/include/asm/uaccess.h: In function ‘set_fs’:
./arch/x86/include/asm/uaccess.h:31:9:
error: dereferencing pointer to incomplete type
current->thread.addr_limit = fs;

It turns out <asm/uaccess.h> was included twice but we don't need
anything from that header.  Same for <linux/stat.h> and a number of
other extraneous headers.

Sort headers alphabetically so it is easier to avoid duplicates.

Lustre-change: https://review.whamcloud.com/31150
Lustre-commit: aae9a90ce7c967c208c482e0ef500c5115017388

Test-Parameters: trivial
Change-Id: Ic24a58bdaec16f92d7bea9c24172796031cad471
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31924
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10560 libcfs: remove extra headers from linux-debug.c 23/31923/2
Andreas Dilger [Fri, 2 Feb 2018 16:45:53 +0000 (08:45 -0800)]
LU-10560 libcfs: remove extra headers from linux-debug.c

Remove headers from linux-debug.c that are no longer (or were possibly
never) needed.  This avoids a compile problem with 4.14 kernels:

  CC [M] lustre/libcfs/libcfs/linux/linux-debug.o
  In file included from lustre/libcfs/libcfs/linux/linux-debug.c:50:0:
    ./arch/x86/include/asm/uaccess.h:31:9: In function set_fs():
      error: dereferencing pointer to incomplete type
      current->thread.addr_limit = fs;

It turns out <asm/uaccess.h> was included twice but we don't need
anything from that header.  Same for <linux/stat.h> and a number of
other extraneous headers.

Sort headers alphabetically so it is easier to avoid duplicates.
Lustre-change: https://review.whamcloud.com/31007
Lustre-commit: a4ac52a7d08540802f899b115c74f7b9cdd0c5d7

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I751e796913624cd8c9c95052abe4ecbb823ebbe5
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31923
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-8856 osd: mark specific transactions netfree 51/31751/3
Alex Zhuravlev [Wed, 3 May 2017 12:45:13 +0000 (15:45 +0300)]
LU-8856 osd: mark specific transactions netfree

osd-zfs should mark some transactions netfree. this means those
transactions are expected to release space (rather than consume)
and for this kind of transaction half of reserved space is available.

Lustre-change: https://review.whamcloud.com/31444
Lustre-commit: 106abc184d8b57de560dc1874683ce5487dcf30a

Change-Id: Ia5ca247843b296319376c4ac69efad68b557df9f
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>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31751
Tested-by: Jenkins
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10656 ldlm: fix export reference 36/31636/4
Hongchao Zhang [Sun, 28 Jan 2018 19:25:42 +0000 (03:25 +0800)]
LU-10656 ldlm: fix export reference

In ptlrpc_connect_interpert, the export reference could be
leaked if there is error before the following class_exp_put.

Lustre-change: https://review.whamcloud.com/31139
Lustre-commit: e52f2ea40e55d13b2f14fccd04959584c9022dbd

Change-Id: I9ddd82fa1bbf8e17079e9746202be63e6233c052
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31636
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10212 test: ESTALE read 54/31554/4
Alexander Boyko [Wed, 31 Jan 2018 11:17:42 +0000 (06:17 -0500)]
LU-10212 test: ESTALE read

The patch reproduces the issue, when a read rpc come
to OST with a lock handle which has the LDLM_FL_DESTROY
flag. And then a client gets the ESTALE error for a read
operation.

Test-Parameters: trivial testlist=sanity
Lustre-change: https://review.whamcloud.com/31101
Lustre-commit: 6e985684b822324143c686e919fe7a75bb16b440

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: MRP-4604
Change-Id: I0722fc57a61153b25a05bf7aebce5d7f32bbc95b
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31554
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
5 years agoLU-10224 obd: free obd_svc_stats when all users are gone 97/31197/5
Bruno Faccini [Tue, 28 Nov 2017 15:15:16 +0000 (10:15 -0500)]
LU-10224 obd: free obd_svc_stats when all users are gone

During object device shutdown obd_svc_stats must only be freed
after all access methods from user-land are no longer possible
to prevent any race and further crash.

Lustre-change: https://review.whamcloud.com/30249
Lustre-commit: ffc843a0aacd78495b1cff51344aaee3e32fc2de

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Iea4f5b0486779c1721c90f32538af1a723f76a79
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31197
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10761 osd-ldiskfs: not create REMOTE_PARENT_DIR on OST 55/31955/5
Fan Yong [Fri, 16 Mar 2018 06:28:01 +0000 (14:28 +0800)]
LU-10761 osd-ldiskfs: not create REMOTE_PARENT_DIR on OST

The REMOTE_PARENT_DIR is used to link remote object which parent
resides on remote MDT to the global namespace. It is only useful
for MDT. So it is unnecessary to create such directory on OST.

Lustre-change: https://review.whamcloud.com/31508
Lustre-commit: 196855e15489b4460780d2b098115b943ec6c375

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I240de3f69cde04740cb7f71ebaf9048407a900dc
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10703 nodemap: save and clear fileset correctly 54/31954/3
Emoly Liu [Tue, 20 Mar 2018 09:42:29 +0000 (17:42 +0800)]
LU-10703 nodemap: save and clear fileset correctly

This patch is to fix the following two issues:
- When processing the nodemap_idx_type "NODEMAP_CLUSTER_IDX" in
  nodemap_process_keyrec(), fileset should be saved, otherwise,
  it will be changed to empty every time when client is notified
  to fetch nodemap logs (mgc_process_recover_nodemap_log()->
  nodemap_process_idx_pages()->nodemap_process_keyrec()).
- Allow 'fileset=clear' in addition to 'fileset=""' to clear
  fileset because either 'lctl set_param -P *.*.fileset=""' or
  'lctl nodemap_set_fileset --fileset ""' can only work on MGS,
  while on other non-MGS servers, they both will invoke upcall
  "/usr/sbin/lctl set_param nodemap.default.fileset=" by function
  process_param2_config(), which will cause "no value" error and
  won't clear fileset. 'fileset=""' is still kept for compatibility
  reason.

Also, sanity-sec.sh test_27a is modified and test_27b is added to
verify this patch.

Lustre-change: https://review.whamcloud.com/31450
Lustre-commit: 5b64d9fb0d5c5f292548c23e7841cc30f7a8423e

Change-Id: I23236a4f1b67ac555713d6b3f059df699fdc91dc
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31954
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10566 test: fix nfs exports clean up 53/31953/3
Minh Diep [Fri, 16 Mar 2018 18:36:21 +0000 (11:36 -0700)]
LU-10566 test: fix nfs exports clean up

nfsv3 clean up fail causing subsequence tests to fail

Test-Parameters: trivial

Lustre-change: https://review.whamcloud.com/31679
Lustre-commit: 2cdc1ad8b86d013fdb8ffc70ee567284537eee47

Change-Id: Ic4eb02ea4e4f142753fe36cf110ea0fbec398822
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/31953
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8913 nodemap: fix nodemap range format '*@<net>' support 50/31950/5
Emoly Liu [Mon, 19 Mar 2018 12:42:06 +0000 (20:42 +0800)]
LU-8913 nodemap: fix nodemap range format '*@<net>' support

In cfs_ip_min_max(), (nidrange->nr_all == 1) means this nid range
is a full IP address range(*.*.*.*). In this case, we don't need
to compare it to any other nid range, but set min_nid to 0.0.0.0
and max_nid to 255.255.255.255 directly.

Also, test_10d is added to sanity-sec.sh to verify this patch and
some code cleanup is done for jt_nodemap_add/del_range().

Change minimum MGS version to 2.10.1

Lustre-change: https://review.whamcloud.com/31684
Lustre-commit: 230266326f49b0e6aab43c1d1a5c926d78c11e53

Change-Id: I72c546b060f9e123204a566a3bd373b4f017502d
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31950
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoRevert "LU-9551 utils: add l_tunedisk to fix disk tunings"
John L. Hammond [Fri, 13 Apr 2018 16:24:01 +0000 (11:24 -0500)]
Revert "LU-9551 utils: add l_tunedisk to fix disk tunings"

This reverts commit 3281d5d57cec9d6deaa50cb4d9ec9509e3d03507 which
prevents the ZFS modules from being unloaded in some cases.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10598 obdclass: ignore IGIF formatted last_id 52/31952/2
Fan Yong [Fri, 2 Feb 2018 07:44:26 +0000 (15:44 +0800)]
LU-10598 obdclass: ignore IGIF formatted last_id

All the FIDs with sequence within [FID_SEQ_IGIF, FID_SEQ_IGIF_MAX]
is valid IGIF in spite of what the f_oid is. So the IGIF with zero
f_oid is also valid IGIF, not last_id. So that last_id check logic
should ignore IGIF formatted last_id.

Lustre-change: https://review.whamcloud.com/31140
Lustre-commit: 0fa1cc6fbfd7ec777139a8ead4efce83fde4e702

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I81dc7b237e91688b09f360e43899a1de2c44bf78
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31952
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9551 utils: add l_tunedisk to fix disk tunings 51/31951/2
Nathaniel Clark [Wed, 28 Feb 2018 22:18:09 +0000 (17:18 -0500)]
LU-9551 utils: add l_tunedisk to fix disk tunings

This adds l_tunedisk utility to utilize osd_tune_lustre call for
mount_utils.h.  This can be called from udev.
This adds a udev rule to fix disk tunings.
This in some ways duplicates LU-9132, which sets this value at mount
time, but if a multipath component is removed then re-added, the
multipath's max_sectors_kb will not propgate to the newly added device
and this now will cause an error for I/Os that would violate this.

Test-Parameters: trivial
Lustre-change: https://review.whamcloud.com/31464
Lustre-commit: 892280742a2b6347df1464379b3ed223b2961ed4

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I35330ebe75552d71b71212f9fae00cfdcc028ea1
Reviewed-by: Andreas Dilger <andreas.dilger@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/31951
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10794 lfs: make quota work for grace time 73/31873/2
Wang Shilong [Fri, 9 Mar 2018 05:25:07 +0000 (13:25 +0800)]
LU-10794 lfs: make quota work for grace time

Following commit:
LU-10011 utils: refactor lfs quota codes

Introduce a regression which will make 'lfs quota -t'
will output nothing, fix this bug and also add
a test case in sanity-quota.sh in case it is broken
in the future again.

Test-Parameters: trivial testlist=sanity-quota
Lustre-change: https://review.whamcloud.com/31606
Lustre-commit: 630cd4953daa876697f1aed4eb3819d60d0e2d17

Change-Id: I2063552505cf07464d9924f66c29fc2504bc56ce
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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/31873
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10650 obd: add check to obd_statfs 52/31752/2
Alexander Boyko [Fri, 9 Feb 2018 12:07:19 +0000 (07:07 -0500)]
LU-10650 obd: add check to obd_statfs

The race could happend between mount and lctl get_param.
Because procfs files are ready before a full obd initialization.
For example:
3372:0:(dt_object.h:2509:dt_statfs()) ASSERTION( dev )
3372:0:(dt_object.h:2509:dt_statfs()) LBUG
Pid: 3372, comm: lctl
Call Trace:
libcfs_call_trace+0x4e/0x60[libcfs]
lbug_with_loc+0x4c/0xb0[libcfs]
tgt_statfs_internal+0x2ea/0x350[ptlrpc]
ofd_statfs+0x66/0x470 [ofd]
lprocfs_filesfree_seq_show+0xf6/0x520 [obdclass]
ofd_filesfree_seq_show+0x12/0x20 [ofd]

The patch adds a check of completed obd_setup to obd_statfs().
The patch adds the sanity 276 test.

Lustre-change: https://review.whamcloud.com/31243
Lustre-commit: 4f40429775c49468d9ec1fec34d5e7500ac01116

Signed-off-by: Alexander Boyko <c17825@cray.com>
Cray-bug-id: LUS-2665
Change-Id: I55a9ffa7e036f486388a8f548051d28974d47951
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31752
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10759 test: sanity tests need check for 2 or more OSTs 66/31666/3
Bobi Jam [Fri, 2 Mar 2018 18:31:06 +0000 (11:31 -0700)]
LU-10759 test: sanity tests need check for 2 or more OSTs

sanity test 27F, 311, and 314 need two or more OSTs. Add a check
on the number of OSTs in these test cases.

Test-Parameters: trivial osscount=1 ostcount=1

Lustre-change: https://review.whamcloud.com/31495
Lustre-commit: c4fe25cf5a577f0697a9fb003b663a37d2c11cd8

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ie802429bfeb44ee19d8867614b420de7bceebfa2
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/31666
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10421 echo: use echo layer when finding stripe object 56/31556/2
John L. Hammond [Fri, 16 Feb 2018 18:55:05 +0000 (12:55 -0600)]
LU-10421 echo: use echo layer when finding stripe object

In echo_md_dir_stripe_choose(), find the stripe object using the echo
device rather than the down layer (mdd) device. mdd objects are not
equipped to be top layer objects and should not be found in this way.

Test-Parameters: trivial testlist=mds-survey
Lustre-change: https://review.whamcloud.com/31338
Lustre-commit: 6f60a28206b2755a9aa158d82713b73efa09e81b

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ibb396ae64b6d542c64697336d227e06163a0bb39
Reviewed-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/31556
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10655 tests: eliminate 'ssh exited with exit code 1' 25/31525/2
Vladimir Saveliev [Sat, 10 Feb 2018 10:21:44 +0000 (13:21 +0300)]
LU-10655 tests: eliminate 'ssh exited with exit code 1'

Eliminate meaningless 'ssh exited with exit code 1' issued by stop()
and wait_exit_ST()

Lustre-change: https://review.whamcloud.com/31263
Lustre-commit: 243189198481c9d261a383ae24de5060c82a02ab

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Elena V. Gryaznova <c17455@cray.com>
Cray-bug-id: MRP-1483
Change-Id: Ie1af3cda0b48b7bf482ea35b84c93e38d0f6c0a9
Test-Parameters: trivial
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31525
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10244 osc: add a bit to indicate osc_page in cache tree 24/31524/2
Bobi Jam [Wed, 15 Nov 2017 07:02:30 +0000 (15:02 +0800)]
LU-10244 osc: add a bit to indicate osc_page in cache tree

Add osc_page::ops_intree to indicate whether the osc_page is in the
osc_object's cache tree, so that when page cannot insert in the
cache as race happens, the cleanup code won't try to remove it from
the cache.

Lustre-change: https://review.whamcloud.com/30096
Lustre-commit: ed91ee6bd642e031dab781ab4ebf6524476beddd

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ifcfe158d10c23a40c116414c7f4f86b257e1fa76
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-on: https://review.whamcloud.com/31524
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>
6 years agoLU-5680 tests: Remove use of /etc/motd from sanity-hsm 95/30795/9
James Nunez [Tue, 5 Dec 2017 17:49:26 +0000 (10:49 -0700)]
LU-5680 tests: Remove use of /etc/motd from sanity-hsm

In sanity-hsm tests, /etc/motd is copied to the file system
and archived. /etc/motd may not exist in some Linux distributions
and, if exists, may be of size 0 and may defeat the use of
bandwidth control for timing. Uses of /etc/motd are replaced
with temp file

Test-Parameters: trivial testlist=sanity-hsm

Lustre-change: https://review.whamcloud.com/14021
Lustre-commit: 715c7e9166a34c1f2b781f3314d8b7c02e10950c

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I2f287db6d422ce20bca037ca69e24179c7e48144
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30795
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10005 osp: cache non-exist EA 85/30585/2
Di Wang [Fri, 27 Oct 2017 15:08:11 +0000 (23:08 +0800)]
LU-10005 osp: cache non-exist EA

OSP should also cache non-exist EA, otherwise
it will keep sending RPC to try to get remote
non-exist EA.

So if default stripe EA does not exist on root
MDT, file creation on non-root MDT will always
try to send extra OSP RPC to get the EA.

This patch also fixes a LFSCK bug that may cause
the LFSCK repaired items to be counted repeately.

Test-Parameters: mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs mdscount=2 mdtcount=4 testlist=sanity-lfsck,sanity-lfsck,sanity-lfsck
Lustre-change: https://review.whamcloud.com/29078
Lustre-commit: b2fa448050aff0b5230c8cc94e8baf848fbb4ded

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Ie9c8cb5fd54e404f1af97de47e809f6f96de8d86
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-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/30585
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-7251 osp: do not assign commit callback to every thandle 79/29879/12
Alex Zhuravlev [Fri, 19 Oct 2012 14:18:05 +0000 (18:18 +0400)]
LU-7251 osp: do not assign commit callback to every thandle

with OSP there is a risk of getting a lot of commit callbacks.
say, 10K unlinks/sec on 4-striped files could result in 4*10K*5
= 200K commit callbacks. this patch implements another schema:
every OSP registers own callback every second. this should result
in 4*5 commit callbacks in the same situation. in case of forced
sync the commit callback is registered unconditionally.

the patch removes th_tags and th_ctx from struct thandle as they
are not used anymore. this elimintates 3 allocations from every
transaction:
(lu_object.c:1714:keys_init()) kmalloced 'ctx->lc_value': 320
(update_records.c:1217:update_key_init()) kmalloced 'value': 408
(osp_dev.c:1807:osp_txn_key_init()) kmalloced 'value': 4

Lustre-change: https://review.whamcloud.com/17270
Lustre-commit: 0ba690a526be74c4cdffe7a7dd3031b4bd2b37d8

Change-Id: I460d5eccb585b166423d84d5c142af2e27751d8b
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
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/29879
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10406 tests: stop running sanity-lfsck 31c 35/31935/2
James Nunez [Tue, 2 Jan 2018 22:56:11 +0000 (15:56 -0700)]
LU-10406 tests: stop running sanity-lfsck 31c

sanity-lfsck is failing about half the time it is run.
Add sanity-lfsck test 31c to the ALWAYS_EXCEPT list until
we understand and fix the issue.

Test-Parameters: trivial
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iace77e1b1ea59971548497063974628be9e70733
Reviewed-on: https://review.whamcloud.com/30694
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>
(cherry picked from commit d645c722d73c8c4226ab5695d37a541d39bb0a64)
Reviewed-on: https://review.whamcloud.com/31935
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-10847 kernel update [SLES12 SP2 4.4.120-92.70] 65/31765/3
Bob Glossman [Fri, 23 Mar 2018 22:53:18 +0000 (15:53 -0700)]
LU-10847 kernel update [SLES12 SP2 4.4.120-92.70]

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: I24892ca2360370ede3ca7f909f2e2b1e2275870a
Reviewed-on: https://review.whamcloud.com/31765
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10845 kernel: kernel update [SLES12 SP3 4.4.120-94.17] 63/31763/3
Bob Glossman [Fri, 23 Mar 2018 20:40:28 +0000 (13:40 -0700)]
LU-10845 kernel: kernel update [SLES12 SP3 4.4.120-94.17]

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: I45c1a65c5ef5373201d8b2a1c457bfa2b37df058
Reviewed-on: https://review.whamcloud.com/31763
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10199 utils: strip // from fid2path 75/31775/2
Ben Evans [Tue, 14 Nov 2017 15:28:12 +0000 (10:28 -0500)]
LU-10199 utils: strip // from fid2path

There are a few ways to get a path with a // back from
fid2path, make sure we strip them all out

Lustre-commit: 116b73d69bf2462fa9e9b8b9f629794bbda90ee5
Lustre-change: https://review.whamcloud.com/30078

Signed-off-by: Ben Evans <bevans@cray.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I30591585ccf62e4d793ee658d2772ce1db242034
Reviewed-on: https://review.whamcloud.com/30078
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: https://review.whamcloud.com/31775
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
6 years agoLU-8912 nodemap: fix contiguous range support 21/31521/2
Kit Westneat [Thu, 15 Dec 2016 23:45:00 +0000 (07:45 +0800)]
LU-8912 nodemap: fix contiguous range support

This patch fixes the contiguous range check to allow the addition of
multiple "full" ([0-255]) ranges. As part of this change,
is_contiguous and find_min_max are combined as they were always
called together and the logic is fairly similar. This also removes
the multiple range expression support, since it was broken.

Also, sanity-sec.sh test_10c is added to verify this patch.

Lustre-change: https://review.whamcloud.com/24397
Lustre-commit: eac95a6587af4061b36b35051e191ca27bc6b1a3

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I3c49a077039327fcbde87196f82db140f67a74d0
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31521
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10682 lnd: pending transmits dropped silently 20/31520/2
Amir Shehata [Thu, 22 Feb 2018 00:21:02 +0000 (16:21 -0800)]
LU-10682 lnd: pending transmits dropped silently

list_add was being used erroneously. The logic should be to move
the txs on ibp_tx_queue on a local list which is then processed.
The code, however, did the reverse, which would result in the
pending txs not processed and thus dropped silently. This in turn
would lead to peers reference counts at the LNet layer not
decremented since lnet_finalize() might not be called for a message.

Initialize local list and use list_splice_init() to move
transmits on the ibp_tx_queue to the local list.

Lustre-change: https://review.whamcloud.com/31374
Lustre-commit: f5c6228f0351787aefb76cb8f807eede3371ea2e

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I6b36f709db2c89e53e0b3354883a8a1b1052a1dd
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31520
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-9437 lfsck: handle LMV EA for migrating directory 18/31518/2
Fan Yong [Tue, 20 Feb 2018 19:25:55 +0000 (03:25 +0800)]
LU-9437 lfsck: handle LMV EA for migrating directory

For the in-migration directory, its LMV EA contains not only the
LMV header, but also the FIDs for both source and target. So the
LMV EA size is larger. The lfsck_read_stripe_lmv() logic need to
handle such case properly.

Lustre-change: https://review.whamcloud.com/31266
Lustre-commit: 05cfe91c2714a77f5ad3de4a7e58e20b6df17b83

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic43853fb5ca058042fafa0f6c81fa99d4b8d8897
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>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31518
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-10773 obdclass: yield cpu during changelog_block_trim_ext 06/31506/5
Fan Yong [Mon, 5 Mar 2018 15:49:56 +0000 (23:49 +0800)]
LU-10773 obdclass: yield cpu during changelog_block_trim_ext

To avoid soft-lockup if there are too many records to be handled.
The patch also filters out zero-sized records to avoid dead loop.

Master-change: https://review.whamcloud.com/31516

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia094f9153b5ef2602103d2ee13ee7ad3ffe6dc4f
Reviewed-on: https://review.whamcloud.com/31506
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10769 osd-zfs: fix deadlock on osd_object::oo_guard 14/31514/5
Fan Yong [Mon, 5 Mar 2018 15:39:29 +0000 (23:39 +0800)]
LU-10769 osd-zfs: fix deadlock on osd_object::oo_guard

There is race condition inside osd-zfs, it may cause deadlock.
Consider the following scenarios:

1) The Thread1 calls osd_attr_set() to set flags on the object.
   The osd_attr_set() will call the osd_xattr_get() with holding
   the read mode semaphore on the object::oo_guard.

2) The Thread2 calls the osd_declare_destroy() to destroy such
   object, it will down_write() on the object::oo_gurad, but be
   blocked by the Thread1's granted read mode semaphore.

3) The osd_xattr_get() triggered by the osd_xattr_set() will also
   down_read() on the object::oo_guard. But it will be blocked by
   the Thread2's pending down_write() request.

Then the Thread1 and the Thread2 deadlock.
This patch makes the osd_attr_set() to call the lockless version
xattr_get osd_xattr_get_internal() to avoid such deadlock.

Master-change: https://review.whamcloud.com/31511

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iaac2e414b5f1fd197303bb7ec7d5e2763b6f3e9a
Reviewed-on: https://review.whamcloud.com/31514
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>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10356 llite: have ll_write_end to sync for DIO 32/31432/2
Vladimir Saveliev [Tue, 26 Dec 2017 19:49:58 +0000 (22:49 +0300)]
LU-10356 llite: have ll_write_end to sync for DIO

direct IO write uses buffered write for pages which could not be
released. If not adjacent pages are not releasable,
vio->u.write.vui_queue list becomes non-contiguos which makes
page_list_sanity_check() to fail.

Have ll_write_commit to do vvp_io_write_commit() when it is called in
course of direct IO.

Lustre-change: https://review.whamcloud.com/30659
Lustre-commit: 6ea9171769db602b3a2b34419bdafacd38454cb4

Cray-bug-id: MRP-4415
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Change-Id: I21e653c4d45553c85ff5ded8edf22017966c7ba4
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31432
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8990 lod: put root at cleanup 31/31431/3
Lai Siyao [Fri, 2 Feb 2018 15:00:15 +0000 (23:00 +0800)]
LU-8990 lod: put root at cleanup

'lod_md_root' was put at precleanup, but soak test shows there exists
race, and some ongoing request may re-initialize it, move this put
to cleanup.

Also add debug code to dump remaining objects if lod device is still
referenced at lod_device_free().

Lustre-change: https://review.whamcloud.com/31143
Lustre-commit: 94fc345399b3cd94a96aa4b3f607f2dc9d669a98

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I6f1ab0ba149ccf95279c1182c90a5588607ad8fa
Reviewed-by: Fan Yong <fan.yong@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/31431
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-9158 quota: adjust quota ASAP 04/31404/2
Hongchao Zhang [Wed, 6 Dec 2017 08:49:54 +0000 (16:49 +0800)]
LU-9158 quota: adjust quota ASAP

In qsd_upd_thread, the quota adjust request will only be
scheduled to run when the current time (seconds) is larger
than the queued time (seconds). The transactions in subtest 12b
of sanity_quota are committed in one second simultaneously,
which cause the quota is not freed.

Test-Parameters: alwaysuploadlogs \
envdefinitions=ENABLE_QUOTA=yes,DEBUG_SIZE=64,PTLDEBUG=rpctrace \
clientcount=2 osscount=2 mdscount=2 mdtcount=4 \
austeroptions=-R mdtfilesystemtype=zfs ostfilesystemtype=zfs \
testlist=sanity-quota,sanity-quota,sanity-quota,sanity-quota

Lustre-change: https://review.whamcloud.com/30765
Lustre-commit: 70e1532f6216e4ff925bb9a902ec6bd8ea81c084

Change-Id: I9310237d58a21ee8d47daab8901892bd12016339
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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/31404
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10212 ldlm: fix prolong for destroyed lock 54/31354/2
Alexander Boyko [Wed, 8 Nov 2017 19:30:05 +0000 (14:30 -0500)]
LU-10212 ldlm: fix prolong for destroyed lock

For a IO request ofd_prolong_extent_locks use
a fast path if the lock is found by handle. If the lock
has LDLM_FL_DESTROYED, prolong should try a general path.

No lock was accounted for IO request with destroyed lock
and ESTALE error happaned for a client.

operation ost_read to node x.x.x.x@o2ib failed: rc = -116

Lustre-change: https://review.whamcloud.com/29992
Lustre-commit: 0716d51d082e3a81c10529627c895db008ae8e35

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: I63e619d0330279bb2ae678ed98b1c0e899ad4e08
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31354
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-8264 lod: lfs setstripe fix for pool. 01/31401/2
Hongchao Zhang [Sat, 13 Jan 2018 09:01:54 +0000 (17:01 +0800)]
LU-8264 lod: lfs setstripe fix for pool.

If a file is created (with lfs) in the directory associated
with pool without -p pool_name option then limit stripe count
to number of osts in the pool as that directory is associated
with the pool. This patch fixes this problem.

Also removed the wrong check from ost-pools.sh, test_20 where
we were creating file in a directory associated with pool and
checking it as not part of the pool.

Add test cases in ost_pool.sh test_20.

This is a port of a lustre-master patch.
Lustre-change: https://review.whamcloud.com/#/c/20849/
Lustre-commit: c62ba699c51237ae1a04b59dd23201d8fe852a67

Signed-off-by: Rahul Deshmukh <rahul.deshmukh@seagate.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Seagate-bug-id: MRP-3615
Change-Id: Id6dd5126856db7fc773a1fe9c837a214db8d6d70
Reviewed-on: https://review.whamcloud.com/20849
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit c62ba699c51237ae1a04b59dd23201d8fe852a67)
Reviewed-on: https://review.whamcloud.com/31401
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10449 nrs: Generic TBF policy can't be shown correctly 97/31397/2
Qian Yingjin [Wed, 3 Jan 2018 09:21:10 +0000 (17:21 +0800)]
LU-10449 nrs: Generic TBF policy can't be shown correctly

After setting TBF NID/OPCode/JobID policy and switch to generic
policy, the output of "lctl get_param ost.OSS.ost.nrs_policies"
can not display correctly.

Lustre-change: https://review.whamcloud.com/30696
Lustre-commit: 613f9cb553106316422db40e7f88baccf0438893

Change-Id: If8dcb7ae6ade634ec7ec4dfcb5887501cda90cdf
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@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/31397
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-10460 osd-zfs: Add tunables to disable sync 63/31163/2
Brian Behlendorf [Fri, 12 May 2017 15:05:13 +0000 (08:05 -0700)]
LU-10460 osd-zfs: Add tunables to disable sync

This patch allows replacing the call to txg_wait_synced(),
which blocks waiting for a full pool sync, with a smaller
tunable delay.  This delay is intended to stand in for the time
it would have taken to synchronously write the dirty data to
the intent log.

This allows testing ZFS behaviour as if there were a low-latency
ZIL device enabled to handle sync IO operations.  Setting the
delay to zero disables sync operations on the server completely.
However, be aware that no data is guaranteed to be written to
disk if the tunables are enabled, and this patch is solely for
performance analysis.  By default the tunables are set to -1,
which leaves the system using the normal sync behaviour.

Two new tunables are introduced to control the delay, the
osd_object_sync_delay_us and osd_txg_sync_delay_us module options.
These values default to -1 which preserves the safe full sync
pool behavior.  Setting these values to zero or larger will
replace the pool sync with a delay of N microseconds.

The initial test results obtained by running sanityN test 16
(fsx) are encouraging.  If the zil_commit() time can be kept to
less than 10ms we should see a significant performance improvement.
These tests were run in a pristine centos 6.4 VM and the results
are averaged over four runs.

osd_txg_sync_delay_us     -1    -1     -1     -1      -1
osd_obj_sync_delay_us     -1     0   1000  10000  100000
--------------------------------------------------------
SanityN test 16 (secs)  24.3   7.3    7.6   10.1    34.4

Lustre-change: https://review.whamcloud.com/7761
Lutre-commit: 00c4bd85b372f68c3e75fdab9658c8f0074113be

Change-Id: Iff9b66888edc79a5e1585fa3ce8377be068748f2
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Darby Vicker <darby.vicker-1@nasa.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@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/31163
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>