Whamcloud - gitweb
fs/lustre-release.git
3 years agoLU-9339 ldiskfs: fix regression of macro check 69/26769/3
Wang Shilong [Fri, 21 Apr 2017 02:31:22 +0000 (22:31 -0400)]
LU-9339 ldiskfs: fix regression of macro check

include/linux/quota.h undefine @PRJQUOTA and make it
enum, ldiskfs macro check here will be negative, fix
it to use @HAVE_PROJECT_QUOTA, also wrap ext4-export-*.patch
to ext4-projid-feature-support.patch.

Change-Id: I415e366423408413dfb5b99dee98f7a30513f83f
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/26769
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9276 kernel: kernel update [SLES12 SP1 3.12.69-60.64.35] 86/26286/6
Bob Glossman [Thu, 30 Mar 2017 16:27:47 +0000 (09:27 -0700)]
LU-9276 kernel: kernel update [SLES12 SP1 3.12.69-60.64.35]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ied31b0a3601ac6e1db06da3e0167b875d1f2200a
Reviewed-on: https://review.whamcloud.com/26286
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9183 llite: handle removal of parent argument of ->d_compare() 18/25818/13
Dmitry Eremin [Thu, 2 Mar 2017 19:48:44 +0000 (22:48 +0300)]
LU-9183 llite: handle removal of parent argument of ->d_compare()

In commit 6fa67e707559303e086303aeecc9e8b91ef497d5 the parent
parameter for ->d_compare() was removed.

Change-Id: Ia241619c3ade13036154973a19f44a2083a9bc53
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25818
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9183 libcfs: handle get_user_pages() with gup_flags 17/25817/10
Dmitry Eremin [Thu, 2 Mar 2017 19:39:37 +0000 (22:39 +0300)]
LU-9183 libcfs: handle get_user_pages() with gup_flags

In commit c8fe4609827aedc9c4b45de80e7cdc8ccfa8541b the arguments
write/force for get_user_pages() were replaced with gup_flags.

Change-Id: I64b3e69ee736d1f3be48f2c4c8fe1af1dc14e857
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25817
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9152 mgc: Remove unnecessary checks for config_log_put() 54/25854/4
Steve Guminski [Mon, 6 Mar 2017 21:05:22 +0000 (16:05 -0500)]
LU-9152 mgc: Remove unnecessary checks for config_log_put()

Because config_log_put() now checks if its parameter is NULL, it
is unnecessary to perform the check prior to calling it.  This patch
removes the redundant checks.

Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Id6b1fccebd5bc53a29bc364b9a3c47956649920a
Reviewed-on: https://review.whamcloud.com/25854
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
3 years agoLU-9306 tests: more debug info for hsm test_24d 70/26770/7
Fan Yong [Sat, 3 Dec 2016 02:18:35 +0000 (10:18 +0800)]
LU-9306 tests: more debug info for hsm test_24d

More debug information for sanity-hsm test_24d.
Drop unnecessary condition check for mdt_hsm_cdt_stop().

Test-Parameters: testlist=sanity-hsm,sanity-hsm,sanity-hsm,sanity-hsm
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ib4a43693d364e208468937d15e3c48a1b1afb17a
Reviewed-on: https://review.whamcloud.com/26770
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8424 osd-zfs: ZFS macro DN_MAX_BONUSLEN is deprecated 78/26078/3
Ned Bass [Sat, 18 Mar 2017 00:55:46 +0000 (17:55 -0700)]
LU-8424 osd-zfs: ZFS macro DN_MAX_BONUSLEN is deprecated

The ZFS macro DN_MAX_BONUSLEN was deprecated as of ZFS 0.7.0. Lustre
should instead use the compatibility wrappers such as
osd_dmu_object_alloc() and osd_zap_create_flags(). The reason for the
API change is that ZFS 0.7.0 adds support for variable length dnodes,
so the maximum bonus length should not be treated as a fixed
constant. The maximum bonus length may vary by dnode and by dataset,
and it should be derived accordingly.

This change:

- Adds an additional compatibility function osd_obj_bonuslen(obj) to
  obtain a maximum bonus length given an osd_object.

- Updates code that uses the deprecated macro to instead use
  appropriate compatibility interfaces.

- Removes the definition of DN_MAX_BONUSLEN that was added in commit
  49fc02fb738e9420ab10c5a7d41534c7a55b8ea0 to ensure that future
  builds using the deprecated macro will fail.

- Adds DN_MAX_BONUSLEN and DN_OLD_MAX_BONUSLEN to the list of
  deprecated interfaces in checkpatch.pl.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I1fcc84e55b39ca49a88acb909b5e3294f3b46723
Reviewed-on: https://review.whamcloud.com/26078
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9323 kernel: kernel update RHEL7.3 [3.10.0-514.16.1.el7] 90/26590/2
Bob Glossman [Wed, 12 Apr 2017 14:49:38 +0000 (07:49 -0700)]
LU-9323 kernel: kernel update RHEL7.3 [3.10.0-514.16.1.el7]

update RHEL 7.3 kernel to 3.10.0-514.16.1.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ia53f001b7b277a20349b23ffdf54e0b0dbc1d065
Reviewed-on: https://review.whamcloud.com/26590
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9327 test: handle nodes lacking numbers in names for hostlist_expand. 60/26560/3
James Simmons [Thu, 13 Apr 2017 19:54:23 +0000 (15:54 -0400)]
LU-9327 test: handle nodes lacking numbers in names for hostlist_expand.

Currently hostlist_expand() in test-framework assumes all node names will
contain numbers to sort them by. It is possible to have nodes that instead
are named alphabetical in nature (nodea, nodeb, ...). Handle this additional
case.

Change-Id: I014d7934a869192b3bc1908b4b0d559724d443c9
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/26560
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9008 pfl: Read should not trigger layout write intent 99/26499/10
Jinshan Xiong [Tue, 11 Apr 2017 11:08:16 +0000 (19:08 +0800)]
LU-9008 pfl: Read should not trigger layout write intent

In lov_io_rw_iter_init(), only write not read operation should
trigger layout write intent.

For append write, it has to make sure all uninited components
are instantiated.

Page mkwrite should also trigger write intent.

Fixed sanity-pfl test cases as well - in order to instantiate
a component by truncate, the truncated size must be within the
extent of component.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I3c5257c5799ae0df35a572b9ee981f583260e8ec
Reviewed-on: https://review.whamcloud.com/26499
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9292 utils: handle partitioned MD arrays correctly 99/26399/2
Jadhav Vikram [Tue, 4 Apr 2017 04:08:11 +0000 (09:38 +0530)]
LU-9292 utils: handle partitioned MD arrays correctly

mount.lustre doesn't handle partitioned MD arrays correctly.
The function set_blockdev_tunables doesn't correctly parse
the newer names of partitioned MD devices (e.g /dev/md0p2).
It is written to parse the older partitioned MD devices
(e.g /dev/md_d2p3). This means that MD partions like /dev/md0p2
do not receive MD-level tunings that non-partitioned MD devices
get (specifically stripe_cache_size), leading to a large
performance hit. so fix is to handle newer and older MD device
names.

Seagate-bug-id: MRP-2608
Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Christopher Walker <chris.walker@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Change-Id: Ia0abe63e725e3a70d2561960faa1bc48981f2fd0
Reviewed-on: https://review.whamcloud.com/26399
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9258 nodemap: group quota ID not properly mapped 09/26209/4
Kit Westneat [Mon, 27 Mar 2017 16:27:27 +0000 (12:27 -0400)]
LU-9258 nodemap: group quota ID not properly mapped

This patch fixes a typo in which group quota IDs were mapped as user
IDs for quota commands.

Test-Parameters: trivial
Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I9458b4af04a3638fb8ccf3bd2a96b30305021514
Reviewed-on: https://review.whamcloud.com/26209
Tested-by: Jenkins
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-9227 nrs: Rate change of a TBF rule loses control 85/26085/4
Qian Yingjin [Mon, 20 Mar 2017 02:33:54 +0000 (10:33 +0800)]
LU-9227 nrs: Rate change of a TBF rule loses control

In some test cases, i.e.
start dd_0 {dd.0} 1000
dd if=/dev/zero of=/mnt/lustre/test bs=1M count=100
start dd_1000 {dd.1000} 1000
After ran above commands, changing rate of dd_0 take no effect.
The reason is that starting rule dd_1000 increases the sequence,
but the sequence number of the class with id "dd.0" does not
change accordingly, resulting in failure of rate change.
This patch fixes this problem.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I9cdd469fd57dea692b86285cc26040a117b120ad
Reviewed-on: https://review.whamcloud.com/26085
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9153 llog: update llog print format to use FIDs 40/25640/9
Andreas Dilger [Mon, 27 Feb 2017 00:32:40 +0000 (17:32 -0700)]
LU-9153 llog: update llog print format to use FIDs

Print llog identifiers using FIDs instead of OSTID format, which has
been deprecated since 2.3.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id012c059e8151e2a78086579150f04b1b05cab07
Reviewed-on: https://review.whamcloud.com/25640
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9148 kernel: kernel update RHEL6.8 [2.6.32-642.15.1.el6] 33/25633/5
Bob Glossman [Wed, 22 Feb 2017 17:32:41 +0000 (09:32 -0800)]
LU-9148 kernel: kernel update RHEL6.8 [2.6.32-642.15.1.el6]

Update RHEL6.8 kernel to 2.6.32-642.15.1.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iaac7b99246b9e9d3204c3545aaf0b9d2fd8d3185
Reviewed-on: https://review.whamcloud.com/25633
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8457 pacemaker: Update healthLNET to 0.99.4 97/25297/5
Nathaniel Clark [Tue, 7 Feb 2017 13:55:06 +0000 (08:55 -0500)]
LU-8457 pacemaker: Update healthLNET to 0.99.4

Fixed minor issue with lnet connectivity
Fix License header.

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I074b93e2e3ea29e608a6f1b46600556a1b255438
Reviewed-on: https://review.whamcloud.com/25297
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
3 years agoLU-8397 mgc: add comma-separated nids for primary MGS 08/21308/4
Vladimir Saveliev [Wed, 1 Feb 2017 15:29:56 +0000 (23:29 +0800)]
LU-8397 mgc: add comma-separated nids for primary MGS

In lustre_start_mgc(), if the primary MGS has multiple nids separated by
commas, then only the first nid is added, and the other nids are not added.
This patch fixes the above issue by adding the nids until the end of the
primary MGS nid list or hitting the first failover MGS nid.

Test-Parameters: combinedmdsmgs=false envdefinitions=ONLY=77 testlist=conf-sanity
Test-Parameters: envdefinitions=ONLY=77 testlist=conf-sanity

Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Seagate-bug-id: MRP-2930
Change-Id: I3e84786bfc08767c75a133affb4f86325d789d6e
Reviewed-on: https://review.whamcloud.com/21308
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9354 utils: fix lfs.c compile for PPC 27/26727/2
Andreas Dilger [Wed, 19 Apr 2017 02:53:00 +0000 (20:53 -0600)]
LU-9354 utils: fix lfs.c compile for PPC

Fix the lfs_setstripe_args parameter to use "unsigned long long"
for lsa_comp_end so that when passed to llapi_parse_size() it is
the correct type.  PPC annoyingly uses "unsigned long" for __u64
while most other architectures use "unsigned long long".

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I27b724d5eab5f4669bde1f5fb44c75a1051ba7bd
Reviewed-on: https://review.whamcloud.com/26727
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9311 pfl: shouldn't reprocess done/no-op resent request 74/26474/5
Bobi Jam [Mon, 10 Apr 2017 17:50:04 +0000 (01:50 +0800)]
LU-9311 pfl: shouldn't reprocess done/no-op resent request

When the LOVEA buffer is bigger than the request reply buffer, the
client will resend the layout write intent RPC, and
mdt_layout_change() should not reprocess it since the 2nd process
will try to cancel the 1st granted CR lock, while client has not
get it granted yet because of the reply buffer shortage resend the
RPC.

There is another layout change resent case: the client's job has been
done by another client, referring lod_declare_layout_change -EALREADY
case, and it became a operation w/o transaction, so we should not do
the layout change, otherwise mdt_layout_change() will try to cancel
the granted server CR lock whose remote counterpart is still in hold
on the client, and a deadlock ensues.

This patch also adjusts some debug messages, makes dump_lsm() dump
uninstantiated component stripe info.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I9b063ee54d57c233eca3250502a2707997892898
Reviewed-on: https://review.whamcloud.com/26474
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9324 test: get layout parameters 78/26578/9
Bobi Jam [Thu, 13 Apr 2017 03:36:58 +0000 (11:36 +0800)]
LU-9324 test: get layout parameters

Add test framework functions get_layout_param()/parse_layout_param
to get plain/PFL file/dir layout parameters, so that the layout
parameters can be used later.

Test-Parameters: trivial testlist=sanity-pfl
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4f43a5b4d23e353660114b7ff299a97afc405a07
Reviewed-on: https://review.whamcloud.com/26578
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-9168 spec: New lustre-resource-agents rpm 29/26229/4
Nathaniel Clark [Mon, 27 Mar 2017 16:55:31 +0000 (12:55 -0400)]
LU-9168 spec: New lustre-resource-agents rpm

This rpm bundles up all resource agents for Lustre into a single RPM.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ifc4422f11e9d6b4c1e03ef85fc78e35d6fcb0316
Reviewed-on: https://review.whamcloud.com/26229
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Zhiqi Tao <zhiqi.tao@intel.com>
Reviewed-by: Gabriele Paciucci <gabriele.paciucci@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8840 osp: handle EA cache properly (2) 07/25207/4
Fan Yong [Sat, 8 Oct 2016 06:00:24 +0000 (14:00 +0800)]
LU-8840 osp: handle EA cache properly (2)

For success case, dt_xattr_get() should return the EA size
instead of zero. If such EA does not exist, return -ENODATA.

More code cleanup for OSP EA cache to avoid potential reference
leak, buffer overflow, and so on.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I85d7c7a2cafd50334f2ea0634f5e2b21c0b3908e
Reviewed-on: https://review.whamcloud.com/25207
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-2155 utils: Enable ldiskfs mmp on tunefs failover add 58/26758/2
Nathaniel Clark [Wed, 19 Apr 2017 14:54:51 +0000 (10:54 -0400)]
LU-2155 utils: Enable ldiskfs mmp on tunefs failover add

Enable Multi-Mount Protection in ldiskfs when adding a failover peer
via tunefs.  MMP is enabled in mkfs if failover is configured
initially, but it wasn't if failover was added later.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ie21ef5324de240afe0fd760cb4a9b3e1b4165064
Reviewed-on: https://review.whamcloud.com/26758
Tested-by: Jenkins
Reviewed-by: Zhiqi Tao <zhiqi.tao@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-8998 utils: allow "--component-*" to be abbreviated 99/26699/2
Andreas Dilger [Tue, 18 Apr 2017 07:35:54 +0000 (01:35 -0600)]
LU-8998 utils: allow "--component-*" to be abbreviated

Allow "--component-foo" arguments to be abbreviated to "--comp-foo"
to simplify userspace, especially for options like "--comp-flags"
that do not have a short option.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8c434dd68c042efefc2df93d0f2d7b9bc33ebbe5
Reviewed-on: https://review.whamcloud.com/26699
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9351 pfl: setstripe to existing file 55/26655/2
Niu Yawei [Mon, 17 Apr 2017 12:58:32 +0000 (08:58 -0400)]
LU-9351 pfl: setstripe to existing file

It's ok to setstripe to an existing file when the file has no
LOVEA created yet, so we should not use exlusive open for the
'lfs setstripe'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2090ba2940b391f7853cc06ccdb9cd842ad6f984
Reviewed-on: https://review.whamcloud.com/26655
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
3 years agoLU-9335 pfl: calculate PFL file LOVEA correctly 97/26597/11
Bobi Jam [Thu, 13 Apr 2017 16:37:25 +0000 (00:37 +0800)]
LU-9335 pfl: calculate PFL file LOVEA correctly

PFL file could contain uninstantiated component, so it could still
keeps the specified -1 stripe count,
lov_mds_md_size()/lov_user_md_size() should heed this case,
otherwise its LOVEA size could be errneous big.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ied4bf4531f0b0ac9fdefc9efef3c97ae5ae449f4
Reviewed-on: https://review.whamcloud.com/26597
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8922 lod: check master stripes properly 76/24776/5
Di Wang [Mon, 9 Jan 2017 15:07:36 +0000 (10:07 -0500)]
LU-8922 lod: check master stripes properly

When creating striped directory, it should
first check if the stripe has been created
on the current MDT, otherwise it might create
duplicate stripes on the master MDT, especially
when one MDT is deactived, and specified stripes
is larger than the active MDTs.

Test-Parameters: envdefinitions=ONLY=50 testlist=conf-sanity,conf-sanity,conf-sanity
Test-Parameters: envdefinitions=ONLY=50 testlist=conf-sanity,conf-sanity,conf-sanity
Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Id3bba2817c4c7c9584f9129e32555f0f676b3364
Reviewed-on: https://review.whamcloud.com/24776
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>
3 years agoLU-5718 o2iblnd: multiple sges for work request 51/12451/12
Liang Zhen [Tue, 28 Oct 2014 03:34:26 +0000 (11:34 +0800)]
LU-5718 o2iblnd: multiple sges for work request

In current protocol, lnet router cannot align buffer for rdma,
o2iblnd may run into "too fragmented RDMA" issue while routing
non-page-aligned IO larger than 512K, because each page will
be splited into two fragments by kiblnd_init_rdma().

With this patch, o2iblnd can have multiple sges for each work
request, and combine multiple remote fragments of the same page
into one work request to resovle the "too fragmented RDMA" issue.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Id57a74dc92801b012956ab785233aa87cac14263
Reviewed-on: https://review.whamcloud.com/12451
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9334 lfsck: object leak in lfsck_load_one_trace_file 03/26703/2
Fan Yong [Tue, 29 Nov 2016 13:18:08 +0000 (21:18 +0800)]
LU-9334 lfsck: object leak in lfsck_load_one_trace_file

In lfsck_load_one_trace_file(), if we successfully load or
create the object via local_index_find_or_create(), but the
subsequent do_index_try() failed, then we need to release
such object, otherwise it will be left there.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic3c7db9239e0d10a5cf6fc2254a4c414f4cd007f
Reviewed-on: https://review.whamcloud.com/26703
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-1032 build: fix typo in lustre-dkms.spec changelog 58/26358/2
Andreas Dilger [Tue, 4 Apr 2017 23:22:51 +0000 (17:22 -0600)]
LU-1032 build: fix typo in lustre-dkms.spec changelog

Fix typo in the lustre-dkms.spec.in ChangeLog which has an
invalid date, and causes a build warning.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I6029c93928f84ff59c8798d2f8115e872c4cab07
Reviewed-on: https://review.whamcloud.com/26358
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9384 tests: skip 2.9 filesystem images on 2.10 89/26789/2
Andreas Dilger [Sun, 23 Apr 2017 04:19:00 +0000 (22:19 -0600)]
LU-9384 tests: skip 2.9 filesystem images on 2.10

The 2.9 disk images upgraded to 2.10 are causing common test failures
due to small differences in space usage.  Disable testing these images
until a proper fix is available.

Test-Parameters: trivial envdefinitions=ONLY=32 testlist=conf-sanity
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I64d14ac6b079c50ee234ff886c9a80d9213ebbe5
Reviewed-on: https://review.whamcloud.com/26789
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-6283 ptlrpc: Implement NRS Delay Policy 01/14701/32
Chris Horn [Thu, 12 Mar 2015 23:25:14 +0000 (18:25 -0500)]
LU-6283 ptlrpc: Implement NRS Delay Policy

The NRS Delay policy seeks to perturb the timing of request processing
at the PtlRPC layer, with the goal of simulating high server load, and
finding and exposing timing related problems. When this policy is
active, upon arrival of a request the policy will calculate an offset,
within a defined, user-configurable range, from the request arrival
time, to determine a time after which the request should be handled.
The request is then stored using the cfs_binheap implementation,
which sorts the request according to the assigned start time.
Requests are removed from the binheap for handling once their start
time has been passed.

The behavior of the policy can be controlled via three proc files
which can be written to via lctl similar to other policies.

nrs_delay_min: Controls the minimum amount of time, in seconds, that a
request will be delayed by this policy. The default is 5 seconds.

nrs_delay_max: Controls the maximum amount of time, in seconds, that a
request will be delayed by this policy. The default is 300 seconds.

nrs_delay_pct: Control the percentage of requests that will be delayed
by this policy. The default is 100. Note, when a request is not
selected for handling by the delay policy due to this variable then
the request will be handled by whatever fallback policy is defined
for that service. If no other fallback policy is defined then the
request will be handled by the FIFO policy.

Some examples:

lctl set_param *.*.*.nrs_delay_min=reg_delay_min:5, to set the regular
request minimum delay on all PtlRPC services to 5 seconds.

lctl set_param *.*.*.nrs_delay_min=hp_delay_min:2, to set the
high-priority request minimum delay on all PtlRPC services to 2
seconds.

lctl set_param *.*.ost_io.nrs_delay_min=8, to set both the regular and
high-priority request minimum delay of the ost_io service to 8
seconds.

lctl set_param *.*.*.nrs_delay_max=reg_delay_max:20, to set the
regular request maximum delay on all PtlRPC services to 20 seconds.

lctl set_param *.*.*.nrs_delay_max=hp_delay_max:10, to set the
high-priority request maximum delay on all PtlRPC services to 10
seconds.

lctl set_param *.*.ost_io.nrs_delay_max=35, to set both the regular
and high-priority request maximum delay of the ost_io service to 35
seconds.

lctl set_param *.*.*.nrs_delay_pct=reg_delay_pct:5, to delay 5
percent of regular requests on all PtlRPC services.

lctl set_param *.*.*.nrs_delay_pct=hp_delay_pct:2, to delay 2 percent
of high-priority requests on all PtlRPC services.

lctl set_param *.*.ost_io.nrs_delay_pct=8, to delay 8 percent of both
regular and high-priority requests of the ost_io service.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: Iab50a639900adf31893c7b1fe83658932fd59db1
Reviewed-on: https://review.whamcloud.com/14701
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9319 statahead: skip agl for the file in restoring 01/26501/4
Fan Yong [Mon, 7 Mar 2016 21:34:36 +0000 (05:34 +0800)]
LU-9319 statahead: skip agl for the file in restoring

In case of restore, the MDT has the right size and has already sent
it back without granting the layout lock, inode is up-to-date. Then
AGL (async glimpse lock) is useless.

Also to glimpse we need the layout, in case of a running restore the
MDT holds the layout lock so the glimpse will block up to the end of
restore (statahead/agl will block).

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iaaf138a28671c3eccfb05b08ce8d7364423256a1
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: https://review.whamcloud.com/26501
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9332 tests: fix pool_list issue in conf-sanity test_82b 82/26582/3
Emoly Liu [Fri, 14 Apr 2017 06:18:49 +0000 (14:18 +0800)]
LU-9332 tests: fix pool_list issue in conf-sanity test_82b

In conf-sanity.sh test_82b, if we use separated MGS and MDS nodes,
MDS needs more time to list the OSTs in pool, so use wait_update
instead of the pool_list command.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I8f7281d44a12731d7ae2d1f8fa9bad163086cecc
Reviewed-on: https://review.whamcloud.com/26582
Tested-by: Jenkins
Reviewed-by: Parinay Kondekar <parinay.kondekar@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9086 gss: handle specific mgc binding 59/25959/10
James Simmons [Sun, 9 Apr 2017 20:27:02 +0000 (16:27 -0400)]
LU-9086 gss: handle specific mgc binding

Recent work has made mgc config log handle more than one MGC
existing on a client node which is the case when more than
one lustre file system is mounted. This broke sptlrpc
handling due to cfg_instance no longer being NULL. Since
this is the case we remove the cfg_instance NULL test in
class_config_llog_handler.

The second problem exposed was due to cfg_obdname changing from
the file system name to the actual mgc abstract client device.
Since target2fsname() was only checking fsname-[MDT|OST]XXXX we
could use this function with the obd_uuid field which has the
format of fsname-[MDT|OST]XXXX_UUID. For the case of obd names
with the format fsname-XXXXXXX those obd device have an obd_uuid
that is just some random long hexadecimal string. To handle the
obd_uuid case use the proper obd_uuid2fsname() function instead
of target2fsname(). Rename target2fsname() to obdname2fsname()
since this what it now does. Add handling the fsname-XXXXXXXX
obd name format to obdname2fsname().

Change-Id: I6c3235b3e2d41ef955b98d30aec76d47346c2369
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25959
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8458 pacemaker: Resource to manage Lustre Target 64/25664/4
Nathaniel Clark [Tue, 28 Feb 2017 14:22:22 +0000 (09:22 -0500)]
LU-8458 pacemaker: Resource to manage Lustre Target

A new script to monitor health and mount/umount lustre target.

pcs resource create [Resource Name] ocf:lustre:Lustre
target=/dev/mapper/mpatha mountpoint=/mnt/MGS

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

Test-Parameters: trivial
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I1cfa42604af3c777c1b8d6ed344e22ceccfceb62
Reviewed-on: https://review.whamcloud.com/25664
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
Reviewed-by: Zhiqi Tao <zhiqi.tao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9083: Add scripts to collect and analyze Lustre RPC traces 95/25395/7
CongXu [Fri, 10 Feb 2017 22:36:33 +0000 (14:36 -0800)]
LU-9083: Add scripts to collect and analyze Lustre RPC traces

A set of scripts to collect and analyze RPC traces in a Lustre file system.
These scripts turn the Lustre debug-daemon on and off, before and after
launching a job respectively. They also allow users to parse and visualize
the logged RPC traces.

Test-Parameters: trivial
Change-Id: I6ee598ff6e49b2a7406354172b10bd295e801cb0
Signed-off-by: CongXu <cong.xu@intel.com>
Reviewed-on: https://review.whamcloud.com/25395
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Omkar Kulkarni <omkar.kulkarni@intel.com>
3 years agoLU-9075 mdt: avoid race causing mdt_coordinator_cb() err msgs 43/25243/2
Bruno Faccini [Fri, 3 Feb 2017 16:55:37 +0000 (17:55 +0100)]
LU-9075 mdt: avoid race causing mdt_coordinator_cb() err msgs

This patch mainly moves mdt_agent_record_update() call before
mdt_cdt_remove_request() in mdt_hsm_update_request_state(), to
avoid the frequent couple of
"(mdt_coordinator.c:1473:mdt_hsm_update_request_state()) ...
Cannot find running request for cookie ..."
and
"(mdt_coordinator.c:339:mdt_coordinator_cb()) ...
cannot cleanup timed out request ..."
error msgs, likely to concern active requests that have completed
and thus that have already been removed from memory in
mdt_hsm_update_request_state() (using mdt_cdt_remove_request() and
in the context of a MDT thread handling CT's MDS_HSM_PROGRESS
requests), but the corresponding action LLOG record update is stuck
awaiting for CDT to give-back cdt_llog_lock in
mdt_agent_record_update().

Others related but minor changes are, use of arr_req_change instead of
arr_req_create to more accuratelly determine if a request exceeds the
timeout, and change main debug msg in mdt_hsm_update_request_state()
to reflect if action LLOG record update will occur or not.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I043813f1ff11a7e9e99c534fa8560a35e2c52543
Reviewed-on: https://review.whamcloud.com/25243
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8641 tests: tests: speedup metabench 52/22852/2
Elena Gryaznova [Fri, 30 Sep 2016 18:15:57 +0000 (21:15 +0300)]
LU-8641 tests: tests: speedup metabench

With huge number of nfiles created by metabench
rm -rf called at the end of run_metabench() takes a very long
time.
Sine metabench cleanup is also very slow, metabench
execution without -k option is useless to use also.
Patch adds mbench_CLEANUP mode, default value is true.
When set to false -- metabench testdir is just renamed to avoid
files/dirs deletion.

Seagate-bug-id: MRP-3454
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Change-Id: Iaa130785d27dc3a87f642723fcaad6dc5e748440
Reviewed-on: https://review.whamcloud.com/22852
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>
3 years agoLU-8832 tests: fix module loading for Parallels 60/25660/5
Andreas Dilger [Mon, 27 Feb 2017 10:54:28 +0000 (03:54 -0700)]
LU-8832 tests: fix module loading for Parallels

It isn't possible to insmod modules directly from Parallels prl_fs
mounting a host filesystem when testing directly from a build tree
(insmod from an RPM installed in the root image filesystem works).
Instead, copy the locally-built module into /tmp before loading it.

Use load_module() in sanity.sh test_180b and run-llog.sh.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id0123059e8151e2a78086579150f04b1b05cab07
Reviewed-on: https://review.whamcloud.com/25660
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9280 osd-zfs: don't mark existing on failed creation 17/26617/3
Niu Yawei [Fri, 14 Apr 2017 05:18:21 +0000 (01:18 -0400)]
LU-9280 osd-zfs: don't mark existing on failed creation

In osd_object_create(), existing flag shouldn't be set on failure.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I77dd96f0e3c562c6bef659dc0af405a1ce488805
Reviewed-on: https://review.whamcloud.com/26617
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoNew tag 2.9.56 2.9.56 v2_9_56 v2_9_56_0
Oleg Drokin [Sat, 22 Apr 2017 01:12:21 +0000 (21:12 -0400)]
New tag 2.9.56

Change-Id: I20adf1083b0c081ce818941c87b40f64631ad8e4
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8333 test: Add replay-dual 21b to ALWAYS_EXCEPT 31/26631/4
Jim Casper [Fri, 14 Apr 2017 18:19:52 +0000 (14:19 -0400)]
LU-8333 test: Add replay-dual 21b to ALWAYS_EXCEPT

Replay-dual's subtest test_21b has been failing more than half the time
(since June 2016) with a COS check failure.  Finding a fix for this
is taking longer than expected.  We would like to except this subtest
until a better COS check test can be developed.  This change only
affects the replay-dual.sh test set script.

Test-Parameters: trivial testlist=replay-dual

Change-Id: I575342ae5b6633efc198383b3351b4d9cfc1fbf0
Signed-off-by: Jim Casper <jamesx.casper@intel.com>
Reviewed-on: https://review.whamcloud.com/26631
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9320 test: Skip sanity test_80[12]* 16/26616/3
Saurabh Tandan [Fri, 14 Apr 2017 00:55:35 +0000 (17:55 -0700)]
LU-9320 test: Skip sanity test_80[12]*

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

Skipping following tests: test_801a, test_801b, test_801c,
test_802

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

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

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

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

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

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

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

Test-parameters: trivial

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

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

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

Update SLES11 SP4 kernel to 3.0.101-97

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

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

Update target and kernel_config files for new version

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

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

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

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

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

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

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

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

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

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

Check pointers for NULL before passing to other functions.

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

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

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

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

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

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

Print out the pathname of the open files being skipped.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Linux-commit: 86655400c6e74751a73be82ea40d5ae6979c3225

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

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

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

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

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

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

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

FIEMAP_FLAG_DEVICE_ORDER flag must be set while issuing
FS_IOC_FIEMAP ioctl.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use LCME_ID_INVAL instead of comparing component IDs to 0.

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

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

Fix man page dates.

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

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

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

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

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

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

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

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

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

These tests are failing regularly, disable until fixed.

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

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

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

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

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

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

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

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

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

also fix a typo bug in osp_attr_set().

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Pick following patchs from upstream:

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

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

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

commit 040cb3786d9b25293b8b0b05b90da0f871e1eb9b
ext4: adds project ID support

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

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

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

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

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

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

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

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

Merge remote-tracking branch 'origin/pfl'

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

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

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

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

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

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

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

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

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I14709fdbac76b5512e58099e4e536cf9c973868c
Reviewed-on: https://review.whamcloud.com/18900
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9165 pfl: MDS handling of write intent IT_LAYOUT RPC
Bobi Jam [Wed, 1 Mar 2017 09:25:49 +0000 (17:25 +0800)]
LU-9165 pfl: MDS handling of write intent IT_LAYOUT RPC

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Remove the long-obsolete llbackup.8 man page.

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

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

It's missing from commit a1e0fd6f.

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

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

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

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

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

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

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

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

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

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

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

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

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

Added man pages for the new layout component interfaces:

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

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

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

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

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

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

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2bff0dce6f00f330657097a9ae9f775396e090cb
Reviewed-on: https://review.whamcloud.com/24876
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>