Whamcloud - gitweb
fs/lustre-release.git
3 years agoLU-8945 ptlrpc : remove userland usage from ptlrpc 96/24396/4
James Simmons [Tue, 27 Dec 2016 15:08:15 +0000 (10:08 -0500)]
LU-8945 ptlrpc : remove userland usage from ptlrpc

The reason for __REQ_LAYOUT_USER__ was to expose a
section of code in layout.c to userland for a utility
similar to wireshark. This was done before wireshark
existed but now that it does we no longer need to do
this type of hack. This also reduces lustre_acl.h to
strictly a kernel header now.

Test-Parameters: trivial

Change-Id: I649e36947789b8ebcb1204b65ac68b55a1d6ea49
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24396
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8835 osc: handle 64 bit time properly in osc_cache_too_much 14/23814/5
James Simmons [Tue, 10 Jan 2017 22:40:40 +0000 (17:40 -0500)]
LU-8835 osc: handle 64 bit time properly in osc_cache_too_much

Use 64 bit time for cl_lru_last_used and the function
osc_cache_too_much(). The use of 64 bit time will
introduce an expensive 64 bit division operation. Since
the time lapse being calculated in osc_cache_too_much
will never be more than seventy years we can cast the
time lapse to an long and we can perform a normal 32 bit
divison operation instead.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ic38db2d22436fc2a8aa431562e4f5d22ec18d842
Reviewed-on: https://review.whamcloud.com/23814
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
3 years agoLU-6210 lod: Change positional struct initializers to C99 54/23754/4
Steve Guminski [Mon, 14 Nov 2016 18:12:28 +0000 (13:12 -0500)]
LU-6210 lod: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
lod directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/lod/lod_dev.c:
struct lu_seq_range range
struct l_wait_info lwi
lustre/lod/lproc_lod.c:
static struct lprocfs_vars lprocfs_lod_osd_vars[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I6533b9cbfd9a98e903ba8e0f5c5d8e725226366d
Reviewed-on: https://review.whamcloud.com/23754
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8066 obd: Add debugfs root 27/23427/4
Oleg Drokin [Sun, 1 Jan 2017 15:59:10 +0000 (10:59 -0500)]
LU-8066 obd: Add debugfs root

This is just plumbing for migrating remaining procfs to
debugfs support

Linux-commit: 5c8c82f63a11c07a0687d2c71411166017012689

ldebugfs_remove is usually called on directories with files passed in
as attributes, so simple debugfs_remove failes on them as not empty
Switch to debugfs_remove_recursive.

This fixes a number of problems where a new filesystem is mounted after
being unmounted first.

Linux-commit: 6a491f2b80f2806221ba3a5a3e26fbe945f82d83

Turns out we mistakenly export some pretty-wide-reaching debugfs
functions as EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL as we should,
so this patch rectifies the situation.

Linux-commit: da33f1dd9f69c5a5d23e1254906b027af3362e36

Move /proc/fs/lustre/devices to debugfs. The devices file prints out
status information about all obd devices in the system in human
readable form.

Linux-commit: 4361a048743f900bb0710bd7cb36a650d7bef93a

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iefe6ee69b607f627c5682513128706bf0c1c3e09
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23427
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
3 years agoLU-8288 lfsck: handle dangling LOV EA reference 62/21562/17
Fan Yong [Sat, 10 Sep 2016 11:30:42 +0000 (19:30 +0800)]
LU-8288 lfsck: handle dangling LOV EA reference

Originally, the layout LFSCK logic of handling dangling LOV EA
reference is as following:

During the first phase scanning, if the layout LFSCK find that
some LOV EA entry references an OST-object that does not exist,
then it will repair the inconsistency based on the LFSCK start
parameter "-c" option. If "-c" option is specified, the layout
LFSCK will think the OST-object lost, then it will create the
lost OST-object with the FID that is stored in the LOV EA slot.
But such repairing may be incorrect. Because the LOV EA may be
corrupted as to the LOV EA is invalid. Means the OST-object is
still on the OST. When moves to the second stage scaning, the
layout LFSCK will find the orphan OST-object that claims to be
as one of the MDT-object's stripe. And if someone has already
modified the new created OST-object before finding the orphan,
then the layout LFSCK cannot recover the original data back.

To avoid above trouble, the patch introduces new start option:
"--delay-create-ostobj" or short described as "-d". It allows
the layout LFSCK to postpone creating the "lost" OST-object
until all the orphan OST-objects handled. It will record the
dangling references in some new introduced layout LFSCK trace
files on disk during the layout LFSCK first stage scanning,
then travel those traces file after all orphan OST-objects
handled in the second-stage scanning. The side-effect of such
option is that as long as one OST does not join the layout
LFSCK or fail to complete the scanning, then reparing dangling
LOV EA will be skipped. For a large system with a lot of OSTs,
such condition may be a bit strict. The default value is 'off'.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic222e1ad20c8011aa5f41cc43171d017ab5c464f
Reviewed-on: https://review.whamcloud.com/21562
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-6142 lnet: change wire protocol typedefs to proper structure 66/24566/3
James Simmons [Sun, 1 Jan 2017 16:12:59 +0000 (11:12 -0500)]
LU-6142 lnet: change wire protocol typedefs to proper structure

The upstream kernel requires proper structures so
convert all the LNet wire protocols typedefs in
the LNet core.

Test-Parameters: trivial

Change-Id: I0287e0d16a1faa7407dc63f9cd607b94ff49d980
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24566
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: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
3 years agoLU-8752 lnet: Stop MLX5 triggering a dump_cqe 06/24306/2
Doug Oucharek [Mon, 12 Dec 2016 17:31:37 +0000 (09:31 -0800)]
LU-8752 lnet: Stop MLX5 triggering a dump_cqe

We have found that MLX5 will trigger a dump_cqe if we don't
invalidate the rkey on a newly alloated MR for FastReg usage.

This fix just tags the MR as invalid on its creation if we are
using FastReg and that will force it to do an invalidate of the
rkey on first usage.

Test-Parameters: trivial
Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: Id0de4f799d70c58011746520b20c8cfca6a29e6a
Reviewed-on: https://review.whamcloud.com/24306
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8569 lfsck: handle linkEA overflow 41/23741/10
Fan Yong [Fri, 23 Sep 2016 05:00:47 +0000 (13:00 +0800)]
LU-8569 lfsck: handle linkEA overflow

If the linkEA is marked as overflow (32 bits timestamp in header),
and even if some hard links are removed, we still cannot clear the
overflow timestamp, because the missed hard links entries are still
not in the linkEA. It is the namespace LFSCK's duty to add the missed
entries into the linkEA (if possible) and clear the overflow timestamp
if all the hard links entries are in the linkEA. But it is possible
that there are some new hard links added during the namespace LFSCK
scanning. So the namespace LFSCK needs to compare the linkEA overflow
timestamp with the namespace LFSCK latest reset time (scan the system
from the beginning) in the 2nd-stage scanning. If the latter one is
newer, then means all the hard links entries have been in the linkEA,
so the linkEA overflow timestamp can be cleared.

To avoid the trouble caused by clock drift among MDTs, the linkEA
overflow timestamp will be set as the MDT local time on which the
object resides even if the set linkEA operation is sponsored by
some remote MDT. So we can directly compare the linkEA overflow
time with the namespace LFSCK latest reset time.

The old interfaces between MDD/OUT and LFSCK via lfsck_in_notify()
for the linkEA overflow event are obsoleted and removed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia2c3f9d0a0ecb0b3285041f1365cb4e075a07dda
Reviewed-on: https://review.whamcloud.com/23741
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7812 tests: address race condition for sanity:120{e,f} 11/24811/6
Jinshan Xiong [Wed, 11 Jan 2017 02:07:19 +0000 (18:07 -0800)]
LU-7812 tests: address race condition for sanity:120{e,f}

By adding a delay between lock cancel and stat, it can avoid the
problem that the locks are still held by ldlm lock thread while
'cancel_lru_locks osc' is called.

Test-Parameters: trivial envdefinitions="ONLY=120e" testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2095cb1df05ff45c2671edaed5a61bcdd4a56266
Reviewed-on: https://review.whamcloud.com/24811
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-8966 tests: rename sanity 39, 43, 44, 241 tests 85/24485/2
Elena Gryaznova [Wed, 21 Dec 2016 19:17:44 +0000 (21:17 +0200)]
LU-8966 tests: rename sanity 39, 43, 44, 241 tests

The following tests are renamed to be run separately
from other tests in these groups:
test_39() to test_39a()
test_43() to test_43A()
test_44() to test_44A()
test_241() to test_241a()

Test-Parameters: trivial testlist=sanity
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Change-Id: I7b841da0dc2d307e3174dddccc033c8dd37c27fd
Reviewed-on: https://review.whamcloud.com/24485
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8969 llite: sanity test_56x read failed: Invalid argument 52/24552/2
Yang Sheng [Fri, 30 Dec 2016 21:09:31 +0000 (05:09 +0800)]
LU-8969 llite: sanity test_56x read failed: Invalid argument

In generic_file_read_iter() does not check EOF before invoke
direct_IO callback. So we have to check it by ourselves.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ia30d2a42da81beb6c5217f081c18ce4d93553540
Reviewed-on: https://review.whamcloud.com/24552
Reviewed-by: Bob Glossman <bob.glossman@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-8973 tests: in sanity 103a use $tdir instead of $MOUNT 18/24518/3
Emoly Liu [Mon, 26 Dec 2016 03:43:42 +0000 (11:43 +0800)]
LU-8973 tests: in sanity 103a use $tdir instead of $MOUNT

In sanity.sh test_103a we should use $tdir instead of $MOUNT
in case of any unclean testing directory.

Test-Parameters: trivial
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I891bbc0aab28bb58589b66405e0ad5c40fdad25f
Reviewed-on: https://review.whamcloud.com/24518
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@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-8957 obdclass: fix exp_nid_hash race 34/24434/5
Yang Sheng [Mon, 19 Dec 2016 19:07:30 +0000 (03:07 +0800)]
LU-8957 obdclass: fix exp_nid_hash race

Move exp_nid_hash unhash operation under exp_lock. To avoid
parallel export disconnect may race in there.

Change-Id: I02a9cf550b4edee7c42ba90d3f3926cd2584c24b
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-on: https://review.whamcloud.com/24434
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
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-8378 obd: move s3 in lmd_parse to inner loop 20/23820/4
James Simmons [Sat, 17 Dec 2016 17:18:28 +0000 (12:18 -0500)]
LU-8378 obd: move s3 in lmd_parse to inner loop

The upstream client complains with:

obdclass/obd_mount.c: In function lmd_parse:
obdclass/obd_mount.c:880: warning: variable set but not used

The solution is to move s3 to the inner loop
where it is only used.

Test-Parameters: trivial

Change-Id: I95280d08e5f00cf5fdae62acb21e2c08805a9948
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23820
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-8635 tests: Use wait_update to expire jobstats 99/22699/2
Emoly Liu [Fri, 23 Sep 2016 08:39:18 +0000 (16:39 +0800)]
LU-8635 tests: Use wait_update to expire jobstats

Instead of arbitarily adjusting sleep count, use wait_update()
with maximum of (left+5) seconds to expire old jobstats.

Test-Parameters: trivial
Seagate-bug-id: MRP-2781
Signed-off-by: Ashish Purkar <ashish.purkar@seagate.com>
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I75e017fc75d35faf1754faddfed168c0fbf432fe
Reviewed-on: https://review.whamcloud.com/22699
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-8753 llog: remove lgh_write_offset 08/24008/3
Di Wang [Sat, 5 Nov 2016 00:40:07 +0000 (20:40 -0400)]
LU-8753 llog: remove lgh_write_offset

Remove lgh_write_offset for remote llog object,
since it is not easy to be refreshed when remote
transaction fails, which might cause llog file
corruption. Instead let's rely on the osp object
cache to invalidate and update the llog object
size.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I38aa9ce2c5ac6485bf0cf6be023b8edde986b5d3
Reviewed-on: https://review.whamcloud.com/24008
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6854 llite: Do not set writeback for sync write pages 10/15610/6
Jinshan Xiong [Wed, 15 Jul 2015 21:06:53 +0000 (14:06 -0700)]
LU-6854 llite: Do not set writeback for sync write pages

Sync-write pages don't have Dirty bit set, it will confuse newer
kernels by having writeback bit set.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I2613919a9e942a7ee3dc48b250f7f0e5e4594e48
Reviewed-on: https://review.whamcloud.com/15610
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
3 years agoRevert "LU-8922 lod: check master stripes properly" 50/24750/5
James Nunez [Fri, 6 Jan 2017 18:29:55 +0000 (18:29 +0000)]
Revert "LU-8922 lod: check master stripes properly"

It causes frequent testing failures tracked in LU-8985

This reverts commit 1be03a1088d2aa583c2651435634ba336b48f939.

Test-Parameters: testlist=conf-sanity,conf-sanity,conf-sanity,conf-sanity,conf-sanity,conf-sanity

Change-Id: I444ce9e65c72db7db3f53692d9fe4f823943fade
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Reviewed-on: https://review.whamcloud.com/24750
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4423 lnet: use 64-bit time for selftest 52/23352/2
Arnd Bergmann [Tue, 25 Oct 2016 02:00:56 +0000 (22:00 -0400)]
LU-4423 lnet: use 64-bit time for selftest

The lustre selftest code has multiple time stamps that are kept
as 'time_t' or 'unsigned long' and can therefore overflow on
32-bit systems.

This changes the code to use time64_t instead.

Linux-commit: d9f79e6bf02c109f117132163239bfffa6475ccb

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I74d704d104e7398af411e73180fac57c0b943eb7
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/23352
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8965 kernel: kernel update [SLES11 SP4 3.0.101-91] 77/24477/2
Bob Glossman [Wed, 21 Dec 2016 17:06:31 +0000 (09:06 -0800)]
LU-8965 kernel: kernel update [SLES11 SP4 3.0.101-91]

Update SLES11 SP4 kernel to 3.0.101-91

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8b7aa39f60626a511b58d1a7a9a31189c17b4f1a
Reviewed-on: https://review.whamcloud.com/24477
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Trent Geerdes <trent.geerdes@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6401 header: remove libcfs.h in interval_tree.h 23/24323/3
James Simmons [Tue, 13 Dec 2016 18:28:31 +0000 (13:28 -0500)]
LU-6401 header: remove libcfs.h in interval_tree.h

The header libcfs.h for interval_tree.h is not needed
so we can just use the standard linux kernel headers
instead.h

Test-Parameters: trivial

Change-Id: I9c2c4f7e9bc227876818ff7213f392bdeb1112e0
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24323
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.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-8889 llite: replace memory allocation with ll_env usage 64/24064/2
Dmitry Eremin [Wed, 9 Nov 2016 12:52:30 +0000 (15:52 +0300)]
LU-8889 llite: replace memory allocation with ll_env usage

Replace memory allocation with ll_env usage in ll_file_read
like in other functions.

Change-Id: I44445ab80cc856f45271e0888ea2538d2a44cdeb
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/24064
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
3 years agoLU-6210 mgs: Change positional struct initializers to C99 94/23794/2
Steve Guminski [Wed, 16 Nov 2016 15:30:45 +0000 (10:30 -0500)]
LU-6210 mgs: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
mgs directory that use C89 or GCC-only syntax are updated to C99
syntax.  Whitespace is corrected to match the coding style guidelines.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/mgs/mgs_handler.c:
struct lustre_handle lockh
struct lustre_handle conn
lustre/mgs/mgs_llog.c:
struct mgs_fsdb_handler_data d

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I36cbeaae50982b6f72d271997b229c46d085a6ee
Reviewed-on: https://review.whamcloud.com/23794
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 fid: Change positional struct initializers to C99 89/23789/2
Steve Guminski [Wed, 16 Nov 2016 14:24:34 +0000 (09:24 -0500)]
LU-6210 fid: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
fid directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/fid/fid_lib.c:
const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE
const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE
lustre/fid/lproc_fid.c:
struct lu_seq_range tmp

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I73b6a37a0fcac29ba48410e7befb98f13bdb17cc
Reviewed-on: https://review.whamcloud.com/23789
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 osd: Change positional struct initializers to C99 70/23770/2
Steve Guminski [Mon, 14 Nov 2016 20:42:44 +0000 (15:42 -0500)]
LU-6210 osd: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
osd directories that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/osd-ldiskfs/osd_scrub.c:
static const struct osd_lf_map osd_lf_maps[]
static const struct osd_lf_map osd_dl_maps[]
lustre/osd-zfs/osd_oi.c:
static const struct named_oid oids[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I1aa2bf64f0efcbd9c34f21f60c462f7a95c41f98
Reviewed-on: https://review.whamcloud.com/23770
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 ldlm: Change positional struct initializers to C99 43/23743/2
Steve Guminski [Mon, 14 Nov 2016 14:02:13 +0000 (09:02 -0500)]
LU-6210 ldlm: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
ldlm directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/ldlm/ldlm_extent.c:
struct interval_node_extent limiter
struct interval_node_extent ext

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I219f5b2bd4b96d92eaf120f7080e762d72eb3105
Reviewed-on: https://review.whamcloud.com/23743
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 mdt: Change positional struct initializers to C99 02/23702/2
Steve Guminski [Thu, 10 Nov 2016 18:21:23 +0000 (13:21 -0500)]
LU-6210 mdt: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
mdt directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/mdt/mdt_lvb.c:
struct ldlm_valblock_ops mdt_lvbo
lustre/mdt/mdt_mds.c:
static struct lprocfs_vars lprocfs_mds_obd_vars[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: If8b3b6233e34f6e8406ab6b8e4e70845bf94bfc8
Reviewed-on: https://review.whamcloud.com/23702
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@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-6210 obd: Change positional struct initializers to C99 97/23697/3
Steve Guminski [Mon, 7 Nov 2016 18:52:20 +0000 (13:52 -0500)]
LU-6210 obd: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
obd directory that use C89 or GCC-only syntax are updated to C99
syntax.  Whitespace is changed to match the code style guidelines.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/obdclass/lprocfs_jobstats.c:
static const struct seq_operations lprocfs_jobstats_seq_sops
lustre/obdclass/obd_config.c:
struct llog_process_cat_data
lustre/obdclass/obd_mount.c:
struct lustre_mount_data2 lmd2 (2 occurrences)

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I74a7d6ebb250e8df0f24f60ce87933fddf325c30
Reviewed-on: https://review.whamcloud.com/23697
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 tests: Change positional struct initializers to C99 68/23568/3
Steve Guminski [Thu, 3 Nov 2016 15:44:04 +0000 (11:44 -0400)]
LU-6210 tests: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
tests directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

lustre/tests/checkfiemap.c:
struct option long_opts[]
lustre/tests/llapi_layout_test.c:
static struct test_tbl_entry test_tbl[]
lustre/tests/mcreate.c:
struct option opts[]
lustre/tests/mmap_sanity.c:
struct test_case tests[]
lustre/tests/mpi/mdsrate.c:
struct option longOpts[]
lustre/tests/statmany.c:
struct option longopts[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Iadc141507664c97dcc3112c382d4e379a1bf8041
Reviewed-on: https://review.whamcloud.com/23568
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 snmp: Change positional struct initializers to C99 63/23463/2
Steve Guminski [Thu, 27 Oct 2016 19:18:43 +0000 (15:18 -0400)]
LU-6210 snmp: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
snmp directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

snmp/lustre-snmp.c:
struct variable7 clusterFileSystems_variables[]
struct oid_table osd_table[]
struct oid_table osc_table[]
struct oid_table mds_table[]
struct oid_table mdc_table[]
struct oid_table cli_table[]
struct oid_table lov_table[]
struct oid_table ldlm_table[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Iaedd0165bca2a2af2ce6a0f535602a85c6217da8
Reviewed-on: https://review.whamcloud.com/23463
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.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-8066 obd: Move /proc/fs/lustre root level files to sysfs 25/23425/2
Oleg Drokin [Thu, 27 Oct 2016 14:59:50 +0000 (10:59 -0400)]
LU-8066 obd: Move /proc/fs/lustre root level files to sysfs

except devices, for now.

Linux-commit : 8b82844505699f10f80c7e554364e3d0618cd77d

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Change-Id: Iacdba1e0f703eb90688c1b93a2ef81c0c8ad7a91
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23425
Tested-by: Jenkins
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-8066 obd: Generic helpers for sysfs 09/22209/3
Oleg Drokin [Thu, 27 Oct 2016 14:43:49 +0000 (10:43 -0400)]
LU-8066 obd: Generic helpers for sysfs

Add generic helpers to allow displaying of lustre-specific values
in /sys/fs/lustre

except devices, for now.

Linux-commit : 5e66f70e963e4ba2266071343f5a153c7db4327b

Change-Id: Idfbf419d8218546463b993a8031ef00609f8dce9
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/22209
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@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-6401 headers: move lu_fid, ost_id funcs out of lustre_idl.h 12/22712/10
Ben Evans [Mon, 24 Oct 2016 16:48:26 +0000 (12:48 -0400)]
LU-6401 headers: move lu_fid, ost_id funcs out of lustre_idl.h

Move lu_fid functions into lustre/lustre_fid.h
Move ost_id functions into lustre/lustre_ostid.h
Fix indenting, include new headers as needed

Signed-off-by: Ben Evans <bevans@cray.com>
Change-Id: Idcbb95f614829b434c48a476172eedb421fe488f
Reviewed-on: https://review.whamcloud.com/22712
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8765 ptlrpc: update replay cursor when close during replay 18/23418/4
Niu Yawei [Thu, 27 Oct 2016 06:38:58 +0000 (02:38 -0400)]
LU-8765 ptlrpc: update replay cursor when close during replay

The replay cursor should be updated properly when close happened
during replay, otherwise, ptlrpc_replay_next() could run into a
dead loop due to an invalid replay cursor:

- replay cursor is moved to an open request during replay;
- application close that open file, so the rq_replay of the open
  request is cleared;
- ptlrpc_replay_next() calls ptlrpc_free_committed() to free
  committed/closed requests, the open request is removed from
  the committed list, so the replay cursor is changed to an
  empty list_head now. The open request won't be freed now since
  it's still held by the pending close request;
- ptlrpc_replay_next() continue to move the replay cursor to
  next and run into a dead loop at the end;

Another change in this patch is to remove the out of date comments
in ptlrpc_replay_next() and cover the whole process of finding
replay request within imp_lock, because:

1. With two separated replay lists and replay cursor introduced,
   finding replay request won't take much time as before, it's
   not necessary to do this "lock -> unlock -> lock -> unlock"
   trick anymore;

2. Nowadays there are various kind of non-replay requests are
   allowed during recovery, so ptlrpc_free_committed() may run in
   parallel to remove an open request while ptlrpc_replay_next()
   is iterating the open requests list;

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I358c4f55dbf38b0c9122c3aff40cf9ec96619d6a
Reviewed-on: https://review.whamcloud.com/23418
Tested-by: Jenkins
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 libcfs: use 64-bit times for cfs_srand seed 51/23351/2
Arnd Bergmann [Tue, 25 Oct 2016 01:58:26 +0000 (21:58 -0400)]
LU-4423 libcfs: use 64-bit times for cfs_srand seed

Several functions in Lustre call cfs_srand with do_gettimeofday
as the seed to get a pseudo-random number.
There is no bug here, but changing it to use ktime_get_ts64()
gets us closer to deprecating do_gettimeofday() and makes it slightly
more random.

Affected functions are:
lnet_shuffle_seed, init_lustre_lite and class_handle_init

Linux-commit: 1f4fc343c008981d3a91351c030e2c29f5cd1b1c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I86d156afd71456d7d5412ebb8a2e519367d4f81d
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/23351
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4423 ptlrpc: use 64-bit time for adaptive timeout 70/23270/2
Arnd Bergmann [Thu, 20 Oct 2016 01:24:02 +0000 (21:24 -0400)]
LU-4423 ptlrpc: use 64-bit time for adaptive timeout

The adaptive timeout handling stores absolute times in 32-bit time_t
quantities, which will overflow in 2038.

This changes it to use time64_t.

Linux-commit: 0ac0478b65de1e5b8b62f608bdf1d8ba631acc4d

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I50d1090865af8970276d039281fc2ca0b87fa8af
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/23270
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-4423 ldlm: use time64_t for l_last_activity 41/23141/2
Arnd Bergmann [Thu, 13 Oct 2016 18:50:00 +0000 (14:50 -0400)]
LU-4423 ldlm: use time64_t for l_last_activity

The l_last_activity struct member is used to keep track lock hold
times, and it is printed for debugging purposes. For the elapsed
time, we can use 'long' here, but it's better to use time64_t
for storing the real time to avoid an overflow in 2038.

Update server side code as well that is not present in upstream
client.

Linux-commit: bf6d21539d58f64812d71c956ecec3d67650b2ee

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: Idbbc64afbb9307e6133c671a7aa2122318c62679
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/23141
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4423 libcfs: tracefile document seconds overflow 37/23137/2
Arnd Bergmann [Thu, 13 Oct 2016 18:04:39 +0000 (14:04 -0400)]
LU-4423 libcfs: tracefile document seconds overflow

The lustre tracefile has a timestamp defined as

__u32 ph_sec;
__u64 ph_usec;

which seems completely backwards, as the microsecond portion of
a time stamp will always fit into a __u32 value, while the second
portion will overflow in 2038 or 2106 (in case of unsigned seconds).

Changing this would unfortunately change the format in an incompatible
way, breaking all existing user space tools that access the data.

This uses ktime_get_real_ts64() to replace the insufficient
do_gettimeofday() and then truncates the seconds portion to
an u32 type, along with comments to explain the result.

A possible alternative would be the use of ktime_get_ts64() to
read a monotonic timestamp that never overflows, but this would
trigger a check in user space 'hdr->ph_sec < (1 << 30)' that
attempts to ensure that the values are within a reasonable range.

Linux-commit: 65f28840e4c653b7d78feabcb65280c09d3d0d23

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I5fdf6d09d39fbb4da8ccba51a745b00996f116f7
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/23137
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-4423 libcfs: use 64-bit inode timestamps internally 36/23136/2
Arnd Bergmann [Thu, 13 Oct 2016 17:03:03 +0000 (13:03 -0400)]
LU-4423 libcfs: use 64-bit inode timestamps internally

Lustre has 64-bit timestamps in its network data structures, but
on 32 bit systems, it converts them directly into time_t, which is
32 bit wide.

This changes the code to use 64-bit time stamps for files. The Linux
VFS code still uses time_t though, and will be changed in a separate
patch series.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I6d3e986fa4eac2fe76a6d66a55f2cdbfe8fdae55
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/23136
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6245 libcfs: add ktime_get_real_seconds support 66/22866/10
James Simmons [Tue, 25 Oct 2016 01:43:12 +0000 (21:43 -0400)]
LU-6245 libcfs: add ktime_get_real_seconds support

In newer kernels time support is moving to u64 to avoid
the 2038 limitation. The function get_seconds() which
only returns a 32 bit value is being replaced by a new
function ktime_get_real_seconds(). This patch adds a
wrapper for older platforms that lack this function.
Only the libcfs/LNet layer has been ported in this
patch since it is a huge change.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ic16859f1b052bfb72299cc85fe50364a9e70d660
Reviewed-on: https://review.whamcloud.com/22866
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8314 lfs: improve getdirstripe interface 19/24319/4
Lai Siyao [Tue, 13 Dec 2016 15:57:40 +0000 (23:57 +0800)]
LU-8314 lfs: improve getdirstripe interface

* remove unused options '-v' '-R' '-q' for "lfs getdirstripe".
* add "[--mdt-hash|-t]" option for "lfs getdirstripe", and print
  hash_type by default.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ib7eaf00744d0cd5dec13e683c39e2ecf1d54808b
Reviewed-on: https://review.whamcloud.com/24319
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: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8922 lod: check master stripes properly 47/24247/2
Di Wang [Thu, 8 Dec 2016 09:55:26 +0000 (04:55 -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.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: I089f5cf517c71816151e8ece1b36b9064ee3b7f2
Reviewed-on: https://review.whamcloud.com/24247
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: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8569 linkea: linkEA size limitation 00/23500/9
Fan Yong [Sun, 28 Aug 2016 10:15:37 +0000 (18:15 +0800)]
LU-8569 linkea: linkEA size limitation

Under DNE mode, if we do not restrict the linkEA size, and if there
are too many cross-MDTs hard links to the same object, then it will
casue the llog overflow. On the other hand, too many linkEA entries
in the linkEA will serious affect the linkEA performance because we
only support to locate linkEA entry consecutively.

So we need to restrict the linkEA size. Currently, it is 4096 bytes,
that is independent from the backend. If too many hard links caused
the linkEA overflowed, we will add overflow timestamp in the linkEA
header. Such overflow timestamp has some functionalities:

1. It will prevent the object being migrated to other MDT, because
   some name entries may be not in the linkEA, so we cannot update
   these name entries for the migration.

2. It will tell the namespace LFSCK that the 'nlink' attribute may
   be more trustable than the linkEA, then avoid misguiding the
   namespace LFSCK to repair 'nlink' attribute based on linkEA.

There will be subsequent patch(es) for namespace LFSCK to handle the
linkEA size limitation and overflow cases.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2d6c2be04305c1d7e3af160d8b80e73b66a36483
Reviewed-on: https://review.whamcloud.com/23500
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>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoNew tag 2.9.51 2.9.51 v2_9_51 v2_9_51_0
Oleg Drokin [Tue, 27 Dec 2016 23:06:27 +0000 (18:06 -0500)]
New tag 2.9.51

Change-Id: Ie0e5df746be2336ad77da4ebe50faf7cf8337813
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8972 tests: Disable conf-sanity test 101 17/24517/2
Oleg Drokin [Sun, 25 Dec 2016 21:09:07 +0000 (16:09 -0500)]
LU-8972 tests: Disable conf-sanity test 101

It causes a lot of failures for apparently no good reason.

Change-Id: I0e29c3274b18eece1249e79bed2b58edc493836f
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/24517
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-8925 kernel: kernel update RHEL7.3 [3.10.0-514.2.2.el7] 72/24372/3
Bob Glossman [Mon, 12 Dec 2016 19:20:23 +0000 (11:20 -0800)]
LU-8925 kernel: kernel update RHEL7.3 [3.10.0-514.2.2.el7]

update RHEL 7.3 kernel to 3.10.0-514.2.2.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I684e25eede267c96d41c37b1c3295301c38b5573
Reviewed-on: https://review.whamcloud.com/24372
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-3425 utils: rename l_getgroups.8 to l_getidentity.8 19/24219/4
Andreas Dilger [Wed, 7 Dec 2016 20:56:40 +0000 (13:56 -0700)]
LU-3425 utils: rename l_getgroups.8 to l_getidentity.8

Rename the man page for l_getgroups.8 to l_getidentity.8 to match
the "new" name of the utility, and update the content accordingly.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I698c8170cb0623ff692bfe76962b5c71d75bc18b
Reviewed-on: https://review.whamcloud.com/24219
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8890 ptlrpc: fix module_param in ptlrpcd.c 65/24065/3
Dmitry Eremin [Fri, 25 Nov 2016 18:00:14 +0000 (21:00 +0300)]
LU-8890 ptlrpc: fix module_param in ptlrpcd.c

Missing module parameter description for ptlrpcd_per_cpt_max

Change-Id: Id00d6bd73cf2779e0f12db5184292ebdb0cfa8ae
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/24065
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>
3 years agoLU-8887 ptlrpc: remove unused pc->pc_env 61/24061/3
Dmitry Eremin [Thu, 1 Dec 2016 09:08:59 +0000 (12:08 +0300)]
LU-8887 ptlrpc: remove unused pc->pc_env

Environment for request interpreters is not used any more.

Change-Id: Id218fa251bb022f2fff11c79adeb83da65fe3088
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/24061
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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-8886 lfsck: handle -ENODATA for the end of iteration 56/24056/2
Fan Yong [Sun, 28 Aug 2016 09:41:14 +0000 (17:41 +0800)]
LU-8886 lfsck: handle -ENODATA for the end of iteration

When the LFSCK engine makes checkpoint, it will record the current
position (hash) of the iteration that can be used to resume the
LFSCK scanning from the latest checkpoint. But if someone removed
the target corresponding to the LFSCK checkpoint position, then
the LFSCK will start scanning from the 'next' position when try to
resume from the latest checkpoint. But if the 'next' hits the end
of the iteration, the lower layer (ldiskfs) will return "-ENODATA"
for dt_it_ops::load() call. The LFSCK engine needs to handle such
case properly to avoid reguarding it as failure.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5a6a46cf3eefbdc680780abcc3402860736d6e0a
Reviewed-on: https://review.whamcloud.com/24056
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-8869 build: Fix building of DEB packages 99/23999/6
Thomas Stibor [Tue, 29 Nov 2016 14:13:34 +0000 (15:13 +0100)]
LU-8869 build: Fix building of DEB packages

Building DEB packages failed with errors:
dh_install: lustre-dev missing files (debian/tmp/usr/lib/*.so.*)
and dpkg-checkbuilddeps: Unmet build dependencies.
Moreover, signing the DEB packages failed due signing problems
of the author listed in debian/changelog.
Additionally, latest DEB based distributions ship Lustre modules
from kernel staging which can conflict with modules build from
upstream. To fix the problem, build modules with
configure --with-kmp-moddir=updates and add search order
of "search updates built-in" in /etc/depmod.d/lustre.conf

Signed-off-by: Thomas Stibor <t.stibor@gsi.de>
Change-Id: I02c58103bfaa83b97f5cd207af823fb477e0f0d3
Reviewed-on: https://review.whamcloud.com/23999
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8724 utils: Use open() instead of opendir() with dirfd() 81/23981/6
Steve Guminski [Mon, 5 Dec 2016 19:39:16 +0000 (14:39 -0500)]
LU-8724 utils: Use open() instead of opendir() with dirfd()

Several llapi functions use opendir() and dirfd() to obtain a file
descriptor.  These calls are replaced with a single call to open().
This makes the code cleaner and more efficient.

This patch also corrects whitespace to match the Coding Style
Guidelines.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I798165960fb500920b82adabe389975135ed3ac9
Reviewed-on: https://review.whamcloud.com/23981
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8776 build: Fix weird inline definitions 79/23979/2
Steve Guminski [Tue, 22 Nov 2016 18:43:52 +0000 (13:43 -0500)]
LU-8776 build: Fix weird inline definitions

This patch removes unnecessary inline keywords from functions
that do not have to be inlined.  It also corrects the ordering
of the keywords in several functions from "inline static" to
"static inline".

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I13dde114a803513b72d6497f42be460c4df06883
Reviewed-on: https://review.whamcloud.com/23979
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7952 osp: Move strlen() call below LASSERT() 19/20919/5
Arshad Hussain [Tue, 21 Jun 2016 03:21:29 +0000 (08:51 +0530)]
LU-7952 osp: Move strlen() call below LASSERT()

This patch moves the strlen() call below LASSERT(). This
avoids a case when parameter to strlen() is NULL and
dereferencing the NULL pointer would cause fault before
it reaches LASSERT().

Signed-off-by: Arshad Hussain <arshad.hussain@seagate.com>
Change-Id: Ie7a683751cf44d7dfad6de1a9024c5fb7a35c35d
Reviewed-on: https://review.whamcloud.com/20919
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>
3 years agoLU-7988 hsm: don't use a ptlrpc_thread struct for the cdt 61/22761/8
Frank Zago [Wed, 28 Sep 2016 15:08:07 +0000 (11:08 -0400)]
LU-7988 hsm: don't use a ptlrpc_thread struct for the cdt

Since only the waitq and the event flag from the ptlrpc_thread
structure are used, declare these directly and do not use the
ptlrpc_thread structure at all.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Iba63ac70ad381f7e40976ac423594eae46c5249b
Reviewed-on: https://review.whamcloud.com/22761
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-6142 socklnd: change UAPI typedefs to proper structure 06/18506/5
James Simmons [Mon, 12 Dec 2016 18:15:48 +0000 (13:15 -0500)]
LU-6142 socklnd: change UAPI typedefs to proper structure

The upstream kernel requires proper structures so
convert all the UAPI typedefs in socklnd.h.

Remove the inline function socklnd_init_msg.
Its only used by the kernel code and functions
are not allowed in UAPI headers.

Change-Id: I4120c5abc4dda456289146452ed61e0162062cea
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/18506
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8562 osp: fix precreate_cleanup_orphans/precreate_reserve race 11/22211/7
Sergey Cheremencev [Thu, 10 Nov 2016 15:30:53 +0000 (23:30 +0800)]
LU-8562 osp: fix precreate_cleanup_orphans/precreate_reserve race

osp_statfs_interpret can clear error in opd_pre_status despite of the
fact that osp_precreate_cleanup_orphans got error and doesn't know
exactly OST object last_id. Example:
1. mdt sends req "create objects x..y"
2. objects created. mdt gets OK
3. MDT->OST reconnection
4. MDT sends cleanup_orphans last_used_fid=x
5. OST removes x..y and sends reply OK and last_id=x
6. MDT->OST connection aborted. cleanup_orphans exits with EIO
7. osp_statfs_interpret changes opd_pre_status from EIO to 0
8. osp_precreate_reserve reserves object and changes last_used_id from x to x+1
9. connection restored. MDT sends cleanup_orphans last_id=x+1
In fine OST has a gap - object x was removed by cleanup_orphans.

So don't clear opd_pre_recovering until we get last_id from OST.

Change-Id: I1647053fdab9a0c9bf59a048b0814e7b2dec52f2
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Seagate-bug-id: MRP-3693
Reviewed-on: https://review.whamcloud.com/22211
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8367 osp: do not block orphan cleanup 68/23168/17
Alex Zhuravlev [Fri, 14 Oct 2016 17:48:50 +0000 (20:48 +0300)]
LU-8367 osp: do not block orphan cleanup

do not block orphan cleanup till all reserved objects are consumed,
otherwise we risk to get into a livelock when one blocked thread
holding reservation can block recovery. instead ask OST to recreate
possible missing objects in our precreate window.

Change-Id: I066b0783cce54d7ecd25a08da5c76f211b7244f5
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/23168
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
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-8807 llite: check reply status in ll_migrate() 66/23666/2
Niu Yawei [Wed, 9 Nov 2016 02:43:36 +0000 (21:43 -0500)]
LU-8807 llite: check reply status in ll_migrate()

ll_migrate() should check reply status before trying to read
reply buffer, checking if request is NULL doesn't make sense.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I585844e0c1118fad23f19791dc95e34bc0d6e38a
Reviewed-on: https://review.whamcloud.com/23666
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6374 tests: wait for zfs commit 88/23688/2
Niu Yawei [Thu, 10 Nov 2016 04:15:16 +0000 (23:15 -0500)]
LU-6374 tests: wait for zfs commit

wait_delete_completed_mds() should always wait for zfs commit to free
used space.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: If57e67841060d9f13ec3ba13e44f7b88a82301c5
Reviewed-on: https://review.whamcloud.com/23688
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8901 misc: update Intel copyright messages for 2016 33/24233/4
Andreas Dilger [Thu, 8 Dec 2016 08:35:18 +0000 (01:35 -0700)]
LU-8901 misc: update Intel copyright messages for 2016

Update copyright messages for files updated in 2016, excluding
trivial patches.

Add trivial patches to updatecw.sh script exclude list.  Improve
the output of patches causing the most changes to include the
patch summary instead of just the hash.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ifb098e8126f698ea975e10ba13f5f47c449ae4ad
Reviewed-on: https://review.whamcloud.com/24233
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7765 tests: Fix replay-dual test_26 stderr redirection 65/18365/6
Oleg Drokin [Tue, 9 Feb 2016 17:05:30 +0000 (12:05 -0500)]
LU-7765 tests: Fix replay-dual test_26 stderr redirection

Using 2&>1 just redirects to a file named 1, while we need
to use 2>&1 to redirect to descriptor one.  In fact the
recommended form is &>/dev/null that means >/dev/null 2>&1.

Test-Parameters: trivial
Change-Id: I008e212cebe2f3d6f6c7b7ce000b508aaf63da38
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/18365
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
3 years agoLU-7735 utils: Allow revert of NO_PRIMNODE 04/18304/5
Sebastien Piechurski [Thu, 4 Feb 2016 16:45:16 +0000 (11:45 -0500)]
LU-7735 utils: Allow revert of NO_PRIMNODE

When formatting a target or modifying an existing one with the
parameter "--servicenode", the flag no_primnode is set on the target,
modifying the way the target is then registered on the MGS to avoid
adding the NID of the node actually registering and let only the nids
given with --servicenode parameters.

However, if someone wants to revert to the older behavior with the
"--failnode" parameter, the no_primnode flag is never unset, and the
primary node NID is never added to the mountdata.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2251f66236c91365c03e7d138cd8e6508956d73d
Reviewed-on: https://review.whamcloud.com/18304
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8920 utils: don't print deactivated OSTs in "lfs df" 28/24228/2
Andreas Dilger [Wed, 7 Dec 2016 23:56:47 +0000 (16:56 -0700)]
LU-8920 utils: don't print deactivated OSTs in "lfs df"

Don't print deactivated OSTs or MDTs in "lfs df".  If they have
been deactivated then the sysadmin knows they are inactive so
there isn't much benefit to printing them all the time.  Only
print deactivated OSTs/MDTs if the new "-v" option is given.

Add long options for "-i" and "-h" (--inodes and --human-readable,
respectively) and sort the lfs_df() options to be alphabetical by
short option letter.

Move the "lfs df" manual to a separate "lfs-df.1" man page to
allow better description of the options and examples.

Add a "flags" argument to showdf() and mntdf() instead of adding
an every-growing list of boolean arguments to these functions.

Do space->tab conversion for affected functions.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I97917f0583373ffe645f68ed3cf8dbfbc48cab07
Reviewed-on: https://review.whamcloud.com/24228
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8906 mdd: Return rc in mdd_local_file_create() 41/24141/2
Henri Doreau [Mon, 5 Dec 2016 14:43:03 +0000 (15:43 +0100)]
LU-8906 mdd: Return rc in mdd_local_file_create()

rc was sometimes set but not returned, with no reason.

Change-Id: I30d1aa94aedce1dd974ff0da20b1491298d2d70e
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/24141
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8867 ksocklnd: ignore timedout TX on closing connection 73/23973/3
Liang Zhen [Mon, 28 Nov 2016 07:47:23 +0000 (15:47 +0800)]
LU-8867 ksocklnd: ignore timedout TX on closing connection

ksocklnd reaper thread always tries to close the connection for the
first timedout zero-copy TX. This is wrong if this connection is
already being closed, because the reaper will see the same TX again
and again and cannot find out other timedout zero-copy TXs and close
connections for them.

Change-Id: I4552f556f17910857e589a8ae27682d976fcd991
Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-on: https://review.whamcloud.com/23973
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8847 tests: llapi_fid_test uses incorrect parameters 39/23939/2
Steve Guminski [Thu, 24 Nov 2016 12:57:33 +0000 (07:57 -0500)]
LU-8847 tests: llapi_fid_test uses incorrect parameters

Several function calls in test12 were providing incorrect parameters.
The value "0600" was provided, in an attempt to create a file with
read/write access for the owner.  However, the parameters actually
represent the open flags, so the incorrect parameters were instead
requesting (O_EXCL | O_NOCTTY).

Since llapi_create_volatile_idx by default already uses
(O_RDWR | O_CREAT) and a mask of (S_IRUSR | S_IWUSR), there are no
further flags required.  For llapi_open_by_fid, only the minimum
O_RDONLY is required (the call should not attempt to create the
file).

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I5a1c9a014ab19a1a6a1901e2a8a091d4d65548f6
Reviewed-on: https://review.whamcloud.com/23939
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8305 tests: fix fileset setup in sanity-sec 36/23936/2
Sebastien Buisson [Thu, 24 Nov 2016 10:34:07 +0000 (11:34 +0100)]
LU-8305 tests: fix fileset setup in sanity-sec

In test_27 of sanity-sec, only set fileset on nodemap with
'set_param -P' command. This command will install the fileset info
into all servers including MGS. But we need to wait into
wait_nm_sync() for it to be set.

Test-Parameters: trivial testlist=sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec
Test-Parameters: trivial testlist=sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec
Test-Parameters: trivial testlist=sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I811ca29f5f58385dd5f76a069556865850065e3e
Reviewed-on: https://review.whamcloud.com/23936
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Kit Westneat <kit.westneat@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8811 mdc: avoid returning freed request 43/23843/2
John L. Hammond [Thu, 17 Nov 2016 17:39:19 +0000 (11:39 -0600)]
LU-8811 mdc: avoid returning freed request

In mdc_close() if ptlrpc_request_pack() fails then set req to NULL so
that an already freed request is not returned in *request.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7460c650b736f51d78981f8a1e50758f7acf7c77
Reviewed-on: https://review.whamcloud.com/23843
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-8846 lfs: try to unlink volatile file in lfs_migrate() 42/23842/3
John L. Hammond [Thu, 17 Nov 2016 17:32:15 +0000 (11:32 -0600)]
LU-8846 lfs: try to unlink volatile file in lfs_migrate()

In lfs_migrate() try to unlink the volatile file in case the MDT does
not support volatile file creation.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1e777c22ebde22e0c2080683a2b13650da7ebc7a
Reviewed-on: https://review.whamcloud.com/23842
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8197 ptlrpc: set correct rq_timeout for normal replay reply 33/23833/3
Niu Yawei [Thu, 17 Nov 2016 14:07:02 +0000 (09:07 -0500)]
LU-8197 ptlrpc: set correct rq_timeout for normal replay reply

Fix from f3ce48ce543791d60326777d95ab2c9c03826965 introduced a
regression which set larger rq_timeout of normal replay reply
mistakenly, that result in incorrect estimated service time
increase during recovery.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: If62c94f6147e6d6d9ae5954e4847725e9cd66a67
Reviewed-on: https://review.whamcloud.com/23833
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8844 llite: delete lloop 17/23817/2
James Simmons [Wed, 16 Nov 2016 20:54:37 +0000 (15:54 -0500)]
LU-8844 llite: delete lloop

Since the migration to clio the lloop performance
has been far worst than the default loop back
device. Also lloop never worked on non x86 platforms.
Also newer kernel's loop back devices support
direct IO so their is no need for lloop anymore.

Change-Id: Iab029d4fcb223b01f07a1f279e2d4da8616fa93e
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23817
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
3 years agoLU-8842 mdc: Make IT_OPEN take lookup bits lock 97/23797/2
Patrick Farrell [Wed, 16 Nov 2016 15:33:21 +0000 (09:33 -0600)]
LU-8842 mdc: Make IT_OPEN take lookup bits lock

Commit 8d161d44214f907a9f2d9cf5a79cd2c83de995c3 from
http://review.whamcloud.com/#/c/10205/3 accidentally
changed handling of IT_OPEN, making it take the
MDS_INODELOCK_UPDATE bits lock instead of
MDS_INODELOCK_LOOKUP.

This does not cause any known bugs.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ia7269d8907ad41b6d53c8b106f33cab8afecb514
Reviewed-on: https://review.whamcloud.com/23797
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8836 lprocfs: move lprocfs_stats_[un]lock to a source file 73/23773/2
James Simmons [Tue, 15 Nov 2016 21:03:00 +0000 (16:03 -0500)]
LU-8836 lprocfs: move lprocfs_stats_[un]lock to a source file

There is no reason to export lprocfs_stats_alloc_one.
The reason is due to the functions lprocfs_stats_[un]lock
being inline functions in a header file. Lets untangle
this mess and turn those inline functions into real
functions in a source file.

Change-Id: I8e33f36226c54baa93c50beb716705d20a55fa58
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23773
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
3 years agoLU-8826 recovery: don't shrink recovery hard time 16/23716/7
Niu Yawei [Fri, 11 Nov 2016 11:33:03 +0000 (06:33 -0500)]
LU-8826 recovery: don't shrink recovery hard time

1. Don't shrink recovery hard time, otherwise, soft limit will be
   very close to hard limit and hard timer can be expired easily
   during the 1st recovery stage: waiting for all clients
   connected, and VBR won't take effect at all. Added replay-vbr
   test_13 to verify this.
2. When exp_need_sync is set, all transactions on MDT/OST should
   be synchronous.
3. Removed unused target_client_add_cb().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Idbb011f2772d5c779c53c3e990ceef5a386e4b5b
Reviewed-on: https://review.whamcloud.com/23716
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@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-8793 tests: add version check to conf-sanity.sh test_99 68/23668/2
Emoly Liu [Wed, 9 Nov 2016 06:12:28 +0000 (14:12 +0800)]
LU-8793 tests: add version check to conf-sanity.sh test_99

This patch adds Lustre version check codes into conf-sanity.sh
test_99 to make the test interoperate with servers that do not
have the following change:

Lustre-commit: 310fd9ced4e60d83d4f93ebf45f05654eff408cb
Lustre-change: http://review.whamcloud.com/21545

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I379388427c7824c21e5c1f65ec8e362ca1b7905c
Reviewed-on: https://review.whamcloud.com/23668
Tested-by: Jenkins
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-8810 tests: skip non-crucial LFSCK intermediateness check 50/23650/2
Fan Yong [Thu, 11 Aug 2016 22:59:47 +0000 (06:59 +0800)]
LU-8810 tests: skip non-crucial LFSCK intermediateness check

Sometimes, because of system schedule issue, the test scripts
may miss to check some LFSCK intermediate status, but it will
not affect the LFSCK to detect and repair the inconsistency.
We can skip some non-crucial status check, but check the LFSCK
repaired things directly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie356fa194b9ea7b9194b9fa9f8cf44a69d4c20db
Reviewed-on: https://review.whamcloud.com/23650
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@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>
3 years agoLU-8809 osp: print more opd_pre information in LASSERTF() 42/23642/2
Emoly Liu [Tue, 8 Nov 2016 01:44:07 +0000 (09:44 +0800)]
LU-8809 osp: print more opd_pre information in LASSERTF()

This patch is to print out the opd_pre_last_created_fid and
opd_pre_used_fid values in the LASSERT() from osp_statfs(),
so that we know what kind of values they contain.

Test-Parameters: trivial
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I9f525aa46fc0078d241b04767f5a2cebebeaf6b9
Reviewed-on: https://review.whamcloud.com/23642
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
3 years agoLU-4423 lov: check return value of lov_sub_get() 18/23618/4
Jinshan Xiong [Sat, 26 Nov 2016 16:24:56 +0000 (11:24 -0500)]
LU-4423 lov: check return value of lov_sub_get()

Check return value of lov_sub_get() in lov_io_read_ahead().

Linux-commit: f99e73a5e3ff556bc69e5e592fee18d4cb7600dd

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ic5403664c649b8f41861cf1bbfc68ab9ef537a15
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23618
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
3 years agoLU-8801 quota: fix ldiskfs accounting iterator 83/23583/7
Niu Yawei [Fri, 4 Nov 2016 14:49:57 +0000 (10:49 -0400)]
LU-8801 quota: fix ldiskfs accounting iterator

walk_tree_dqentry() should always record the information of the
index block it walked through no matter if a valid entry is found
in this call, so that it can continue the next search from correct
position.

Added a test case in s-q to verify accounting iterator.

Reading proc file acct_user/group will become extremely slow when
there are large amount of id entries, because each seq->start():
lprocfs_quota_seq_start() calls it->next() one by one to move the
cursor to last processed position. This patch changed it to use the
it->load() on last processed key, and reading performance improved
significantly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2ddcd35e505233fa4de821fefa5fbe87be4dbe19
Reviewed-on: https://review.whamcloud.com/23583
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
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-8790 test: Limit lock number by available inodes count 43/23543/2
Dmitry Eremin [Wed, 2 Nov 2016 14:32:39 +0000 (17:32 +0300)]
LU-8790 test: Limit lock number by available inodes count

For machines with big numbers of CPUs the count of files to create
is more than available inodes. So, the sanity::test_124b fails.

Test-Parameters: trivial

Change-Id: I544efbc0da7acc99f4f60010cb404d234b1db964
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23543
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8789 build: add files to .gitignore 40/23540/3
Dmitry Eremin [Wed, 2 Nov 2016 13:55:07 +0000 (16:55 +0300)]
LU-8789 build: add files to .gitignore

Exclude files that are generated during the "make" build process.

Test-Parameters: trivial

Change-Id: I5a573d7842fec94616de5d016cc5aab99e813193
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23540
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6210 libcfs: Change positional struct initializers to C99 32/23332/3
Steve Guminski [Wed, 26 Oct 2016 17:47:01 +0000 (13:47 -0400)]
LU-6210 libcfs: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
libcfs directory that use C89 or GCC-only syntax are updated to C99
syntax.

The C99 syntax prevents incorrect initialization if values are
accidently placed in the wrong position, allows changes in the struct
definition, and clears any members that are not given an explicit
value.

The following struct initializers have been updated:

libcfs/include/libcfs/libcfs_crypto.h:
static struct cfs_crypto_hash_type hash_types[]
libcfs/libcfs/linux/linux-debug.c:
static struct notifier_block libcfs_panic_notifier
libcfs/libcfs/linux/linux-module.c:
struct miscdevice libcfs_dev
libcfs/libcfs/util/nidstrings.c:
static struct netstrfns  libcfs_netstrfns[]

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I75479a0ff751e710259374f34cf0dada977e5d8a
Reviewed-on: https://review.whamcloud.com/23332
Reviewed-by: Frank Zago <fzago@cray.com>
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: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8703 libcfs: fix error messages 07/23307/3
Dmitry Eremin [Fri, 21 Oct 2016 12:48:11 +0000 (15:48 +0300)]
LU-8703 libcfs: fix error messages

Don't treat unability to set CPU partition affinity as error.

Change-Id: I9ccbef76e05f1a5f75b648610b5a71389ed0d6e1
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23307
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-8739 test: disable DNE in racer for old MDSs 73/23273/2
John L. Hammond [Thu, 20 Oct 2016 14:32:03 +0000 (09:32 -0500)]
LU-8739 test: disable DNE in racer for old MDSs

In racer.sh add environtmental variables RACER_ENABLE_REMOTE_DIRS,
RACER_ENABLE_STRIPED_DIRS, and RACER_ENABLE_MIGRATION to enable or
disable the corresponding operations. RACER_ENABLE_REMOTE_DIRS
defaults to true only if the MDS version is at least 2.5, while
RACER_ENABLE_STRIPED_DIRS and RACER_ENABLE_MIGRATION default to true
only if the MDS version is at least 2.8.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I88b6350bd5abef4e13055a0a2ab68692367a6a5d
Reviewed-on: https://review.whamcloud.com/23273
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>
3 years agoLU-8684 mgs: prevent duplicate pool to be added to the log 84/23184/8
Jadhav Vikram [Fri, 14 Oct 2016 04:56:34 +0000 (10:26 +0530)]
LU-8684 mgs: prevent duplicate pool to be added to the log

pool proc entry get created through mgc process running on
client or mdt's, mgs is not aware about pool proc entrys, so
mgs failed to check pool already exist, it simply writes the
pool operation logs into logfile of client or mdt's. lctl
pool_new for existing pool will only write logs and succeed
on mgs, mgc running on client or mdt's process the log to
create pool and cause the warning message proc already
registered for that existing pool.

Changes prevents the duplicate pool to be added to the log
mgs check pool creation logs of client and mdt's logfile
to figure out attempt of duplicate pool creation.

Signed-off-by: Jadhav Vikram <jadhav.vikram@seagate.com>
Change-Id: Ia80d116f552c5f718df99589906404b58f17d85e
Reviewed-on: https://review.whamcloud.com/23184
Reviewed-by: Fan Yong <fan.yong@intel.com>
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-8538 tests: Silence conf-sanity 63 on debug kernel 21/22121/7
Oleg Drokin [Wed, 24 Aug 2016 20:33:52 +0000 (16:33 -0400)]
LU-8538 tests: Silence conf-sanity 63 on debug kernel

On debug kernels every slab only takes whole page at all
times no matter the size, so silence the misleading error then.

Change-Id: I051b98a1200f61c38966e0be7543bf884efbc22c
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/22121
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-7714 osd: propagate errors in osd_objset_open() 95/21495/2
John L. Hammond [Mon, 25 Jul 2016 13:36:48 +0000 (08:36 -0500)]
LU-7714 osd: propagate errors in osd_objset_open()

In osd_objset_open() replace GOTO(out, -ENOTSUPP) with
GOTO(out, rc = -ENOTSUPP).

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I30465664a8f50c278335fe5ebcbc5f228e33c25f
Reviewed-on: https://review.whamcloud.com/21495
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>
3 years agoLU-8403 obd: remove OBD_NOTIFY_CREATE 20/21420/5
John L. Hammond [Tue, 19 Jul 2016 14:16:15 +0000 (09:16 -0500)]
LU-8403 obd: remove OBD_NOTIFY_CREATE

None of the obd_notify() handlers listen for the OBD_NOTIFY_CREATE
event, so remove it and its sole use in lov_add_target().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I976b2215ba4b8fecf170a4efd3d7ec642183daaf
Reviewed-on: https://review.whamcloud.com/21420
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
3 years agoLU-8295 tests: comply with OBD_RACE() behavior 17/21117/12
Bruno Faccini [Thu, 30 Jun 2016 23:11:14 +0000 (01:11 +0200)]
LU-8295 tests: comply with OBD_RACE() behavior

Have conf-sanity/test_41c better comply with OBD_RACE() internal
behavior when creating a racy situation with 2 similar mount
cmds being run in parallel.

CFS_FAIL_ONCE must be set, and fail_loc must only be reset when
it is sure that both mount commands have reached the race
rendez-vous, in order to have OBD_RACE() behave as expected.

start() function is no longer used to avoid extra tools which
surround mount command to interfer due to concurrency.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ic513c82c4fd1395d88144cf1c590a08dfd3c11e5
Reviewed-on: https://review.whamcloud.com/21117
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6449 mdt: correct status and ChangeLogs for dead objects 77/21077/13
Bruno Faccini [Wed, 29 Jun 2016 17:06:21 +0000 (19:06 +0200)]
LU-6449 mdt: correct status and ChangeLogs for dead objects

This patch is an addon of first patch for LU-6449
(Gerrit change http://review.whamcloud.com/20991) which implements
the feature of broadcasting HSM remove requests, with no/0 archive_id
specified, to all currently registered archives.

hsm_cdt_request_completed() has been fixed to no longer only return
SUCCEED status for HSM requests on dead objects but effective status
and also to create associated ChangeLog records. This last change
has required to also change mdd/ChangeLog interface to allow to
specify a FID, and to use this way extensively.
Error case in retry-mode has also been fixed to allow layout-lock
to be released.

sanity-hsm/test_[220a,222[c,d],224a] have been added to check correct
behavior.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I5885cc8feb2b3d50bfc691706401c7c19ba78f72
Reviewed-on: https://review.whamcloud.com/21077
Tested-by: Jenkins
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6449 hsm: handle completions with non-existent objects 12/22212/3
Bruno Faccini [Mon, 29 Aug 2016 13:20:48 +0000 (15:20 +0200)]
LU-6449 hsm: handle completions with non-existent objects

In hsm_cdt_request_completed() release the layout lock for a completed
restore regardless of whether the object existed. Rewrite
hsm_swap_layouts() to accept the already found object rather than its
FID. Add a comment to mdt_object_unlock() that the object passed may
be NULL.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I571df2dab25822ba5a4e40c60018871051140f93
Reviewed-on: https://review.whamcloud.com/22212
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-7845 obd: add 'network' client mount option 92/19792/24
Sebastien Buisson [Tue, 26 Apr 2016 09:01:00 +0000 (11:01 +0200)]
LU-7845 obd: add 'network' client mount option

Add a 'network' mount option on client side. All connections made by
the client must be on the LNet network specified in the 'network'
option.

This option can be useful in case of several Lustre client mount
points on the same node, with each mount point using a different
network. It is also interesting when running Lustre clients from
containers, by restricting each container to a specific network.

This new option is added by tampering with two config commands:
- setup: add a fourth parameter, which is the net to restrict
  connections to. This parameter will be passed down to
  ptlrpc_uuid_to_peer() so that client only connects to peers on the
  restricted network.
- add_conn: skip this command if uuid to connect to is not on
  restricted network.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ica7ab6ebe7c2c9e7b0409b615e90d9271c31e92f
Reviewed-on: https://review.whamcloud.com/19792
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-7605 test: Skip sanityn test_78 55/19055/8
Wei Liu [Tue, 25 Oct 2016 21:41:20 +0000 (14:41 -0700)]
LU-7605 test: Skip sanityn test_78

Skip sanityn test_78 if server version is older than 2.7.58

Test-Parameters: trivial testlist=sanityn

Change-Id: Ief602524f72cdab73c39ec1181f99bb27b33da37
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/19055
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
3 years agoLU-7845 gss: support namespace in lgss_keyring 81/18781/35
Sebastien Buisson [Thu, 14 Jan 2016 16:57:10 +0000 (17:57 +0100)]
LU-7845 gss: support namespace in lgss_keyring

When we want Kerberos authentication for a Lustre client run from
a Docker container, it is necessary that request_key() forwards
to lgss_keyring userland helper sufficient information regarding
the namespace from which mount command was launched. That way,
helper function can bind to caller's namespace, and retrieve
Kerberos credentials of the container.

To achieve this:
- add a lpi_reftask field to struct llog_process_info: this is the
  task_struct of the process initiating the mount;
- use lpi_reftask to put llog_process_thread_daemonize thread in
  same namespace as calling llog_process_or_fork();
- add a reference PID to struct obd_import: this is the PID of
  the init process of the namespace from which the import
  creation was originated;
- use reference PID from struct obd_import as a new 'pid' parameter
  to call-out information sent from kernel space to userspace
  via request-key;
- in lgss_keyring, if necessary perform credentials retrieval
  in caller's namespace, thanks to a call to 'setns'.

For user's credentials, use current PID instead of import's
reference PID to get the reference namespace.

Change-Id: I934ed857fdf323e55a2a5acf06e8799c3a6421f0
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/18781
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
3 years agoLU-6142 lnet: change lnet selftest UAPI typedefs to proper structure 88/24188/4
James Simmons [Wed, 7 Dec 2016 01:34:43 +0000 (20:34 -0500)]
LU-6142 lnet: change lnet selftest UAPI typedefs to proper structure

The upstream kernel requires proper structures so
convert all the UAPI typdefs in lnetst.h.

Test-Parameters: trivial testlist=lnet-selftest

Change-Id: I6a342e91a5331a946b74a01229deed2bfa6b6441
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24188
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
3 years agoLU-8832 tests: Generalize check of virtual machine 74/23774/4
James Nunez [Tue, 15 Nov 2016 21:05:49 +0000 (14:05 -0700)]
LU-8832 tests: Generalize check of virtual machine

The patch for LU-8248, commit 39582273a7a52fb, we added a
function, called running_in_vm(), to check if the test is
being run in a VM and, if so, ignore the performance
results. The check for running in a VM needs to be updated
to run correctly in a SLES environment.

Test-Parameters: trivial clientdistro=sles11sp4 mdsdistro=sles11sp4 ossdistro=sles11sp4 testlist=sanity
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Iebca20c6be81da7fef18e7d486cb59e3f3877eaa
Reviewed-on: https://review.whamcloud.com/23774
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
3 years agoLU-8640 tests: relax time check of sanity-hsm test_16 25/22725/2
Chennaiah Palla [Mon, 26 Sep 2016 06:35:41 +0000 (12:05 +0530)]
LU-8640 tests: relax time check of sanity-hsm test_16

If the copytool and test script round clock time in a
different way, a strict time check would causes failure.

Seagate-bug-id: MRP-3436
Signed-off-by: Chennaiah Palla <chennaiah.palla@seagate.com>
Change-Id: Ie30c4366f5f9c4afab64f6825b907bf04d8419ab
Reviewed-on: https://review.whamcloud.com/22725
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-7264 mdd: refactor changelog handling for XATTR ops 97/22697/6
Henri Doreau [Fri, 23 Sep 2016 08:07:40 +0000 (10:07 +0200)]
LU-7264 mdd: refactor changelog handling for XATTR ops

Add a helper function mdd_xattr_changelog_type() to determine the changelog
type to store when setting/deleting an xattr, if applicable.

Change-Id: I2a0d1d524c3a7c33da96ee470fe14ad13fd8638c
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/22697
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>
3 years agoLU-8627 test: wait on MDS for ost-pool proc entry to update 53/22653/6
Bhagyesh Dudhediya [Wed, 30 Nov 2016 14:06:04 +0000 (19:36 +0530)]
LU-8627 test: wait on MDS for ost-pool proc entry to update

Many of the ost-pools test cases fail on the setup having
separate MGS and MDS.

The lctl pool commands are ran on MGS. The tests involving the
pools fail if the pool configurations are not updated on client
and/or MDS side.

This patch adds wait for pool configuration propogation on MDS(s)
on various occassions like pool creation, adding targets to the
pool, removing targets from the pool, destroying the pool, etc.

Seagate-Bug-id: MRP-2929
Signed-off-by: Bhagyesh Dudhediya <bhagyesh.dudhediya@seagate.com>
Change-Id: Ib4bde368f8068b0d32f89e905cf80a27032bd41e
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/10132
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Reviewed-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Jenkins
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-on: https://review.whamcloud.com/22653
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>