Whamcloud - gitweb
fs/lustre-release.git
2 years agoLU-10030 llite: extend inode flags into GET/SETXATTR ioctl 72/30072/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.

Change-Id: I5b545bf2c5c601b552a85322c80994dabbca0b12
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/30072
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
2 years agoLU-10011 utils: refactor lfs quota codes 65/29165/4
Wang Shilong [Fri, 22 Sep 2017 04:38:50 +0000 (12:38 +0800)]
LU-10011 utils: refactor lfs quota codes

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

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I9b2a5867ed0416ccb92856538ef029bc59ac2c4b
Reviewed-on: https://review.whamcloud.com/29165
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
2 years agoLU-5024 mdc: don't assert on name pack 61/29161/5
Lai Siyao [Fri, 22 Sep 2017 02:42:07 +0000 (10:42 +0800)]
LU-5024 mdc: don't assert on name pack

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

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

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I58d8b8fbbd8057aa2e8618e8923d0432f31dac96
Reviewed-on: https://review.whamcloud.com/29161
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>
2 years agoLU-9796 ldiskfs: improve inode allocation performance 32/29032/13
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.

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I234ff3027c8d96155d374c56b12aab7c4dc0dafd
Reviewed-on: https://review.whamcloud.com/29032
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9201 tests: don't check network for localhost 11/29011/2
Andreas Dilger [Mon, 15 May 2017 21:56:18 +0000 (23:56 +0200)]
LU-9201 tests: don't check network for localhost

Don't try to check if the network to the local host is up, since
this just wastes time and adds noise to the test output logs.

Remove ancient 1.8 compatibility check.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I6c1f8df613afd657155da1309525e75b9d1c5bae
Reviewed-on: https://review.whamcloud.com/29011
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9899 tests: mount client on MGS for tests with pools 06/28806/10
James Nunez [Thu, 5 Oct 2017 19:51:50 +0000 (13:51 -0600)]
LU-9899 tests: mount client on MGS for tests with pools

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

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

Test-Parameters: combinedmdsmgs=false testlist=sanity,replay-single,conf-sanity

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I4b3e331b8d1ea6c3f8c9ea8a571e26f66f4535f8
Reviewed-on: https://review.whamcloud.com/28806
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9894 lfsck: Print correct lfsck start info 04/28604/5
Patrick Farrell [Mon, 21 Aug 2017 09:45:05 +0000 (04:45 -0500)]
LU-9894 lfsck: Print correct lfsck start info

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

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

Reorder the struct to increasing bit order to fix this.

Test-Parameters: trivial testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ibc82369ff6531b56ceda4b1c0a833720dc61f3f4
Reviewed-on: https://review.whamcloud.com/28604
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8837 utils: make tools lightweight for lustre clients 15/28315/11
James Simmons [Thu, 9 Nov 2017 00:50:48 +0000 (19:50 -0500)]
LU-8837 utils: make tools lightweight for lustre clients

Currently the lustre tools are built for the server target even
for the case of clients rpms. Rework the tools so server specific
code is not built for the client only case. The UAPI headers
lustre_log_user.h, lustre_barrier_user.h, and lustre_disk.h are
server specific and are not available in the upstream client.
So make our tools not to depend on those headers in the client
case. With this change it is simple step to make our tools
buildable against upstream. Last move user land specific code
from lustre_disk.h to mount_utils.h. Don't install server UAPI
headers on client targets.

Change-Id: I6b2b780ac0e7338a085ee6a8747097f0097efca1
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28315
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-5170 lfs: Standardize error messages in adjust_first_extent 04/28304/2
Steve Guminski [Wed, 12 Jul 2017 16:43:22 +0000 (12:43 -0400)]
LU-5170 lfs: Standardize error messages in adjust_first_extent

Error and warning messages in adjust_first_extent() are updated
to a standard format.  Messages are prefixed with the name of the
utility and the command that caused the error.  User-provided values
are delimited with single quotes.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I9240fbce1f8fb065a17eaff1e4bbda70b4a5b0c9
Reviewed-on: https://review.whamcloud.com/28304
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-5170 lfs: Standardize error messages in lfs_component_del() 55/28255/2
Steve Guminski [Wed, 12 Jul 2017 16:07:44 +0000 (12:07 -0400)]
LU-5170 lfs: Standardize error messages in lfs_component_del()

Error messages in lfs_component_del() are updated to a standard
format.  Messages are prefixed with the name of the utility and the
command that caused the error.  User-provided values are delimited
with single quotes.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I02f8b25226efbbe8bd7a96bd2495a98b8d733183
Reviewed-on: https://review.whamcloud.com/28255
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-9343 utils: update the usage of hsm_remove 82/26882/6
Hongchao Zhang [Sat, 15 Apr 2017 21:36:19 +0000 (05:36 +0800)]
LU-9343 utils: update the usage of hsm_remove

Update the usage of hsm_remove in lfs to describe it more correctly.

Change-Id: I2934f0d7038f418dbad3a7e7365c7cd655ee28da
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/26882
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
2 years agoLU-9052 lod: accept lfs mkdir from old client 91/25091/9
Di Wang [Wed, 25 Jan 2017 16:24:28 +0000 (11:24 -0500)]
LU-9052 lod: accept lfs mkdir from old client

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

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

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

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

And also remove some unecessary lmv audit.

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

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

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I74a3712edfa36fd178f92965f8e35f5ff77ad422
Reviewed-on: https://review.whamcloud.com/25091
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
2 years agoLU-10199 utils: strip // from fid2path 78/30078/3
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

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I30591585ccf62e4d793ee658d2772ce1db242034
Reviewed-on: https://review.whamcloud.com/30078
Tested-by: Jenkins
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
2 years agoLU-6142 lnet: remove last of the typedefs from LNet core 47/29847/3
James Simmons [Thu, 9 Nov 2017 20:10:26 +0000 (15:10 -0500)]
LU-6142 lnet: remove last of the typedefs from LNet core

Change the remaining typedefs in LNet core to proper structures.
Several other style changes to fix checkpatch issues with code
impacted by typedef change.

Test-Parameters: trivial

Change-Id: Ic72b31698d1b1e7c612181a50aa7fa921fd417d7
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/29847
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10040 nodemap: add nodemap idmap correctly 64/29364/10
Emoly Liu [Thu, 9 Nov 2017 08:23:48 +0000 (16:23 +0800)]
LU-10040 nodemap: add nodemap idmap correctly

There are 3 situations when adding an idmap {id_client:id_fs} to
a nodemap tree:
 - both id_client and id_fs are matched, that means this idmap
   already exists, so return -EEXIT;
 - neither id_client nor id_fs is matched, that means this is a
   new idmap, so insert it;
 - only "id_client" or "id_fs" is matched, since idmap uses
   "id_client" as index key, we need to delete that old idmap and
   its index by its id_client, and then insert it again. In the
   original implementation, idmap_insert() calls rb_replace_node()
   to replace the old idmap without re-sorting its both id_client
   and id_fs, so that this new added idmap can't be found by
   idmap_search() due to its wrong left and right nodes, and can't
   be deleted either.

Also, this patch improves the following code:
 - nm_idmap_lock: use type rw_semaphore instead of rwlock, because
   nodemap_idx_idmap_del() may sleep on FS operations while this
   lock is being held.
 - Add "update_idmaps" to sanity-sec.sh test_15 to verify this fix,
   and improve other part of this test case as well to make it run
   correctly.

Test-Parameters: testlist=sanity-sec
Signed-off-by: Stephan Thiell <sthiell@stanford.edu>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Icf777f14c2e1dd56fa5cd0eb56666240e206d199
Reviewed-on: https://review.whamcloud.com/29364
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9019 mdt: migrate to 64 bit time 88/28788/15
James Simmons [Thu, 9 Nov 2017 00:44:19 +0000 (19:44 -0500)]
LU-9019 mdt: migrate to 64 bit time

Port the remaining time code from 32 bits to 64 bits.
Replace cfs_time_current_sec() to avoid the overflow
issues in 2038 with ktime_get_real_seconds().

Change-Id: Ia97dbfe00cd90dc6ef04583ba2eb512a8feca8c8
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28788
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9983 llog: skip non-exist log cancellation 18/29218/4
Di Wang [Tue, 26 Sep 2017 05:33:50 +0000 (01:33 -0400)]
LU-9983 llog: skip non-exist log cancellation

Let's skip the record cancellation if the llog does
not exist at all, which usually happens when remote
log creation failed.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: If76d29d8fd72f3c5b619b72a899b18459c608dbb
Reviewed-on: https://review.whamcloud.com/29218
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
2 years agoLU-8998 test: Test 'lfs find' composite file options 26/26926/4
James Nunez [Thu, 3 Aug 2017 19:47:27 +0000 (13:47 -0600)]
LU-8998 test: Test 'lfs find' composite file options

The Progressive File Layout feature expanded the options
to find files using the 'lfs find' utility. Files can be
searched for with the component start, end, count and flags
options.

These 'lfs find' options need to be exercised.

Test-Parameters: trivial
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I36a6e774fa77b4089642ff5f2f8d482b3196aa62
Reviewed-on: https://review.whamcloud.com/26926
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
2 years agoLU-3285 merge: 'dom' branch merging 51/29851/3
Mikhal Pershin [Fri, 10 Nov 2017 10:18:48 +0000 (13:18 +0300)]
LU-3285 merge: 'dom' branch merging

Merge remote-tracking branch 'origin/dom'

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I8c20ac4f5fdae6ec7ad034fbb7f5fda656f03c8b

2 years agoLU-3285 mdc: remove wrong assertion from mdc_object_ast_clear 21/30021/2 dom
Mikhail Pershin [Thu, 9 Nov 2017 19:26:15 +0000 (22:26 +0300)]
LU-3285 mdc: remove wrong assertion from mdc_object_ast_clear

It was added wrongly during DoM development but this
assertion is not correct due to AGL locks,
check LU-6042.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Id14d408cbb7365cd9bb973c48e076abac4cd878f
Reviewed-on: https://review.whamcloud.com/30021
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 tests: disable DOM files in racer by default 20/30020/2
Mikhal Pershin [Wed, 8 Nov 2017 09:58:37 +0000 (12:58 +0300)]
LU-3285 tests: disable DOM files in racer by default

Use RACER_ENABLE_DOM=true to enable dom files in racer
explicitly.

Test-Parameters: mdssizegb=20 mdscount=1 mdtcount=1 testlist=racer
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Ibcbbff0dd995903915a2404c1076108e2016a4cb
Reviewed-on: https://review.whamcloud.com/30020
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-10174 osd-zfs: Fix build against ZFS 0.6.5.x 66/29866/2
Nathaniel Clark [Tue, 31 Oct 2017 16:49:39 +0000 (12:49 -0400)]
LU-10174 osd-zfs: Fix build against ZFS 0.6.5.x

Ensure all values used in https://review.whamcloud.com/29242 are
actually used conditionally.  This allows us to build against
ZFS 0.6.5.7 again.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ide560e21f7b7fedc0c107b1943602e5af99b478c
Reviewed-on: https://review.whamcloud.com/29866
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
2 years agoLU-10151 lnet: report better config error with lnetctl 20/29820/2
Sonia [Fri, 27 Oct 2017 10:14:29 +0000 (03:14 -0700)]
LU-10151 lnet: report better config error with lnetctl

Configuring net or route currently reports generic
message on error. Adding specific error message for
the missing parameters.

With importing config from yaml file, specific
error messages help in finding the exact error.

Change-Id: I7d9bdeb2280f4548897d9958aab7d451b981e8bd
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Test-Parameters: trivial
Reviewed-on: https://review.whamcloud.com/29820
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10067 mdt: reinit lock when fail to try lock 97/29597/4
Hongchao Zhang [Wed, 11 Oct 2017 05:05:28 +0000 (13:05 +0800)]
LU-10067 mdt: reinit lock when fail to try lock

In mdt_lock_objects_in_linkea, the mdt_lock_handle should be
re-initialized when the first try (mdt_object_lock_try) failed.

Change-Id: I8232c40c3e9e239391b7a43d9d16f5563bd794e5
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/29597
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9855 obdclass: cleanup obd_class.h defines 86/29286/5
Ben Evans [Wed, 13 Sep 2017 13:56:07 +0000 (09:56 -0400)]
LU-9855 obdclass: cleanup obd_class.h defines

Get rid of OBT and CTXTP defines.
Remove OBD_CHECK_DT_OP
Convert EXP_CHECK_MD_OP into a function.
Remove CTXT_CHECK_OP.

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: Ia2adc579602818ebdba0a40c99da9e3af1575d24
Reviewed-on: https://review.whamcloud.com/29286
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10041 tests: sanity/51 to cleanup properly 46/29246/5
Alex Zhuravlev [Thu, 28 Sep 2017 11:34:33 +0000 (14:34 +0300)]
LU-10041 tests: sanity/51 to cleanup properly

sanity/51 should cleanup properly in case of failure

Change-Id: Ib1c0e1a116a6802f2bf25d665be5c076ae07c8b8
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/29246
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-1757 brw: add short io osc/ost transfer. 67/27767/12
Patrick Farrell [Mon, 16 Oct 2017 10:22:22 +0000 (05:22 -0500)]
LU-1757 brw: add short io osc/ost transfer.

There's no need to do target bulk io for small amount of
data, and it requires extra network operations.

For this case we add short i/o.  When the i/o size is less
than or equal to some number of pages (default 3), we
encapsulate the data in the ptlrpc request.

With this patch, 4k direct i/o read latency on a Cray Aries
network (data is on flash on another node on the Aries)
drops from ~280 microseconds to ~200 microseconds.  Write
latency drops from ~370 microseconds to ~350 microseconds
(much more of write latency is waiting for write commit).

This translates to about a 25-30% performance improvement
on 4k direct i/o reads and 4k random reads.  (Write
performance improvement was small to non-existent.)

Improvement was similar with 8k i/o.

Buffered sequential i/o sees no improvement, because it
does not perform small i/os.

Performance data:
        access             = file-per-process
        pattern            = segmented (1 segment)
        ordering in a file = random offsets
        ordering inter file= no tasks offsets
        xfersize           = 4096 bytes
        blocksize          = 100 MiB

nprocs  xfsize  shortio dio     random  Read (MB/s)
1       4k      no      yes     no      15.0
8       4k      no      yes     no      73.4
16      4k      no      yes     no      81.1
1       4k      yes     yes     no      16.5
8       4k      yes     yes     no      95.2
16      4k      yes     yes     no      107.3
1       4k      no      no      yes     15.5
8       4k      no      no      yes     73.4
16      4k      no      no      yes     81.2
1       4k      yes     no      yes     16.8
8       4k      yes     no      yes     95.0
16      4k      yes     no      yes     106.5

Note even when individual i/o performance is not improved,
this change reduces the # of network operations required
for small i/o, which can help on large systems.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I70050935eaa0a5e98ca437e18e730be4aa0e4700
Reviewed-on: https://review.whamcloud.com/27767
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7991 quota: project quota against ZFS backend 93/27093/40
Fan Yong [Fri, 3 Nov 2017 01:22:12 +0000 (09:22 +0800)]
LU-7991 quota: project quota against ZFS backend

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

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic488efe19a6e34a3615811f79fb9ea7954ad9263
Reviewed-on: https://review.whamcloud.com/27093
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoNew tag 2.10.55 2.10.55 v2_10_55 v2_10_55_0
Oleg Drokin [Wed, 8 Nov 2017 07:54:57 +0000 (02:54 -0500)]
New tag 2.10.55

Change-Id: I999629a7b3939fb827729e053fc9b52c24ca69ab
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10199 utils: disable sanity test 56xb 54/29954/3
Steve Guminski [Tue, 7 Nov 2017 12:49:06 +0000 (07:49 -0500)]
LU-10199 utils: disable sanity test 56xb

The new sanity test 56xb introduced by changeset 25851 fails due
to a mismatch in the returned vs. expected value.  Disable the test
until it can be fixed.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I12b88eccdf7954ae854133b48cadf7054c8f683e
Reviewed-on: https://review.whamcloud.com/29954
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-10164 kernel: kernel update [SLES12 SP3 4.4.92-6.18] 93/29793/2
Bob Glossman [Wed, 25 Oct 2017 23:53:52 +0000 (16:53 -0700)]
LU-10164 kernel: kernel update [SLES12 SP3 4.4.92-6.18]

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: I4b046f0ac64b75545cd0e2a3a44e9117f4d79ef4
Reviewed-on: https://review.whamcloud.com/29793
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10142 kernel: kernel update RHEL7.4 [3.10.0-693.5.2.el7] 27/29727/2
Bob Glossman [Thu, 19 Oct 2017 15:25:25 +0000 (08:25 -0700)]
LU-10142 kernel: kernel update RHEL7.4 [3.10.0-693.5.2.el7]

update RHEL 7.4 kernel to 3.10.0-693.5.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I6f22d9d96b86d7bd860a400cd803fad26a6b5d1a
Reviewed-on: https://review.whamcloud.com/29727
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10152 tests: reformat after conf-sanity test 99 17/29717/2
James Nunez [Mon, 23 Oct 2017 19:28:13 +0000 (13:28 -0600)]
LU-10152 tests: reformat after conf-sanity test 99

conf-sanity test 99 reformats an OST with options that need
to be cleared to allow future tests to complete successfully.

Reformatting the file system will clear the OST format options.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I32be4bab5a22b9e5f939c6478c96255db30dc0eb
Reviewed-on: https://review.whamcloud.com/29717
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Casper <jamesx.casper@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10150 build: Build with ZFS 0.7.3 12/29712/2
Nathaniel Clark [Mon, 23 Oct 2017 14:52:57 +0000 (10:52 -0400)]
LU-10150 build: Build with ZFS 0.7.3

Update ZFS and SPL version to 0.7.3

Changelog: https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.3

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I88f0f2601262c0c535431d256a159d9e9d6ebd75
Reviewed-on: https://review.whamcloud.com/29712
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9946 nodemap: have fileset on default nodemap. 58/28858/7
Sebastien Buisson [Tue, 5 Sep 2017 15:04:56 +0000 (00:04 +0900)]
LU-9946 nodemap: have fileset on default nodemap.

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

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I3491bce4f8c2011629e56494bf1a0de57f19829d
Reviewed-on: https://review.whamcloud.com/28858
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8174 mdt: remove use of typedef mds_reint_t 94/27494/4
Andreas Dilger [Mon, 30 Oct 2017 18:41:55 +0000 (14:41 -0400)]
LU-8174 mdt: remove use of typedef mds_reint_t

Replace the use of mdt_reint_t with enum mds_reint_op.

Remove the old mds_reint_t and mdt_reint_t since they were only used
in one place in the Lustre code and are unlikely to cause additional
patch breakage.  The majority of references are in wireshark.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I3932db8e6dc9ac83325900d3f382c648ac57b8c0
Reviewed-on: https://review.whamcloud.com/27494
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
2 years agoLU-6051 utils: allow lfs_migrate to handle hard links 51/25851/9
Steve Guminski [Thu, 9 Mar 2017 12:19:44 +0000 (07:19 -0500)]
LU-6051 utils: allow lfs_migrate to handle hard links

Detect files that are hard links to files that have already been
migrated, and skip them.  This prevents unnecessary work and speeds
up the migration process.  Sanity test 56xb has been added to test
the new behavior.  A new option '-S <stripe_size>' has been added
to lfs_migrate, and allows the test to be run with a single OST.

Previously, the default behavior was to skip migration of any
file name that contained hard links other than itself. Therefore,
the file in the link set would not be migrated at all.  The '-l'
option could be used to override.  However, there was no attempt to
detect which file names were hard linked to already migrated files,
so the file would be migrated multiple times.

The new behavior automatically migrates the file once and skips
other file names in the link set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Signed-off-by: Evan Felix <evan.felix@pnnl.gov>
Change-Id: I43678b34931507c0fe30c1c40ca2dc2d47f86aeb
Reviewed-on: https://review.whamcloud.com/25851
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
2 years agoLU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED 88/18888/8
Andreas Dilger [Mon, 30 Oct 2017 16:19:43 +0000 (12:19 -0400)]
LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED

Rename LOV_MAGIC_V1_DEF to LOV_MAGIC_V1_DEFINED so that it is not
confused with "_DEFAULT" as one might expect.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Idb98fc24974a105077bf75bb122006fad34d69e2
Reviewed-on: https://review.whamcloud.com/18888
Tested-by: Jenkins
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10086 libcfs: use dynamic minors for /dev/{lnet,obd} 41/29741/2
John L. Hammond [Tue, 24 Oct 2017 15:28:57 +0000 (10:28 -0500)]
LU-10086 libcfs: use dynamic minors for /dev/{lnet,obd}

Request dynamic minor allocation when registering /dev/lnet and
/dev/obd. Remove the obsolete create-device-if-not-found code from
register_ioc_dev().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I59c70912b4729f58a76dc6107b3e1d7379c6d7a3
Reviewed-on: https://review.whamcloud.com/29741
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10007 pacemaker: Use lctl and load lustre 44/29144/2
Nathaniel Clark [Thu, 21 Sep 2017 17:09:18 +0000 (13:09 -0400)]
LU-10007 pacemaker: Use lctl and load lustre

When scripts are started, load lustre module.
Use lctl instead of directly accessing health_check file.

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4a81248939464e498006dc2c4072d44685add018
Reviewed-on: https://review.whamcloud.com/29144
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
2 years agoLU-9611 lov: allow lov.*.stripe{size,count}=-1 param 46/27946/5
Andreas Dilger [Thu, 6 Jul 2017 06:55:08 +0000 (00:55 -0600)]
LU-9611 lov: allow lov.*.stripe{size,count}=-1 param

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

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

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

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I295d2591d535b039634689524a29725e963ebbe5
Reviewed-on: https://review.whamcloud.com/27946
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7988 hsm: wake up cdt when requests are empty 42/29742/4
Ben Evans [Tue, 24 Oct 2017 15:34:06 +0000 (11:34 -0400)]
LU-7988 hsm: wake up cdt when requests are empty

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

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

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: I563666a1a3e53f0ec5908de593de71ff4d925467
Reviewed-on: https://review.whamcloud.com/29742
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sergey Cheremencev <cherementsev@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10098 scripts: Fix mounted check in Lustre RA 51/29351/3
Nathaniel Clark [Fri, 6 Oct 2017 16:49:23 +0000 (12:49 -0400)]
LU-10098 scripts: Fix mounted check in Lustre RA

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

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib877b0dc3d3ce0d93fd4663aa2418ac21d670428
Reviewed-on: https://review.whamcloud.com/29351
Tested-by: Jenkins
Reviewed-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9994 obdclass: fix llog_cat_id2handle() error handling 70/29370/3
Bruno Faccini [Mon, 9 Oct 2017 15:21:50 +0000 (17:21 +0200)]
LU-9994 obdclass: fix llog_cat_id2handle() error handling

Patch for LU-9153 ("llog: consolidate common error checking") has
introduced a regression in llog_cat_id2handle() error handling
path by adding llog_cat_process_common() common routine additional
call in sequence and allowing it to return zero even when catalog
entry was invalid and it had cleared it instead to populate
llog_handle, thus causing an exception when handle was later
dereferenced in llog_process_thread().

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I50153b931e3c1567bfe9c15564ba29fabe3a2d4c
Reviewed-on: https://review.whamcloud.com/29370
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
2 years agoLU-10132 llite: handle xattr cache refill race 54/29654/2
John L. Hammond [Tue, 17 Oct 2017 20:32:52 +0000 (15:32 -0500)]
LU-10132 llite: handle xattr cache refill race

In ll_xattr_cache_refill() if the xattr cache was invalid (and no
request was sent) then return -EAGAIN so that ll_getxattr_common()
caller will fetch the xattr from the MDT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia9ec7424e8786d92bdecf4897fafcf71d5061fb1
Reviewed-on: https://review.whamcloud.com/29654
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>
2 years agoLU-9951 lustre_compat: add wrapper function for posix_acl_update_mode 71/28871/9
Gu Zheng [Wed, 18 Oct 2017 19:10:53 +0000 (15:10 -0400)]
LU-9951 lustre_compat: add wrapper function for posix_acl_update_mode

posix_acl_update_mode is introduced in kernel 4.9, add the precheck
of it, if not exists, use inline wrapper function instead.

Change-Id: I8a1476d611c387a88efef5d5b8707edf5feacca8
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-on: https://review.whamcloud.com/28871
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9558 llite: port lustre to unified handling of bdi 11/28511/7
Jan Kara [Wed, 18 Oct 2017 16:26:19 +0000 (12:26 -0400)]
LU-9558 llite: port lustre to unified handling of bdi

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

Linux-commit: 9594caf216dc0fe3e318b34af0127276db661241

Change-Id: I5af60ea3661e3d3a97973fd99a79c28dcd1ce1cc
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28511
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7251 osp: do not assign commit callback to every thandle 70/17270/36
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

Change-Id: I460d5eccb585b166423d84d5c142af2e27751d8b
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/17270
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
2 years agoLU-9019 ldlm: migrate the rest of the code to 64 bit time 95/29295/4
James Simmons [Wed, 18 Oct 2017 17:26:00 +0000 (13:26 -0400)]
LU-9019 ldlm: migrate the rest of the code to 64 bit time

Replace the last cfs_time_current_sec() to avoid the overflow
issues in 2038 with ktime_get_real_seconds(). Reduce the jiffies
usage to the bare minimum which is useage for mod_timer() and
schedule_timeout(). This makes the ldlm totally 64 bit time
compliant.

Change-Id: Iaee92c17d51fdfc55bd26e9e813e30a6ce794856
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/29295
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10015 o2iblnd: fix race at kiblnd_connect_peer 34/29134/6
Alexander Boyko [Thu, 21 Sep 2017 13:13:27 +0000 (16:13 +0300)]
LU-10015 o2iblnd: fix race at kiblnd_connect_peer

cmid will be destroyed at OFED if kiblnd_cm_callback return error.
if error happen before the end of kiblnd_connect_peer, it will touch
destroyed cmid and fail as
(o2iblnd_cb.c:1315:kiblnd_connect_peer())
            ASSERTION( cmid->device != ((void *)0) ) failed:

Seagate-bug-id: MRP-4592
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Change-Id: I83eb5bceeb567acef0316498b936d25d6c6ccd95
Reviewed-on: https://review.whamcloud.com/29134
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8066 obd: migrate to ksets 48/28948/11
James Simmons [Mon, 9 Oct 2017 14:39:23 +0000 (10:39 -0400)]
LU-8066 obd: migrate to ksets

Lustre's sysfs only uses kobjects but with the introduction of
ksets we can use functionality like kset_find_kobj() and uevents.
Currently lustre is layered as lustre_kobj -> class -> obd device.
This patch changes the obd devices and the top level lustre_kobj
into ksets. The class level is kept as kobjects but are bound to
the top level lustre kset so they searchable and uevents can be
created for them. Also much of the class functionality can be
replaced with what ksets can do. With obd devices now ksets we
can replace lprocfs_kset_register with lprocfs_obd_setup. Some
of the sysfs attributes were not cleaned up so added proper
removal. Reversed what the default sysfs attributes are. This
will be needed for the replacement functionality for
class_process_proc_param().

Change-Id: I3ced5f69ace6a0a9a6bc51957f20a0caecdbafc9
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28948
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-3285 mdc: implement own mdc_io_fsync_start() 13/29813/3
Mikhal Pershin [Thu, 26 Oct 2017 20:41:32 +0000 (23:41 +0300)]
LU-3285 mdc: implement own mdc_io_fsync_start()

DoM lock cancelation may happen in llite and call
cl_sync_file_range() function to flush related data and
it uses DOM component end as limit for data to be flushed.
However related lock and extent are expanded to EOF and
this is asserted in osc_cache_writeback_range().
To avoid this a MDC uses own version of cio_start for FSYNC
and osc_cache_writeback_range() is called on whole DoM object
no matter what start/end are supplied by upper layers.

Test-Parameters: mdscount=1 mdtcount=1 mdssizegb=20 testlist=sanity-dom,dom-performance,racer
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I044faa95d3664a0448c21e9a2f1c2e5dd3a69cde
Reviewed-on: https://review.whamcloud.com/29813
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 osc: remove wrongly applied assertion. 11/29811/4
Mikhal Pershin [Thu, 26 Oct 2017 19:42:12 +0000 (22:42 +0300)]
LU-3285 osc: remove wrongly applied assertion.

This assertion was removed from master by commit
4311cdaa832 but kept wrongly in dom branch.

Test-Parameters: mdssizegb=20 testlist=sanity-dom,dom-performance
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I403eaca68fd334feb80c5db8c295eef9dbe171ac
Reviewed-on: https://review.whamcloud.com/29811
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 llite: check layout size after cl_object_layout_get 10/29810/4
Mikhal Pershin [Thu, 26 Oct 2017 19:13:32 +0000 (22:13 +0300)]
LU-3285 llite: check layout size after cl_object_layout_get

Check that layout size is not zero before doing flush for
DoM object. Also patch does that:
- initializes all values in cl_layout explicitly
  in lov_object_layout_get().
- changes cl_dom_comp_size to u64 for future needs, e.g.
  importing an existing filesystem image directly.

Test-Parameters: mdssizegb=20 testlist=sanity-dom,dom-performance
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Ic6ff06ad4022f85686fda238eae34ad38ff2dcd0
Reviewed-on: https://review.whamcloud.com/29810
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 lod: don't initialize OSP objects for DoM 12/29812/2
Mikhal Pershin [Thu, 26 Oct 2017 19:49:11 +0000 (22:49 +0300)]
LU-3285 lod: don't initialize OSP objects for DoM

Skip OSP object initialization for DoM component in
lod_use_defined_striping().

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I720eb100198b46974187b6f9d7931650e4f8742b
Reviewed-on: https://review.whamcloud.com/29812
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 lfs: handle -L option alphabetically 09/29809/2
Mikhal Pershin [Thu, 26 Oct 2017 19:08:31 +0000 (22:08 +0300)]
LU-3285 lfs: handle -L option alphabetically

Move -L option handling in lfs.c to handle it
alphabetically.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I6ade41eb8e75df82f0306c89d446955e546f810c
Reviewed-on: https://review.whamcloud.com/29809
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 tests: style fixes in DoM tests 81/29681/3
Mikhail Pershin [Thu, 19 Oct 2017 13:11:45 +0000 (16:11 +0300)]
LU-3285 tests: style fixes in DoM tests

Several style fixes in DoM tests and code from review debts.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I4ee011025a008cfa474db3d1c2f86b2c250483c4
Reviewed-on: https://review.whamcloud.com/29681
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-10041 osd: osd-zfs to choose dnode size 42/29242/3
Alex Zhuravlev [Thu, 28 Sep 2017 11:30:55 +0000 (14:30 +0300)]
LU-10041 osd: osd-zfs to choose dnode size

depending on dnodesize property it can be:
legacy (512 bytes), auto (512 bytes to 16K) or absolute
size (512, 1024, 2048, 4096, 8192, 16384).

Change-Id: Iea35d8ae850523440272467320410850821f484c
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/29242
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
2 years agoLU-10131 llite: Update i_nlink on unlink 51/29651/4
Patrick Farrell [Wed, 18 Oct 2017 10:24:41 +0000 (05:24 -0500)]
LU-10131 llite: Update i_nlink on unlink

Currently, the client inode link count is not updated on
last unlink.  This is fine because the dentries are all
gone and the inode is eligible for reclaim, but it's still
incorrect.  This causes two problems:

1. Inode is not immediately reclaimed
2. i_nlink count is > 0 for a fully unlinked file, which
confuses wrapfs

On last unlink, the MDT sends back attributes.  Use the
nlink count from these to update the client inode.

Remove null check inherited from ll_get_child_fid, because
the inode should never be null on an unlink.

Re-enabled test 76, which passes with this patch.
Removed slab allocator tuning from test_76, because slab is
no longer the default Linux allocator.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ib253b5cf3d35188554cf8fc33a8a3d4b8bb237e8
Reviewed-on: https://review.whamcloud.com/29651
Tested-by: Jenkins
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10089 o2iblnd: use IB_MR_TYPE_SG_GAPS 51/29551/3
Amir Shehata [Tue, 10 Oct 2017 19:26:56 +0000 (12:26 -0700)]
LU-10089 o2iblnd: use IB_MR_TYPE_SG_GAPS

When allocating fastreg buffers use IB_MR_TYPE_SG_GAPS
instead of IB_MR_TYPE_MEM_REG, since the fragments we provide
the fast registration API can have gaps. MEM_REG doesn't handle
that case.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I36dba6f676fdbc60730aed7c50d71f2a6b7c2549
Reviewed-on: https://review.whamcloud.com/29551
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8475 target: use slab allocation 54/21654/5
Alexander Boyko [Wed, 3 Aug 2016 08:12:19 +0000 (11:12 +0300)]
LU-8475 target: use slab allocation

The patch adds kmem slabs for target threads and session info
to improve allocation and better accounting.

Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: Ia0a93d410618c5d7724f2dcc86f1bcb9ae32e572
Seagate-bug-id: MRP-2836
Reviewed-on: https://review.whamcloud.com/21654
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10101 tests: correct sanity-quota call to quota_error 58/29358/2
James Nunez [Fri, 6 Oct 2017 19:53:03 +0000 (13:53 -0600)]
LU-10101 tests: correct sanity-quota call to quota_error

sanity-quota test 7e calls quota_error with a "-u"
argument. Input to quota_error should not be prefaced
with  "-".

Test-Parameters: trivial testgroup=review-zfs-part-1,review-dne-part-2
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iac84e3fb2348588a157beefcf4d554b1ac3171ed
Reviewed-on: https://review.whamcloud.com/29358
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: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10046 misc: replace LASSERT() with CLASSERT() 56/29256/2
Andreas Dilger [Fri, 29 Sep 2017 03:17:15 +0000 (21:17 -0600)]
LU-10046 misc: replace LASSERT() with CLASSERT()

Some code consistency checks are being done at runtime with LASSERT()
when they could be done at compile time with CLASSERT(). This might
miss defects introduced into the code if that particular code path is
not exercised during testing.

Replace LASSERT() with CLASSERT() in such cases.

Style cleanup for related code.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8dca903109b7151de59afe17fe9ca311119d1b36
Reviewed-on: https://review.whamcloud.com/29256
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10141 llapi: integer overflow in llapi_changelog_start 74/29674/2
Henri Doreau [Thu, 19 Oct 2017 08:14:18 +0000 (10:14 +0200)]
LU-10141 llapi: integer overflow in llapi_changelog_start

Use the appropriate type to store and check the return value from lseek.
This prevents from misinterpreting high offsets as errors.

Change-Id: I15e92be3454af20ee6611c2a7ddfc1b597d639c2
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/29674
Tested-by: Jenkins
Reviewed-by: Thomas LEIBOVICI <thomas.leibovici@cea.fr>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10023 kernel: kernel update [SLES12 SP3 4.4.82-6.9] 60/29560/4
Bob Glossman [Fri, 22 Sep 2017 15:29:55 +0000 (08:29 -0700)]
LU-10023 kernel: kernel update [SLES12 SP3 4.4.82-6.9]

Update target and kernel_config files for new version

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

Change-Id: Ie65afb3d7356c4679f4f37f4af324e955261b5af
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/29560
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-4705 mdc: improve mdc_enqueue() error message 78/28978/3
Andreas Dilger [Wed, 13 Sep 2017 16:47:07 +0000 (10:47 -0600)]
LU-4705 mdc: improve mdc_enqueue() error message

Include the parent/child FIDs and name in the mdc_enqueue()
debug message.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7b84921a52a4650be70fe87eea691ba2217bb3a6
Reviewed-on: https://review.whamcloud.com/28978
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9897 utils: remove libcfsutils.a and libptlctl.a 52/28752/7
James Simmons [Mon, 9 Oct 2017 14:37:14 +0000 (10:37 -0400)]
LU-9897 utils: remove libcfsutils.a and libptlctl.a

Currently lustre creates many libraries and combines them in
redudant ways. Broke up libptlctl.a and merged debug.c and
portals.c into lctl. The application lustre_rsync pulled in
way too much extra code that is not needed just for the function
obd_initialize(). Instead just call register_ioc_dev() directly
for lustre_rsync. This removes the libptlctl.a/portals.c
dependency. In time the portals.c code can be replaced by the
work from liblnetconfig. Integrated cyaml into liblnetconfig
instead of directly linking cyaml.c into lnetctl. This way
we can take advantage of YAML in the future for lnet selftest
and lustre utilities. Only a small change was needed for lnet
selftest to be dependent on liblnetconfig instead of libptlctl.a.

Change-Id: Ic1caaa01b3faedf90dc7ae8bc26ee40396a52a07
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28752
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9578 llite: use security context if it's enabled in the kernel 64/27364/4
Alex Zhuravlev [Thu, 1 Jun 2017 07:20:12 +0000 (11:20 +0400)]
LU-9578 llite: use security context if it's enabled in the kernel

if it's disabled, then Lustre stop to work properly (can not create
files, etc)

Change-Id: I1e431ec95a2b0613b43893567eb6d1a64ec832de
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/27364
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9452 ldlm: remove MSG_CONNECT_LIBCLIENT support 72/26972/9
Andreas Dilger [Fri, 5 May 2017 23:39:48 +0000 (17:39 -0600)]
LU-9452 ldlm: remove MSG_CONNECT_LIBCLIENT support

Remove old server code that handled liblustre client connections,
marked with MSG_CONNECT_LIBCLIENT and associated code checking for
exp_libclient.  Servers will now outright refuse connections from
liblustre clients with a clear message, rather than allowing the
connection and pretending to work.  Liblustre client support was
broken and removed years ago.

There are still some liblustre remnants in the code (e.g. blocked
lock handling for LDLM_FL_CANCEL_ON_BLOCK), but that has more
complex semantics and should be removed in a separate patch.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ifbea507e82d758f849db24094c5cc0a8003ebbe5
Reviewed-on: https://review.whamcloud.com/26972
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7990 llite: increase whole-file readahead to RPC size 55/26955/3
Andreas Dilger [Wed, 4 May 2016 05:29:42 +0000 (23:29 -0600)]
LU-7990 llite: increase whole-file readahead to RPC size

Increase the default whole-file readahead limit to match the current
RPC size.  That ensures that files smaller than the RPC size will be
read in a single round-trip instead of sending multiple smaller RPCs.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I3bdb1c7f92c546d58951a9e6b783af23c83ebbe5
Reviewed-on: https://review.whamcloud.com/26955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9405 utils: remove device path parsing from mount.lustre 09/26909/3
John L. Hammond [Mon, 1 May 2017 21:54:16 +0000 (16:54 -0500)]
LU-9405 utils: remove device path parsing from mount.lustre

In mount_utils_ldiskfs.c remove code that analyzes the device path
(/dev/mdXX, /dev/mdXXpX, /dev/mapper/XXX, /dev/loopX ...) to determine
the device type and replace with use of stat(). Locate the device's
sysfs directory using the /sys/dev/block/<major>:<minor> symlink
rather than globbing. Rename set_blockdev_tunables() to
tune_block_dev() and break into subfunctions to handle setting
md/stripe_cache_size, queue/max_sectors_kb, and queue/scheduler.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ibd272bdf2e76bdec4c207c29dff76a96a65ea333
Reviewed-on: https://review.whamcloud.com/26909
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-9019 ofd: migrate to 64 bit time 76/28976/9
James Simmons [Tue, 17 Oct 2017 00:40:19 +0000 (20:40 -0400)]
LU-9019 ofd: migrate to 64 bit time

Change fmd_expire and ofd_fmd_max_age to time64_t fields since we
don't need more than seconds resolution. Move several parts of the
code away from jiffies handling since it can be different across a
set of nodes. We leave l_last_used and the stats timeout code alone
since it affects more than the ofd layer.

Change-Id: I505ad9b1c553bf1769241a5920cf146595a3812c
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28976
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-9814 ldiskfs: restore simple_strtol in prealloc 53/28553/5
Yang Sheng [Tue, 15 Aug 2017 10:42:09 +0000 (18:42 +0800)]
LU-9814 ldiskfs: restore simple_strtol in prealloc

Since kstrtol needs a null-terminor string so we
back to use simple_strtol in prealloc patches.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I331308d830fbeef9c00156bb8c14b43651d66420
Reviewed-on: https://review.whamcloud.com/28553
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-4923 osd-ldiskfs: dirdata is not needed on MGS 74/29274/2
Andreas Dilger [Fri, 29 Sep 2017 21:25:04 +0000 (15:25 -0600)]
LU-4923 osd-ldiskfs: dirdata is not needed on MGS

Don't print a warning message if the "dirdata" feature is not enabled
on MGS devices.  It is only needed for ldiskfs MDT devices.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1d8ccfc9c60eff128b480ea8efa298c1212c041a
Reviewed-on: https://review.whamcloud.com/29274
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9782 osd-ldiskfs: avoid extra search 45/28145/8
Alexey Lyashkov [Thu, 20 Jul 2017 09:06:18 +0000 (14:36 +0530)]
LU-9782 osd-ldiskfs: avoid extra search

Extent tree grow greatly durin random IO test with small block size.
osd_is_mapped responsible to large cpu consumption in this case.

|          |
|          |--94.49%-- ldiskfs_es_find_delayed_extent_range
|          |          ldiskfs_fiemap
|          |          osd_is_mapped
|          |          osd_declare_write_commit
|          |
|          |--5.49%-- ldiskfs_fiemap
|          |          osd_is_mapped
|          |          osd_declare_write_commit
|
|--21.80%-- ldiskfs_es_find_delayed_extent_range
|          |
|          |--100.00%-- ldiskfs_fiemap
|          |          osd_is_mapped

let's cache a osd_is_mapped result to avoid extra search in extent
tree,

Seagate-bug-id: MRP-4474
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: I63d480bfc7c6b7599b80ceeec9447b227a1610c8
Reviewed-on: https://review.whamcloud.com/28145
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-4134 obdclass: obd_device improvement 45/8045/30
Alexander Boyko [Thu, 15 Jun 2017 14:25:58 +0000 (17:25 +0300)]
LU-4134 obdclass: obd_device improvement

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

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

Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Seagate-bug-id: MRP-2139 MRP-3267
Change-Id: I9cc6860431c6bb7db6983e0d15a5d3d2b564265e
Reviewed-on: https://review.whamcloud.com/8045
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9990 lnet: add backwards compatibility for YAML config 33/29333/4
Amir Shehata [Thu, 12 Oct 2017 23:43:08 +0000 (19:43 -0400)]
LU-9990 lnet: add backwards compatibility for YAML config

In 2.10 YAML configuration had a numa block, which was
removed post 2.10. The YAML parser needs to continue handling
the numa block to maintain backwards compatibility.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ic6ff6033631c5bec82323d9f8d5d4f2a19fd8d1b
Reviewed-on: https://review.whamcloud.com/29333
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Doug Oucharek <dougso@me.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9968 tests: correct stripe index sanity 300g 35/28935/3
James Nunez [Mon, 11 Sep 2017 21:16:42 +0000 (15:16 -0600)]
LU-9968 tests: correct stripe index sanity 300g

In sanity test 300g, we set the starting stripe index to MDT 1
and MDT 2 using 'lfs setstripedir -iN' for N = 1 and 2. At the
beginning of the test, we check that there are two or more MDTs
in the Lustre file system being tested. If there are only two MDTs,
then this test will fail when we try to set the starting stripe
index to 2 because the MDT indexes are zero based.

For santiy test 300g only use MDT start index 0 and 1.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: If2c252ad9bb7249aa777764f212ee40523aee82f
Reviewed-on: https://review.whamcloud.com/28935
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
2 years agoLU-9860 tests: Run command on MGS for conf-sanity 33a 78/28478/7
James Nunez [Fri, 11 Aug 2017 00:57:53 +0000 (18:57 -0600)]
LU-9860 tests: Run command on MGS for conf-sanity 33a

When conf-sanity test 33a is run on a Lustre configuration
with separate MGS and MDS, the 'lctl set_param' command for
timeout must be run on the MGS.

For the same test, adding the '--mgs' flag when formatting
the MDS of the second file system should be based on
if there is a combined or separate MDS and MGS.

Test-Parameters: combinedmdsmgs=false testlist=conf-sanity

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iadb9e0e3ab4f64edba2c0bbc938e64ff3bce9468
Reviewed-on: https://review.whamcloud.com/28478
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: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-3285 tests: add dom into racer test suite 31/29631/7
Jinshan Xiong [Mon, 16 Oct 2017 18:44:00 +0000 (11:44 -0700)]
LU-3285 tests: add dom into racer test suite

Add dom into racer test and fix a problem where it checks OSTCOUNT
to decide if to use specific layout.

Test-parameters: trivial testlist=racer,racer,racer mdscount=1 mdtcount=1

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ie3245644589f636201d11d9fc2ce86ecec82649e
Reviewed-on: https://review.whamcloud.com/29631
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>
2 years agoLU-3285 mds: combine DoM bit with other IBITS 24/28024/28
Mikhal Pershin [Mon, 16 Oct 2017 09:54:01 +0000 (12:54 +0300)]
LU-3285 mds: combine DoM bit with other IBITS

The DoM bit combining with other ibits opens way to several
optimization, like getting IO lock in advance along with OPEN,
size attribute caching at client and others.

Test-Parameters: mdssizegb=20 testlist=sanity-dom,dom-performance
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I442f742b21efba84a0c61501f4877a36c7e9d572
Reviewed-on: https://review.whamcloud.com/28024
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3] 10/28910/9
Bob Glossman [Thu, 7 Sep 2017 19:37:27 +0000 (12:37 -0700)]
LU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3]

Minor linux version upgrade, but SP2 and SP3 use linux 4.4 versions.
Some new kernel patches, a few revised ldiskfs patches.
All new target and config files.
Some autoconf changes to adapt to new or altered kernel APIs.

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

Change-Id: I99e2b6848197ea19402fa415fdb562d03e87d947
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-on: https://review.whamcloud.com/28910
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9140 nrs: measure the runtime of dd directly 78/27878/10
Qian Yingjin [Thu, 29 Jun 2017 09:03:44 +0000 (17:03 +0800)]
LU-9140 nrs: measure the runtime of dd directly

This patch changes the way to measure the runtime of "dd". Instead
of parsing the output of "dd", we use date command to calculate
the runtime of dd directly, avoiding the parsing failure caused
by changed output format of "dd".

Change-Id: Ibd2e3963f791404ee927981238227012cf4dbf2c
Test-Parameters: trivial testlist=sanityn
Signed-off-by: Qian Yingjin <qian@ddn.com>
Reviewed-on: https://review.whamcloud.com/27878
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-10119 scripts: Correct shebang/hashpling format 05/29605/2
Chris Horn [Fri, 13 Oct 2017 18:58:42 +0000 (13:58 -0500)]
LU-10119 scripts: Correct shebang/hashpling format

Shebang/hashpling should not have a space between the number sign and
exclamation mark.

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I4a31d7dd7579bfaf231284c678e4100acea77d9b
Reviewed-on: https://review.whamcloud.com/29605
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-8344 test: fix sanity 256 98/29598/3
Alexander Boyko [Fri, 13 Oct 2017 08:57:49 +0000 (04:57 -0400)]
LU-8344 test: fix sanity 256

The test error
 Changelog catalog has wrong number of slots 1
is a result of the debugfs dump happaned before a previous
changes were commited to a disk.

The patch adds mds sync before debugfs command.
Also it fixes temp file removal.

Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Ic14a58956642f419b0f6d695027f88a0cad9fd39
Test-Parameters: trivial testlist=sanity
Reviewed-on: https://review.whamcloud.com/29598
Reviewed-by: Sergey Cheremencev <cherementsev@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-10029 osd-ldiskfs: make project inherit attr removeable 89/29189/5
Wang Shilong [Mon, 25 Sep 2017 12:35:26 +0000 (20:35 +0800)]
LU-10029 osd-ldiskfs: make project inherit attr removeable

Inherit attribute should be clearable now

Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I878fde0dc134c9820436ee80979d87e6dacfb70d
Reviewed-on: https://review.whamcloud.com/29189
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9416 hsm: add kkuc before sending registration RPCs 51/28751/5
Henri Doreau [Wed, 23 Aug 2017 15:16:25 +0000 (17:16 +0200)]
LU-9416 hsm: add kkuc before sending registration RPCs

This avoids a situation where the registration completes and the CDT
sends HSM actions just before the kkuc registration happens. In this
case the client drops the actions because there are no CT pipes in the
kkuc list.

Change-Id: Icbd6575f04c0ca7e8f731ee8481ec72a9ff4f2e1
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/28751
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9752 man: Reference zgenhostid instead of genhostid 27/29327/2
Nathaniel Clark [Thu, 5 Oct 2017 11:43:26 +0000 (07:43 -0400)]
LU-9752 man: Reference zgenhostid instead of genhostid

In ZFS 0.7.0, they added zgenhostid(8) to be used in place of
Redhat's genhostid, so that there would be a platform agnostic
way to generate /etc/hostid.

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I691266d04f91d5fa7c50b72948c801afa69d647d
Reviewed-on: https://review.whamcloud.com/29327
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-3285 mdt: use generic grant code at MDT 21/28021/24
Mikhal Pershin [Sun, 11 Dec 2016 17:16:25 +0000 (20:16 +0300)]
LU-3285 mdt: use generic grant code at MDT

Use grants at MDT for Data-on-MDT needs.
Add parameter to reserve part of available space
for metadata and never grants it to clients.

Test-Parameters: mdssizegb=20 testlist=dom-performance
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I2612352062871e4edd3817f32e7d96cb95a0a52b
Reviewed-on: https://review.whamcloud.com/28021
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
2 years agoLU-3285 test: add Data-on-MDT tests and fixes 20/28020/26
Mikhail Pershin [Thu, 21 Aug 2014 10:23:33 +0000 (14:23 +0400)]
LU-3285 test: add Data-on-MDT tests and fixes

- add test for basic DoM functionality in sanity.sh
- add test to read/write many files with small chunks of data,
  it is used for performance comparision.
- the sanity-dom.sh is added to test Data-on-MDT.
  It contains specific sanity tests and calls sanity.sh and
  sanityn.sh with limited set of test to cover the same cases
  as OSC.
- fixes for DoM code for issues revealed by tests.

Test-Parameters: mdssizegb=20 testlist=sanity-dom,dom-performance
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I17fbbf8e913cc14043703969d01ac65e6828fcc6
Reviewed-on: https://review.whamcloud.com/28020
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-3285 mdc: add IO stats in mdc 19/28019/26
Mikhal Pershin [Fri, 11 Dec 2015 10:18:17 +0000 (13:18 +0300)]
LU-3285 mdc: add IO stats in mdc

Add IO statistic into MDC like in OSC

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I2763ef56fe5dac5c7f04309ce81bbed7b71af37d
Reviewed-on: https://review.whamcloud.com/28019
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
2 years agoLU-3285 mds: add IO locking to the MDC and MDT 18/28018/25
Mikhal Pershin [Wed, 9 Dec 2015 13:08:53 +0000 (16:08 +0300)]
LU-3285 mds: add IO locking to the MDC and MDT

- introduce new DOM inodebit for Data-on-MDT files.
- add IO lock and glimpse handling at MDT along with
needed LVB updates for it.
- a MDC is updated to exclude DOM bit from ELC and to
handle LVB changes due to glimpse on MDT.
- add CLIO locking at MDC, it uses IBITS lock to protect
data at MDT and a MDC handles such locks to convert them
into proper CLIO locks.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Id95c7a5db814b399c961a5364af33d2bf5798055
Reviewed-on: https://review.whamcloud.com/28018
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
2 years agoLU-3285 lvbo: pass lock as parameter to lvbo_update() 16/28016/19
Mikhal Pershin [Thu, 22 Dec 2016 11:15:11 +0000 (14:15 +0300)]
LU-3285 lvbo: pass lock as parameter to lvbo_update()

LVBO lvbo_update call was using ldlm_resource as parameter,
the ldlm_lock parameter is added to recognize DoM resource
in MDT LVBO functions and perform DoM specific actions.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Id1cfee12bfc13893206c771f45acf7dd44da56ba
Reviewed-on: https://review.whamcloud.com/28016
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 mdc: add IO methods to the MDC 15/28015/19
Mikhal Pershin [Tue, 8 Dec 2015 06:45:03 +0000 (09:45 +0300)]
LU-3285 mdc: add IO methods to the MDC

Add CL IO methods specific for MDC. Update and export
related OSC functions to be used from MDC.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I0397b7f754c778c2af6479e1cde7437d4f86cac9
Reviewed-on: https://review.whamcloud.com/28015
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 osc: common client setup/cleanup 14/28014/19
Mikhal Pershin [Wed, 9 Dec 2015 17:48:30 +0000 (20:48 +0300)]
LU-3285 osc: common client setup/cleanup

Make OSC code related to client setup/cleanup common for
both OSB and MDC. Add new events in mdc_import_event().

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: Ifcbd2011d0360d1671fd3193bb527d472361ebdd
Reviewed-on: https://review.whamcloud.com/28014
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 mdt: IO request handling in MDT 13/28013/19
Mikhal Pershin [Mon, 7 Dec 2015 10:19:00 +0000 (13:19 +0300)]
LU-3285 mdt: IO request handling in MDT

Add methods to handle IO requests in MDT similar to OFD.
Introduce MDS_INODEBITS_DOM bit for data on MDT, destinguish
IO requests to MDT and OST and take appropriate lock in
target code.

Change-Id: I7feaa00c381f821510ca1343b042ed5f09050ac6
Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Reviewed-on: https://review.whamcloud.com/28013
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-3285 lfs: add parameter for Data-on-MDT file 12/28012/16
Mikhail Pershin [Mon, 23 Jun 2014 18:05:45 +0000 (22:05 +0400)]
LU-3285 lfs: add parameter for Data-on-MDT file

Add --layout|-L parameter to lfs setstripe to create
file with data on MDT layout.
Add DoM size limit at LOD level - lod.dom_stripesize
parameter.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ib97142cc23c75e890dc619c14e5ffb3f3c47cda5
Reviewed-on: https://review.whamcloud.com/28012
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-9469 ldiskfs: add additional attach_jinode call 65/28665/17
Bob Glossman [Wed, 23 Aug 2017 18:51:24 +0000 (11:51 -0700)]
LU-9469 ldiskfs: add additional attach_jinode call

In some execution paths jinode data structures are not
getting initialized. Add an extra init call to fix that.

Test-Parameters: clientdistro=sles12sp2 testlist=conf-sanity \
  mdsdistro=sles12sp2 ossdistro=sles12sp2 \
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I087eb06b9c5122be1cfd0aabbc04ea1db7ec765a
Reviewed-on: https://review.whamcloud.com/28665
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9908 tests: force umount client in test 70e, 41b, and 105 67/28767/10
Yang Sheng [Mon, 28 Aug 2017 19:30:13 +0000 (03:30 +0800)]
LU-9908 tests: force umount client in test 70e, 41b, and 105

In test_70e, import state may not update while
mds stopping. Since statfs will be invoked in sles12
before umounting, so umount with force flag to avoid
waitting a long time.
Add -f to stopall call in test-framework for the same reason,
to do umount with force flag.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I3d1e73b3501e98008ef18c05f7b5498d12cb46fb
Reviewed-on: https://review.whamcloud.com/28767
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9983 ko2iblnd: allow for discontiguous fragments 90/29290/5
John L. Hammond [Mon, 2 Oct 2017 21:23:15 +0000 (16:23 -0500)]
LU-9983 ko2iblnd: allow for discontiguous fragments

In the IOVEC case the buffers passed to the LND may not span
complete pages, therefore the RDMA descriptor needs to describe
all the buffers.  Moreover for the FMR case, the addresses that get
set in the RDMA descriptor need to be relative addresses. This
issue was exposed after:
LU-9026 o2iblnd: Adapt to the removal of ib_get_dma_mr()

Fastreg still expects only one fragment with the total nob.
Otherwise there is a dump_cqe error from MLX5

Test-Parameters: trivial
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ie1cf52677f65af83357a3dd25fd1a45f3466a96e
Reviewed-on: https://review.whamcloud.com/29290
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>