Whamcloud - gitweb
fs/lustre-release.git
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>
3 years agoLU-8998 utils: enlarge default inode size
Niu Yawei [Tue, 10 May 2016 03:30:24 +0000 (23:30 -0400)]
LU-8998 utils: enlarge default inode size

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

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

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

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

Added test scripts sanity-pfl.sh for PFL.

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

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

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

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

* 'lfs getstripe' to support composite file:

   --component-count:
   Display component count only;

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

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

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

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

* 'lfs find' to support composite file:

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

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

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

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

* 'lfs setstripe' to support composite file:

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

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

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

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

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

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

Extend the llapi_layout API to support composite layout.

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

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

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

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

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

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

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

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

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

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

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

{get/set}stripe support composite layout

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

Make client layer support composite layout.

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

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

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

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

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

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

Modify the LOD to make it support the composite layout:

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

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

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

- Store default layout xattr on the filesystem root inode.

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

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

Added basic structures and magic numbers for composite layout.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The ost_num_threads parameter has been deprecated since 1.6 or so.

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

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

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

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ic7389d935f1258bc4217dfe36fcbf2b468b14f20
Reviewed-on: https://review.whamcloud.com/23330
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
3 years agoLU-8458 pacemaker: Script to monitor Server status 97/22297/7
Gabriele Paciucci [Mon, 8 Aug 2016 16:29:24 +0000 (17:29 +0100)]
LU-8458 pacemaker: Script to monitor Server status

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

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

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

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

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

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

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

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

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

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

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

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

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

To check whether snapshot may cause trouble or not.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This patch is to fix the following issues:

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

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

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

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

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

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

To describe how to use barrier and snapshot commands.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Test-Parameters: trivial

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8466d8560b5d5070873f10746189fd82bf6f0172
Reviewed-on: https://review.whamcloud.com/24900
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8403 obd: remove unused data parameter from obd_notify() 28/24428/2
John L. Hammond [Mon, 19 Dec 2016 16:42:44 +0000 (10:42 -0600)]
LU-8403 obd: remove unused data parameter from obd_notify()

Remove the unused data parameter from obd_notify() and related
functions.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1ae72de176ae71441cf486ad6a10c45d57b32aad
Reviewed-on: https://review.whamcloud.com/24428
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8808 mdt: avoid out of order ChangeLog during restore 38/23638/6
Bruno Faccini [Mon, 7 Nov 2016 23:49:42 +0000 (00:49 +0100)]
LU-8808 mdt: avoid out of order ChangeLog during restore

In hsm_cdt_request_completed(), upon restore completion, layout
lock is returned before associated ChangeLog entry has been created.
This allows for a timing window where concurrent file updater can
take control and create its own ChangeLog out of order (before
restore ChangeLog).
This can puzzle, ChangeLog readers (like RobinHood), and have them
think of a wrong file state.
This patch fixes this hole by posting restore ChangeLog before
giving back layout lock.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I958cb61aab34a6a0edc97f4d1390eed623631c21
Reviewed-on: https://review.whamcloud.com/23638
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8701 tests: scrub-performance with separated MGS and MDS 24/23124/4
Fan Yong [Sun, 6 Nov 2016 14:12:57 +0000 (22:12 +0800)]
LU-8701 tests: scrub-performance with separated MGS and MDS

Support to run scrub-performance under the environment of MGS and
MDS on separated devices.

Test-Parameters: trivial envdefinitions=SLOW=yes combinedmdsmgs=false testlist=scrub-performance
Test-Parameters: trivial envdefinitions=SLOW=yes testlist=scrub-performance
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5b01097f3e73c2e0eca6071ecb597ac84893c77d
Reviewed-on: https://review.whamcloud.com/23124
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-137 obdclass: add dt_object_put() and use it 92/23092/8
Andreas Dilger [Tue, 11 Oct 2016 21:18:45 +0000 (15:18 -0600)]
LU-137 obdclass: add dt_object_put() and use it

Introduce dt_object_put() and dt_object_put_nocache() and use them
instead of lu_object_put() and lu_object_put_nocache(), to balance
the use of dt_object_locate() to make a symmetrical interface.

Move the existing ofd_object_put() and osd_object_put() wrappers
into common header functions to use instead of dt_object_put()
or lu_object_put() calls in the respective code, when possible.

Functionally, this patch is a no-op.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7ef657438441de4a91ee08edb4bc097ac97b7418
Reviewed-on: https://review.whamcloud.com/23092
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-5969 tests: allow "version" without "lustre:" prefix 47/26047/2
Andreas Dilger [Thu, 16 Mar 2017 21:09:04 +0000 (15:09 -0600)]
LU-5969 tests: allow "version" without "lustre:" prefix

Fix lustre_build_version() to handle if "lctl get_param version"
returns a bare version number like "2.9.54" as done with the
upstream kernel client and once https://review.whamcloud.com/25632
lands, instead of the old prefixed "lustre: 2.8.53" version string.

This was already fixed in "lctl lustre_build_version" in patch
https://review.whamcloud.com/25324 but due to the order of checks
in lustre_build_version() the fallback of using "lctl --version"
took precedence, which returns only the build version of the lctl
tool itself and not the Lustre module version.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1b0d87d186d234b62aa59bcadde42452323ebbe5
Reviewed-on: https://review.whamcloud.com/26047
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: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8872 quota: incorrect LASSERT 24/24024/5
Niu Yawei [Wed, 30 Nov 2016 03:43:56 +0000 (22:43 -0500)]
LU-8872 quota: incorrect LASSERT

Remove an incorrect LASSERT in qsd_add_deferred().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I7ea0274032ac67e3a039a0a0982d5945498fd434
Reviewed-on: https://review.whamcloud.com/24024
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9040 scrub: handle group boundary properly (2) 59/26059/2
Fan Yong [Sun, 6 Nov 2016 13:57:55 +0000 (21:57 +0800)]
LU-9040 scrub: handle group boundary properly (2)

In the osd_inode_iteration() logic, if the next/exec method
sets the iteration @offset variable just as group boundary:
the LDISKFS_INODES_PER_GROUP(sb), the original logic cannot
incrase the group#, as to the iteration repeats in the same
groupc for ever.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie55d8ffaed2257baed9761a30c09c62e23105434
Reviewed-on: https://review.whamcloud.com/26059
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>
3 years agoLU-9216 config: move config types into lustre_idl.h 22/26022/5
Niu Yawei [Thu, 16 Mar 2017 02:28:27 +0000 (22:28 -0400)]
LU-9216 config: move config types into lustre_idl.h

Move config type values CONFIG_T_XXX into lustre_idl.h since they
will be put on wire when reading config log for IR and nodemap.

Add missing wire checks for mgs_nidtbl_entry, mgs_config_body and
mgs_config_res.

Redefine CONFIG_SUB_XXX for the sub clds attached on config log.

Test-Parameters: clientjob=lustre-b2_7_fe clientbuildno=133 testlist=runtests

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9eb7a89c0fee0c11666bc8f587d3fd5e2ad4fc8d
Reviewed-on: https://review.whamcloud.com/26022
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@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>
3 years agoLU-7497 tests: Fix test failure in conf-sanity 32b 40/25940/4
Jinshan Xiong [Sat, 11 Mar 2017 00:57:10 +0000 (16:57 -0800)]
LU-7497 tests: Fix test failure in conf-sanity 32b

It turned out that the MGS svc was wrongly turned on in disk image
'disk2_4-zfs.tar.bz2', which caused the OST mount failure with
EALREADY because the MGS service has already been started by the MDS.

This is just a temporary solution and the final fix would be to clean
the disk image in question.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I912d39c08ba1437078fe7126d4498950ebeadaf1
Reviewed-on: https://review.whamcloud.com/25940
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9102 test: Include specific headers needed by Posix suite 06/25606/8
Wei Liu [Thu, 23 Feb 2017 17:07:41 +0000 (09:07 -0800)]
LU-9102 test: Include specific headers needed by Posix suite

Change prefix to the missing headers on el7

Change-Id: I79d59104a224ccf51795072e2a12da1a113cdaa0
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/25606
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9026 o2iblnd: Adapt to the removal of ib_get_dma_mr() 77/25277/10
Dmitry Eremin [Thu, 2 Mar 2017 18:32:47 +0000 (21:32 +0300)]
LU-9026 o2iblnd: Adapt to the removal of ib_get_dma_mr()

In Linux kernel 4.9-rc1, the function ib_get_dma_mr()
was removed and a second parameter was added to ib_alloc_pd().

This patch fixes this breakage by:

- Detect if ib_get_dma_mr() has been removed, if so, do the
  following:
- Make it so the module parameter map_on_demand can no longer be
  zero (we have to configure FMR/FastReg pools; it can no longer be
  off).
- No longer try to use the global DMA memory region, but make use
  of the FMR/FastReg pool for all RDMA Tx operations.
- Everywhere we are using the device DMA mr to derive the
  L-key for non-registered memory regions, use the
  pd->local_dma_lkey value instead.
- Make the default map_on_demand = 256.  This will allow nodes with
  this patch to still connected to older nodes without this patch
  and FMR/FastReg turned off.  When FMR/FastReg is turned off, we
  use 256 as the max frags so the two sides will still be able to
  communicate and work.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: Iab967d1fdff760c2b06aed395152772fe71bc26d
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25277
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8366 test: Remove PIOS tests 14/26014/2
James Nunez [Wed, 15 Mar 2017 21:25:30 +0000 (15:25 -0600)]
LU-8366 test: Remove PIOS tests

PIOS is an old benchmark and is not open source. PIOS should
be removed from sanity-benchmark.

Test-Parameters: trivial testlist=sanity-benchmark
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Id89ab1107e4d7e444f6149d04bd90b4ea8c7828b
Reviewed-on: https://review.whamcloud.com/26014
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
3 years agoLU-9169 kernel: kernel update [SLES12 SP2 4.4.49-92.11] 88/25688/3
Bob Glossman [Tue, 28 Feb 2017 19:39:37 +0000 (11:39 -0800)]
LU-9169 kernel: kernel update [SLES12 SP2 4.4.49-92.11]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I210b548c1f27a9e444626a29dfd61953850d60ff
Reviewed-on: https://review.whamcloud.com/25688
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-4423 llite: get rid of lustre_dump_dentry() 39/25639/4
Al Viro [Thu, 9 Mar 2017 18:11:35 +0000 (13:11 -0500)]
LU-4423 llite: get rid of lustre_dump_dentry()

it's not only badly racy, it's actually dead code - the call in
ll_invalidate_aliases() is unreachable.  For an alias of our inode
to be root dentry, the inode would have to be its ->d_inode, aka
the root inode, and we never call ll_invalidate_aliases() for that.

Linux-commit: 5e9e2040247ac19a46d6627736ece726c46f1fdf

Change-Id: Ic5e475102793424396bb8b173eb8d9a3b020bd82
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25639
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9153 utils: improve llog name parsing 68/25468/7
Andreas Dilger [Wed, 15 Feb 2017 06:28:39 +0000 (23:28 -0700)]
LU-9153 utils: improve llog name parsing

Current llog name specification is totally non-standard for
lctl llog_print, llog_info, and related commands.  Change this
to accept llog names without the leading '$', since adding '$'
is non-intuitive and the shell will think this is a variable
and "$fsname-client" becomes "-client" unless it is escaped.

Similarly, llog identifiers were formatted like "#0x4:10#0000000"
instead of the standard FID format [0x4:0x10:0x0].  Update the
code to accept and print FIDs in normal format.

Add lctl-llog_print.8, lctl-llog_info.8, lctl-llog_catlist.8 man
pages.

Add a test case for parsing "lctl llog_print" with both old
and new input formats.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Idc00308162eb40b121b49bae3a6bc1d9326927fb
Reviewed-on: https://review.whamcloud.com/25468
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9117 tests: SKIP sanity/129 on older MDS versions 40/25440/3
Parinay Kondekar [Tue, 14 Feb 2017 11:48:14 +0000 (17:18 +0530)]
LU-9117 tests: SKIP sanity/129 on older MDS versions

LU-3531 esp the change,
"LU-3531 mdt: delete striped directory" is not present
on 2.5.x esp on tags less 2.5.56.

Thus sanity/129 test needs to be skipped in interop
with such MDS versions.

Test-Parameters: testlist=sanity
Signed-off-by: Parinay Kondekar <Parinay.Kondekar@seagate.com>
Change-Id: I3f1b92ed5ef5b8011bee8b2ef77c7c5b0db197b2
Reviewed-on: https://review.whamcloud.com/25440
Reviewed-by: John L. Hammond <john.hammond@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>
3 years agoLU-1095 mdt: quiet mdt_mfd_set_mode() debugging 99/25399/2
Andreas Dilger [Sat, 11 Feb 2017 02:12:50 +0000 (19:12 -0700)]
LU-1095 mdt: quiet mdt_mfd_set_mode() debugging

Quiet overly verbose debugging in mdt_mfd_set_mode().

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ibdd77b70bfdd430fb9e3f976564780f5d1877613
Reviewed-on: https://review.whamcloud.com/25399
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7092 tests: generate sanity proc_dirs on facet 63/25363/9
Andreas Dilger [Fri, 10 Feb 2017 01:09:35 +0000 (18:09 -0700)]
LU-7092 tests: generate sanity proc_dirs on facet

For sanity test_133f and test_133g generate the list of available
/proc and /sys directories for lnet and lustre on the remote facet
instead of only the client, so that the tests work during interop.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0125e20656a712eb620ba4f07d1eaeeb0b9cab07
Reviewed-on: https://review.whamcloud.com/25363
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9014 test: handle separate MGS in conf-sanity test_72() 52/24852/3
John L. Hammond [Thu, 12 Jan 2017 14:56:22 +0000 (08:56 -0600)]
LU-9014 test: handle separate MGS in conf-sanity test_72()

In conf-sanity test_72() when using a separate MGS, add --replace to
the mkfs options to prevent failures from already registered targets.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I06a266a8ca954c4b7c62fee3957145854d48dd38
Reviewed-on: https://review.whamcloud.com/24852
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
3 years agoLU-9010 obdclass: use static initializer macros where possible 27/24827/3
John L. Hammond [Wed, 11 Jan 2017 17:03:45 +0000 (11:03 -0600)]
LU-9010 obdclass: use static initializer macros where possible

In lustre/ldlm/ replace module load time initialization of several
atomics, lists, locks, mutexes, wait queues, etc with static
initialization using the kernel provided macros.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5514992762b95fb23a154970abebd34fb65d9be2
Reviewed-on: https://review.whamcloud.com/24827
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9066 ldlm: don't evict client on umount if AST fails 21/23921/10
Mikhal Pershin [Thu, 3 Nov 2016 22:17:30 +0000 (06:17 +0800)]
LU-9066 ldlm: don't evict client on umount if AST fails

When server is being stopped the AST send is denied and
that AST failure will lead to the unexpected client
eviction.
Patch adds extra checks in ldlm_handle_ast_error() to
distinguish that type of error and proceed without
eviction.

Signed-off-by: Mikhal Pershin <mike.pershin@intel.com>
Change-Id: I57c7f417376ac64c8df4c6d5f68bea5083c0d22f
Reviewed-on: https://review.whamcloud.com/23921
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8735 llite: Return -ERESTARTSYS in range_lock() 59/23259/3
Chris Horn [Tue, 6 Sep 2016 15:48:28 +0000 (10:48 -0500)]
LU-8735 llite: Return -ERESTARTSYS in range_lock()

If we return -ERESTARTSYS rather than -EINTR then the syscall can be
retried rather than failing with -EINTR.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I20d1a552448e567f0400a14a71a00d0d25a9164d
Reviewed-on: https://review.whamcloud.com/23259
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>
3 years agoLU-7790 test: skip test_130a and test_130b if server is less than 2.7.2 82/19682/8
Wei Liu [Wed, 20 Apr 2016 21:08:09 +0000 (14:08 -0700)]
LU-7790 test: skip test_130a and test_130b if server is less than 2.7.2

Skip test_130a and test_130b if server version is less than 2.7.2

Test-Parameters: trivial testlist=recovery-small

Change-Id: I4377792111e973cad793a56221a7bc8fe8ddfe68
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/19682
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-5964 tests: open a large number of files at once 85/12885/10
Andreas Dilger [Fri, 28 Nov 2014 20:54:37 +0000 (13:54 -0700)]
LU-5964 tests: open a large number of files at once

Modify createmany to allow keeping files open after creation to test
the total number of files that can be open at one time.  Also add a
sanity.sh test for this functionality.

Fix handling of last "-seconds" argument, but deprecate positional
parameters in favor of proper named argument parsing, since that is
more flexible and sustainable in the long term.

Order the include files alphabetically to simplify coding.
Order the argument parsing to be alphabetical to simplify coding.

Use booleans for do_* flags, and don't treat multiple of the same
argument as an error, that doesn't really improve usability at all.

Rename the "-r" option to "-u", to better match "unlinkmany", but
allow both to be accepted for the time being.  Allow "-u" (or "-r")
to be used in isolation to only delete files created in a prior run.
Print stats properly if only "-u" is specified, instead of assuming
that files are always being created in the same pass as deletion.

Print only the short program name instead of all of argv[0].  This
will also simplify multiplexing "createmany" as "unlinkmany" by name
at a later time.

Test-Parameters: trivial testlist=sanityn
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0e8c1af65dcf0b25065f26731c694f4beaab75d7
Reviewed-on: https://review.whamcloud.com/12885
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.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-9019 socklnd: use 64-bit incarnation time stamp 90/25690/3
James Simmons [Thu, 9 Mar 2017 18:06:29 +0000 (13:06 -0500)]
LU-9019 socklnd: use 64-bit incarnation time stamp

ksnn_incarnation is a 64-bit value, but using timeval to compute
it will cause an overflow in 2038. This changes it to use
ktime_get_real_ns() instead.

Change-Id: I9a0b1f2c35d04d8dc2c8fd5e17e19583c8af5ff0
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25690
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9019 msg : migrate IR stats to 64 bit time 19/24919/17
James Simmons [Thu, 9 Mar 2017 17:59:33 +0000 (12:59 -0500)]
LU-9019 msg : migrate IR stats to 64 bit time

Replace the struct timeval usage due to the overflow
issues in 2038 on 32-bit systems. Use of struct
timeval upstream is deprecated as well. Replace its
use with timespec64 and use ktime to store the
fsdb_notify_* fields.

Change-Id: I7771710723d6717cbff93e64abdf794957c42be5
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24919
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>
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-8900 snapshot: rename filesysetem fsname 68/24268/16
Fan Yong [Fri, 4 Nov 2016 12:28:31 +0000 (20:28 +0800)]
LU-8900 snapshot: rename filesysetem fsname

Introuduce new tunefs options "--rename" for renaming the existing
Lustre filesystem fsname with configuration/parameters preserved.
Usage: tunefs.lustre --fsname $NEW_FSNAME --rename $OLD_FSNAME ...

NEW_FSNAME is the new fsname, must be specified.
OLD_FSNAME is the old fsname, it is optional if the MGS and the MDT
are combined together.

It shares the functionality of fork/erase Lustre configuration logs
in kernel.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic9aaf6ed6209c7580bfabd4b660a6a7667576484
Reviewed-on: https://review.whamcloud.com/24268
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8900 snapshot: simulate readonly device 67/24267/15
Fan Yong [Fri, 4 Nov 2016 12:10:12 +0000 (20:10 +0800)]
LU-8900 snapshot: simulate readonly device

Introduce new server-side mount option: rdonly_dev. Under the
device readonly mode, the Lustre kernel threads that may cause
system modification, such as lfsck, scrub, osp_precreate_thread,
osp_sync_thread, and so on, will be disabled when mount. And the
system modification for recovery and client connect/disconnect,
will be ignored also.

On the other hand, if the server is mounted as "rdonly_dev", then
the client must specify "-o ro" option when mount; otherwise, it
will get -EACCES.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iafc02bf53c41b9d7f08120ba7639b91ae527bbbc
Reviewed-on: https://review.whamcloud.com/24267
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8900 snapshot: fork/erase configuration 66/24266/16
Fan Yong [Fri, 4 Nov 2016 10:30:33 +0000 (18:30 +0800)]
LU-8900 snapshot: fork/erase configuration

Introuduce new lctl command to fork/erase the configuration for
the specified system. It is used for mount the snapshot together
with the snapshot's original system MGS. Usage:

lctl fork_lcfg <fsname> <newname>
lctl erase_lcfg <fsname>

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I55d420b54215b09d42b2496b5c1271211c1fb5d7
Reviewed-on: https://review.whamcloud.com/24266
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8900 snapshot: user interface for write barrier on MDT 65/24265/19
Fan Yong [Fri, 4 Nov 2016 10:29:14 +0000 (18:29 +0800)]
LU-8900 snapshot: user interface for write barrier on MDT

The user can control the write barrier on MDTs via lctl commands:

Freeze barrier:
lctl barrier_freeze <fsname> [timeout (in second)]
NOTE: the default timeout value is 30 (seconds).

Thaw barrier:
lctl barrier_thaw <fsname>

Query barrier:
lctl barrier_stat <fsname>

Rescan barrier bitmap:
lctl barrier_rescan <fsname> [timeout (in second)]
NOTE: the default timeout value is 30 (seconds).

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Id953203fc3ce6ebbce9f1ae0511fbe2b3813bb9f
Reviewed-on: https://review.whamcloud.com/24265
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8900 snapshot: check write barrier before modification 64/24264/15
Fan Yong [Fri, 4 Nov 2016 10:19:29 +0000 (18:19 +0800)]
LU-8900 snapshot: check write barrier before modification

For client sponsored modifications, the RPC service thread on the
MDT will check whether there is write barrier or not when creates
transaction handler, if yes, return -EINPROGRESS to the caller.

Generally, the check is done inside mdd_trans_create(). For those
cases that bypass mdd_trans_create(), such as some mdd_iocontrol,
quota, will be checked individually.

For open-unlink case, when close the last open handler, it will
try to destroy the orphan. But if the close-destroy is blocked
by the barrier, the orphan MDT-object will be kept in the MDT's
orphan list and will be destroyed automatically when remount the
MDT next time. Since barrier-snapshot is relative rare operation,
and race with close-destroy will be more rare, such solution is
reasonable and will not cause serious trouble.

When client get the -EINPROGRESS error, the expected behaviour is
to re-try the RPC some time later. That is the standard action on
the client-side, not only for blocked by barrier but also for some
cases, such as the case of related OI mapping is invaid and the OI
scrub is rebuilding the OI files. So there is no interoperability
trouble caused by MDT-side write barrier.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8c3571f7f89fc9ff7397457955ffc75543eb2164
Reviewed-on: https://review.whamcloud.com/24264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9003 mdc: support posix_acl_valid with user namespace 07/25307/3
Michael Kuhn [Tue, 7 Feb 2017 20:44:21 +0000 (21:44 +0100)]
LU-9003 mdc: support posix_acl_valid with user namespace

Starting with Linux 4.8, posix_acl_valid takes an additional struct
user_namespace argument. Use init_user_ns since no other namespace is
available at this point (based on Linux commit
0d4d717f25834134bb6f43284f84c8ccee5bbf2a).

Change-Id: I656cb32f632c7ee00bdc36b6f6d4b442fcb03fcc
Signed-off-by: Michael Kuhn <michael.kuhn@informatik.uni-hamburg.de>
Reviewed-on: https://review.whamcloud.com/25307
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
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-9201 libcfs: reduce libcfs checksum speed test time 23/25923/2
Andreas Dilger [Thu, 9 Mar 2017 23:21:44 +0000 (16:21 -0700)]
LU-9201 libcfs: reduce libcfs checksum speed test time

Loading the libcfs module is getting increasingly slow due to
multiple checksum types being speed tested at startup (8 different
checksums * 1s per checksum).

Reduce the number of checksum algorithms checked at module load
time to the ones that are actually need the speed (i.e. the bulk
data checksums), and reduce the amount of time taken to compute the
checksum.  The other checksum types typically do not need the speed,
but rather are selected by the configuration.

Precompute the checksum speeds and supported types for the OST so
they are not recomputed for each new client that connects.

This reduces the module load time from 8.0s to 0.76s in my testing.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I4b4ea109633585f61201a661c54ce4229c3ebbe5
Reviewed-on: https://review.whamcloud.com/25923
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9182 tests: SKIP sanity/205 for older version of MDS 13/25813/2
Parinay Kondekar [Mon, 6 Mar 2017 09:35:08 +0000 (15:05 +0530)]
LU-9182 tests: SKIP sanity/205 for older version of MDS

LU-5946 is not present on 2.5.x esp changes from
"LU-5946 lprocfs: free expired jobstats after /proc read"

The changes in sanity/205 rmdir w.r.t DNE are to be SKIPPED
where we are seeing the failure.

Signed-off-by: Parinay kondekar <Parinay.Kondekar@seagate.com>
Change-Id: I02d24eddaac3fc65e801eb86f2e878e117d6cdb1
Reviewed-on: https://review.whamcloud.com/25813
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7537 tests: clean up sanity test_133c 83/25583/3
Andreas Dilger [Wed, 22 Feb 2017 21:24:44 +0000 (14:24 -0700)]
LU-7537 tests: clean up sanity test_133c

Fix up code style for sanity.sh test_133c.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id8d20e14cbf825f81eff40afd44a1d8998738819
Reviewed-on: https://review.whamcloud.com/25583
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8952 tests: handling test specific cleanup of ost pools 16/24416/11
Jadhav Vikram [Fri, 10 Mar 2017 09:06:44 +0000 (14:36 +0530)]
LU-8952 tests: handling test specific cleanup of ost pools

Using destroy_test_pools instead of cleanup_test as trap
function which will call destroy_pools to make sure pools
get removed from the list. Some testcase pool cleanup trap
is missing so incase of test failure pool will not get
destroyed, used trap to remove pool inside create_pool
instead of using in each testcase.

Seagate-bug-id: MRP-3767
Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Tested-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Change-Id: I2bab8514962f3ec5312decd2ded29893e16c5cef
Reviewed-on: https://review.whamcloud.com/24416
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>
3 years agoLU-8918 obdclass: hoist locking in lu_context_exit() 17/24217/2
John L. Hammond [Tue, 6 Dec 2016 23:09:06 +0000 (17:09 -0600)]
LU-8918 obdclass: hoist locking in lu_context_exit()

Hoist lu_keys_guard locking out of the for loop in lu_context_exit().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I2f79a1321a48d8a459b4f83a7996ca2ae9a8e4bb
Reviewed-on: https://review.whamcloud.com/24217
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8820 hsm: skip LL_IOC_HSM_COPY_START for HSM removes 00/23700/4
John L. Hammond [Tue, 23 Feb 2016 16:45:21 +0000 (10:45 -0600)]
LU-8820 hsm: skip LL_IOC_HSM_COPY_START for HSM removes

In llapi_hsm_action_begin(), if the action is a remove then skip
calling the LL_IOC_HSM_COPY_START ioctl.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id84f1877a4f05c91e063797b51bd2046f2283ec4
Reviewed-on: https://review.whamcloud.com/23700
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9176 osd-zfs: improve statfs estimate for ZFS 43/25743/3
Andreas Dilger [Fri, 3 Mar 2017 09:40:46 +0000 (02:40 -0700)]
LU-9176 osd-zfs: improve statfs estimate for ZFS

When a ZFS filesystem is newly formatted, there are 128 OI ZAPs and
96 object directories, but only a handful of regular files.  This
skews the average MDT file size to be much larger than regular files,
which in turn makes the estimated total number of files on the MDT
much too small.

Improve the inode size estimate when the filesystem has few files to
be closer to the expected long term average so that the reported total
inode count is reasonable for a new or otherwise empty filesystem.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ic40af2057d8b21e0ee4d9bb3b13b7f6786d0d406
Reviewed-on: https://review.whamcloud.com/25743
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8624 osc: hung in osc_destroy() 88/22588/4
Andriy Skulysh [Mon, 19 Sep 2016 10:25:47 +0000 (13:25 +0300)]
LU-8624 osc: hung in osc_destroy()

cl_destroy_in_flight becomes < 0 because the
osc_can_send_destroy() won't increment
cl_destroy_in_flight if l_wait_event() gets
interrupted by a signal, but the request will
still be sent and the request's interpret
function will decrease the counter.

Don't send OST_DESTROY request on signal
and return -EINTR.

Seagate-bug-id: MRP-3834
Change-Id: Ie725e501909095b8cd853287b9a43feb1f89ddb5
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: https://review.whamcloud.com/22588
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8813 gss: limit the number of error messages in logs 84/25584/2
Andreas Dilger [Wed, 23 Nov 2016 20:13:11 +0000 (13:13 -0700)]
LU-8813 gss: limit the number of error messages in logs

Acrually LGSS_MECH_SK processing if SSK is not enabled, rather than
just printing an error message.  Distinguish between SSK being
disabled or not included in the service at all.

Rate limit the number of error messages submitted to the logs.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0190c46b94ecf668ef629c5b864c43658f3560f3
Reviewed-on: https://review.whamcloud.com/25584
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Hanna <hannac@iu.edu>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6707 test: load loop module to have loop devices 30/15130/8
Wei Liu [Mon, 20 Jun 2016 20:56:19 +0000 (13:56 -0700)]
LU-6707 test: load loop module to have loop devices

Since there is no default loop device on EL7, load
loop module with option max_loop=8 to have loop devices
ready. posix.sh is not going to pass until LU-9102 get
resolved, but first fix the loop device issue.

Change-Id: I9fb9eba15099e5569dbc04fcd4454656a59fdd52
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/15130
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9174 kernel: kernel update RHEL7.3 [3.10.0-514.10.2.el7] 47/25747/2
Bob Glossman [Thu, 2 Mar 2017 18:13:27 +0000 (10:13 -0800)]
LU-9174 kernel: kernel update RHEL7.3 [3.10.0-514.10.2.el7]

update RHEL 7.3 kernel to 3.10.0-514.10.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I06e11f6a8e53c2c1bcf86f37edcabb1f9f178c66
Reviewed-on: https://review.whamcloud.com/25747
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-9138 kernel: kernel update [SLES12 SP1 3.12.69-60.64.32] 56/25556/5
Bob Glossman [Wed, 15 Feb 2017 23:39:01 +0000 (15:39 -0800)]
LU-9138 kernel: kernel update [SLES12 SP1 3.12.69-60.64.32]

Update target and kernel_config files for new version
Add an extra ldiskfs patch to adapt to changes from recent landing
of LU-9031.  These changes were required due to new features
in upstream ext4 code seen in both linux 4.4 and linux 3.12.

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0c7f01dfaa087e0799a300531aff45841ba87c68
Reviewed-on: https://review.whamcloud.com/25556
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9167 hsm: use a new environment during HSM purge 30/25730/2
John L. Hammond [Thu, 6 Aug 2015 15:20:30 +0000 (10:20 -0500)]
LU-9167 hsm: use a new environment during HSM purge

In hsm_cancel_all_actions() use a newly allocated environment instead
of borrowing it from the coordinator.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idd5f05d1d5629f4e4e627e137e3addc1a51f8a96
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25730
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9161 utils: don't load bitmaps when checking features 71/25671/3
Andreas Dilger [Tue, 28 Feb 2017 19:02:31 +0000 (12:02 -0700)]
LU-9161 utils: don't load bitmaps when checking features

Change is_feature_enabled() to avoid loading the bitmaps from disk
when checking the filesystem features.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7017e3ffce4ce745b1746229a5c219886c479bf9
Reviewed-on: https://review.whamcloud.com/25671
Tested-by: Jenkins
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4423 ptlrpc: use 64-bit time for debugfs import state output 09/25409/5
Arnd Bergmann [Mon, 6 Mar 2017 22:57:59 +0000 (17:57 -0500)]
LU-4423 ptlrpc: use 64-bit time for debugfs import state output

This time is only printed in debugfs, and can be easily converted
to 64-bit to avoid overflowing on 32-bit systems in 2038.

Linux-commit: 74e489aa9cce1ec8f8a44ecc1651cf06b61db204

Change-Id: I7ee171367e90ef32b29bce31abddd4e17eb8daf2
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/25409
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>
3 years agoLU-9107 build: Update SPL/ZFS to 0.6.5.9 90/25390/4
Nathaniel Clark [Fri, 10 Feb 2017 19:30:53 +0000 (14:30 -0500)]
LU-9107 build: Update SPL/ZFS to 0.6.5.9

Update SPL and ZFS version that is built against

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

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ife6f63455fea57251c0ec32c68e15ea40b8bda97
Reviewed-on: https://review.whamcloud.com/25390
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8306 ldlm: send blocking ASTs after lock replay 16/24716/13
Niu Yawei [Wed, 25 Jan 2017 14:52:34 +0000 (22:52 +0800)]
LU-8306 ldlm: send blocking ASTs after lock replay

If blocking AST wasn't received by client before recovery,
we need to scan the whole waiting lock list to send blocking
ASTs after lock replay done, otherwise, client could be
evicted unpurposely like following:

- cl1 has a granted lock;
- cl2 has a waiting lock, BL AST is sent but lost on a way;
- failover, locks are replayed and applied on the server in
  the correct order;
- waiting lock is just put to the resource, no new BL AST
  is re-sent, no timeout can happen for the granted lock on
  server, no timeout for the waiting lock on client;
- cl2 will be hanging for a long time until cl1 will cancel
  its aged lock; may lead to cl2 eviction.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2a3fecf3b7fa79f96874d5ae21c599725334d9a5
Reviewed-on: https://review.whamcloud.com/24716
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
3 years agoLU-8880 gss: fix GSS support for DNE 36/24236/3
Sebastien Buisson [Thu, 8 Dec 2016 13:10:59 +0000 (14:10 +0100)]
LU-8880 gss: fix GSS support for DNE

With DNE, an OSP can be used on MDT for connections to other MDTs.
So to determine exactly every connection's purpose, use client_obd's
cl_sp_to in import_to_gss_svc() and gss_svc_upcall_install_rvs_ctx().

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I84934010102bdf760d07796866272b359bf0465e
Reviewed-on: https://review.whamcloud.com/24236
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
3 years agoLU-8857 config: refactor sptlrpc config process 19/24119/4
Lai Siyao [Sun, 4 Dec 2016 14:26:24 +0000 (22:26 +0800)]
LU-8857 config: refactor sptlrpc config process

MDT/OFD may access config llog directly, e.g. accessing sptlrpc
local copy, but this config context is not initialized, these code
existed before, but maybe got lost in server code refactor before.
But after reviewing code this is not necessary, target doesn't
need to access sptlrpc config directly, but leave it the same as
other configs, that is, let MGC to handle.

Besides, ofd_set_info_hdl() doesn't need to handle KEY_SPTLRPC_CONF
because this key is handled in o_set_info_async only.

As a side effect, remove obsolete function lustre_rename().

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: If0937cf6e5e03bc84f883131bbf63326e847e701
Reviewed-on: https://review.whamcloud.com/24119
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-5361 llite: Remove OBD_FAIL_OSC_CONNECT_CKSUM 44/23644/4
Abrarahmed Momin [Fri, 3 Mar 2017 13:44:23 +0000 (19:14 +0530)]
LU-5361 llite: Remove OBD_FAIL_OSC_CONNECT_CKSUM

Remove OBD_FAIL_OSC_CONNECT_CKSUM as all clients and servers
since 1.8 support OBD_CONNECT_CKSUM. No reason to check
interoperability with older servers anymore. Remove sanity
test_77i(), update test_77j().
Fix _wait_osc_import_state() to fetch OST state when facet
is client.

Seagate-bug-id: MRP-1421
Signed-off-by: Abrarahmed Momin <abrar.habib@seagate.com>
Change-Id: I664f50bc8dbd3a169bcb7e42706717416d6e1006
Reviewed-on: https://review.whamcloud.com/23644
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.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-8662 osd-ldiskfs: check OI mapping update 20/23220/4
Fan Yong [Fri, 29 Jul 2016 00:26:03 +0000 (08:26 +0800)]
LU-8662 osd-ldiskfs: check OI mapping update

Originally, we assumed that the OI mapping will not be modified
during the osd_fid_lookup(). But it is not always true, because
OI scrub may update the OI mapping for repairing inconsistency.
This patch checks the OI mapping update when osd_fid_lookup(),
once happened, then trust the latest OI mapping. It also removes
some incorrect LASSERT() checks.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic2617400d56003ec67982ae5135cedc884f09e3a
Reviewed-on: https://review.whamcloud.com/23220
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-9019 zfs: use 64-bit timestamps for brw stats 11/25411/7
James Simmons [Wed, 1 Mar 2017 15:35:49 +0000 (10:35 -0500)]
LU-9019 zfs: use 64-bit timestamps for brw stats

The debugfs brw stats interface contains timestamps that are
computed from timeval, which overflows in 2038 on 32-bit systems.

This changes the output to use a timespec64 type to avoid the
overflow. I also change the format to print the sub-second portion
as 9 digits (nanoseconds) for clarity, rather than printing six
digits without leading zeroes.

Change-Id: I34f3b02a0d5f80e9ae22a47f55445199332b3dc9
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25411
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4825 ofd: fix OBD_FAIL_OST_ENOINO/ENOSPC behaviour 63/20163/5
Andreas Dilger [Sat, 21 Nov 2015 05:51:15 +0000 (22:51 -0700)]
LU-4825 ofd: fix OBD_FAIL_OST_ENOINO/ENOSPC behaviour

Fix the OBD_FAIL_OST_ENOINO and OBD_FAIL_OST_ENOSPC behaviour so that
they also reduce the total number of inodes or blocks when setting the
number of free inodes/blocks to zero.  This allows "lfs df [-i]" to
still report the correct number of blocks and inodes used on the OST.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ia746273e19aed22a0926708899de009b8d5cab07
Reviewed-on: https://review.whamcloud.com/20163
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8900 snapshot: operate write barrier on MDT 63/24263/15
Fan Yong [Wed, 12 Oct 2016 08:11:24 +0000 (16:11 +0800)]
LU-8900 snapshot: operate write barrier on MDT

Currently, the Lustre barrier is implemented as write barrier
on all MDTs. For each MDT in the system, when it starts, it
registers a barrier instance that will be used in handling
subsequent barrier requests.

The barrier_handler() processes the barrier request: freeze
or thaw the barrier on the MDT. Freezing barrier is the key
part. We use two-phases barrier to guarantee that after the
barrier setup:

1) All the MDT side pending async modifications have been flushed.
2) Any subsequent modification will be blocked.
3) All async transactions on the MDTs have been committed.

For phase1, we do the following:

Firstly, it sets barrier flag on the instance that will block
subsequent modifications from clients. (Note: server sponsored
modification will be allowed for flush pending modifications)

Secondly, it will flush all pending modification via dt_sync(),
such as async OST-object destroy, async OST-object owner changes,
and so on.

If there are some on-handling clients sponsored modifications
during the barrier freezing, then related modifications may cause
pending requests after the first dt_sync(), so call dt_sync()
again after all on-handling modifications done.

With the phase1 barrier set, all pending cross-servers modification
have been flushed to remote servers, and any new modification will
be blocked. But it does not guarantees that all the updates have been
committed to storage on remote servers. So when all the instances
have done phase1 barrier successfully, the MGS will notify all
instances to do the phase2 barrier as following:

Every barrier instance will call dt_sync() to make all async
transactions to be committed locally.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8d209e98d175eacdadd25c385ffc1c3e4451527a
Reviewed-on: https://review.whamcloud.com/24263
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@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>