Whamcloud - gitweb
fs/lustre-release.git
2 years agoLU-9480 lnet: add enhanced statistics 95/25795/27
Amir Shehata [Thu, 2 Feb 2017 22:01:15 +0000 (14:01 -0800)]
LU-9480 lnet: add enhanced statistics

Added statistics to track the different types of
LNet messages which are sent/received/dropped

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I7e1fc991a56df20181f9e55a794765349a4d2cb9
Reviewed-on: https://review.whamcloud.com/25795

2 years agoLU-9480 lnet: add "lnetctl discover" 93/25793/29
Sonia Sharma [Mon, 13 Feb 2017 20:40:19 +0000 (12:40 -0800)]
LU-9480 lnet: add "lnetctl discover"

Add a "discover" subcommand to lnetctl

jt_discover() in lnetctl.c calls lustre_lnet_discover_nid()
to implement "lnetctl discover". The output is similar to
"lnetctl ping" command.
This patch also does some clean up in linlnetconfig.c
For parameters under global settings, the common code
for them is pulled in funtions ioctl_set_value() and
ioctl_show_global_values().

Test-Parameters: trivial
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I98ebb0b27de4b32ea07421f7dd71a4a1c96f3e05
Reviewed-on: https://review.whamcloud.com/25793

2 years agoLU-9077 lnet: fix for static analysis issues 92/25792/29
sharmaso [Wed, 8 Feb 2017 22:42:01 +0000 (14:42 -0800)]
LU-9077 lnet: fix for static analysis issues

fixes the 11 static analysis issues found in
v2_9_52_0-66-gec839d4.

1. lustre_lnet_show_numa_range - fixed
2. lnet_select_pathway - fixed
3. lustre_lnet_show_discovery - fixed
4. lnet_discover_peer_locked - false positive
5. lustre_lnet_ping_nid - fixed
6. lustre_lnet_ping_nid - false positive
7. lustre_lnet_show_discovery - duplicate of 3
8. lustre_lnet_show_max_intf - fixed
9. lustre_lnet_show_max_intf - duplicate of 8
10. lnet_peer_set_primary_data - false positive
11. lustre_lnet_show_numa_range - fixed

Test-Parameters: trivial
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I4cb03e4f64cd0c743ee3646f4628d34533b2d4ba
Reviewed-on: https://review.whamcloud.com/25792
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add "lnetctl ping" command 91/25791/31
Olaf Weber [Thu, 6 Apr 2017 09:43:20 +0000 (11:43 +0200)]
LU-9480 lnet: add "lnetctl ping" command

Adds function jt_ping() in lnetctl.c and
lustre_lnet_ping_nid() in liblnetconfig.c file.
The output of "lnetctl ping" is similar to
"lnetctl peer show".

Function jt_ping() in lnetctl.c calls lustre_lnet_ping_nid()
to implement "lnetctl ping". Adds a function infra_ping_nid()
to be later reused for the ping similar lnetctl commands.
Uses a new ioctl call, IOC_LIBCFS_PING_PEER for "lnetctl ping".
With "lnetctl ping", multiple nids can be pinged. Uses a new
struct(lnet_ioctl_ping_data in lib-dlc.h) to pass the data
from kernel to user space for ping. Also changes lnet_ping()
function and its input parameters in lnet/lnet/api-ni.c

Test-Parameters: trivial
Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I67024d87fa5cca6aa7ff7a8099d4400a795f3a83
Reviewed-on: https://review.whamcloud.com/25791
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add "lnetctl peer list" 90/25790/26
Olaf Weber [Fri, 27 Jan 2017 15:36:47 +0000 (16:36 +0100)]
LU-9480 lnet: add "lnetctl peer list"

Add IOC_LIBCFS_GET_PEER_LIST to obtain a list of the primary
NIDs of all peers known to the system. The list is written
into a userspace buffer by the kernel. The typical usage is
to make a first call to determine the required buffer size,
then a second call to obtain the list.

Extend the "lnetctl peer" set of commands with a "list"
subcommand that uses this interface.

Modify the IOC_LIBCFS_GET_PEER_NI ioctl (which is new in the
Multi-Rail code) to use a NID to indicate the peer to look
up, and then pass out the data for all NIDs of that peer.

Re-implement "lnetctl peer show" to obtain the list of NIDs
using IOC_LIBCFS_GET_PEER_LIST followed by one or more
IOC_LIBCFS_GET_PEER_NI calls to get information for each
peer.

Make sure to copy the structure from kernel space to
user space even if the ioctl handler returns an error.
This is needed because if the buffer passed in by the
user space is not big enough to copy the data, we want
to pass the requested size to user space in the structure
passed in. The return code in this case is -E2BIG.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I522c11e6ec09bec46121496d526bb258e10295f1
Reviewed-on: https://review.whamcloud.com/25790
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: implement Peer Discovery 89/25789/24
Olaf Weber [Tue, 28 Mar 2017 13:05:03 +0000 (15:05 +0200)]
LU-9480 lnet: implement Peer Discovery

Implement Peer Discovery.

A peer is queued for discovery by lnet_peer_queue_for_discovery().
This set LNET_PEER_DISCOVERING, to indicate that discovery is in
progress.

The discovery thread lnet_peer_discovery() checks the peer and
updates its state as appropriate.

If LNET_PEER_DATA_PRESENT is set, then a valid Push message or
Ping reply has been received. The peer is updated in accordance
with the data, and LNET_PEER_NIDS_UPTODATE is set.

If LNET_PEER_PING_FAILED is set, then an attempt to send a Ping
message failed, and peer state is updated accordingly. The discovery
thread can do some cleanup like unlinking an MD that cannot be done
from the message event handler.

If LNET_PEER_PUSH_FAILED is set, then an attempt to send a Push
message failed, and peer state is updated accordingly. The discovery
thread can do some cleanup like unlinking an MD that cannot be done
from the message event handler.

If LNET_PEER_PING_REQUIRED is set, we must Ping the peer in order to
correctly update our knowledge of it. This is set, for example, if
we receive a Push message for a peer, but cannot handle it because
the Push target was too small. In such a case we know that the
state of the peer is incorrect, but need to do extra work to obtain
the required information.

If discovery is not enabled, then the discovery process stops here
and the peer is marked with LNET_PEER_UNDISCOVERED. This tells the
discovery process that it doesn't need to revisit the peer while
discovery remains disabled.

If LNET_PEER_NIDS_UPTODATE is not set, then we have reason to think
the lnet_peer is not up to date, and will Ping it.

The peer needs a Push if it is multi-rail and the ping buffer
sequence number for this node is newer than the sequence number it
has acknowledged receiving by sending an Ack of a Push.

If none of the above is true, then discovery has completed its work
on the peer.

Discovery signals that it is done with a peer by clearing the
LNET_PEER_DISCOVERING flag, and setting LNET_PEER_DISCOVERED or
LNET_PEER_UNDISCOVERED as appropriate. It then dequeues the peer
and clears the LNET_PEER_QUEUED flag.

When the local node is discovered via the loopback network, the
peer structure that is created will have an lnet_peer_ni for the
local loopback interface. Subsequent traffic from this node to
itself will use the loopback net.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I30acd1e046604013025b231b5806be25468a2286
Reviewed-on: https://review.whamcloud.com/25789
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add the Push target 88/25788/23
Olaf Weber [Tue, 28 Mar 2017 12:48:44 +0000 (14:48 +0200)]
LU-9480 lnet: add the Push target

Peer Discovery will send a Push message (same format as an
LNet Ping) to Multi-Rail capable peers to give the peer the
list of local interfaces.

Set up a target buffer for these pushes in the_lnet. The
size of this buffer defaults to LNET_MIN_INTERFACES, but it
is resized if required.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I09b5ad8ae504ba8368d908539001fb8afc2c2778
Reviewed-on: https://review.whamcloud.com/25788
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: tune lnet_peer_discovery_disabled with lnetctl 87/25787/21
Olaf Weber [Tue, 28 Mar 2017 09:09:32 +0000 (11:09 +0200)]
LU-9480 lnet: tune lnet_peer_discovery_disabled with lnetctl

A new tunable, lnet_peer_discovery_disabled, has been introduced.
Make it tunable with lnetctl. Note that the state of discovery is
reported as 1/enabled, or 0/disabled, which is the inverse of the
module parameter.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I67333d86520c5b6db8ff99c924054c4b487c8029
Reviewed-on: https://review.whamcloud.com/25787
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
2 years agoLU-9480 lnet: add discovery thread 86/25786/23
Olaf Weber [Fri, 27 Jan 2017 15:32:11 +0000 (16:32 +0100)]
LU-9480 lnet: add discovery thread

Add the discovery thread, which will be used to handle peer
discovery. This change adds the thread and the infrastructure
that starts and stops it. The thread itself does trivial work.

Peer Discovery gets its own event queue (ln_dc_eqh), a queue
for peers that are to be discovered (ln_dc_request), a queue
for peers waiting for an event (ln_dc_working), a wait queue
head so the thread can sleep (ln_dc_waitq), and start/stop
state (ln_dc_state).

Peer discovery is started from lnet_select_pathway(), for
GET and PUT messages not sent to the LNET_RESERVED_PORTAL.
This criterion means that discovery will not be triggered by
the messages used in discovery, and neither will an LNet ping
trigger it.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I38a48ab7f61c8ef1b994cd17069729f243912bdf
Reviewed-on: https://review.whamcloud.com/25786
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
2 years agoLU-9480 lnet: add msg_type to lnet_event 85/25785/23
Olaf Weber [Fri, 27 Jan 2017 15:31:57 +0000 (16:31 +0100)]
LU-9480 lnet: add msg_type to lnet_event

Add a msg_type field to the lnet_event structure. This makes
it possible for an event handler to tell whether LNET_EVENT_SEND
corresponds to a GET or a PUT message.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: If9ecc42c26eb078c19697f399a17f80b2e225639
Reviewed-on: https://review.whamcloud.com/25785
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: reference counts on lnet_peer/lnet_peer_net 84/25784/23
Olaf Weber [Fri, 27 Jan 2017 15:25:30 +0000 (16:25 +0100)]
LU-9480 lnet: reference counts on lnet_peer/lnet_peer_net

Peer discovery will be keeping track of lnet_peer structures,
so there will be references to an lnet_peer independent of
the references implied by lnet_peer_ni structures. Manage
this by adding explicit reference counts to lnet_peer_net and
lnet_peer.

Each lnet_peer_net has a hold on the lnet_peer it links to
with its lpn_peer pointer. This hold is only removed when that
pointer is assigned a new value or the lnet_peer_net is freed.
Just removing an lnet_peer_net from the lp_peer_nets list does
not release this hold, it just prevents new lookups of the
lnet_peer_net via the lnet_peer.

Each lnet_peer_ni has a hold on the lnet_peer_net it links to
with its lpni_peer_net pointer. This hold is only removed when
that pointer is assigned a new value or the lnet_peer_ni is
freed. Just removing an lnet_peer_ni from the lpn_peer_nis
list does not release this hold, it just prevents new lookups
of the lnet_peer_ni via the lnet_peer_net.

This ensures that given a lnet_peer_ni *lpni, we can rely on
lpni->lpni_peer_net->lpn_peer pointing to a valid lnet_peer.

Keep a count of the total number of lnet_peer_ni attached to
an lnet_peer in lp_nnis.

Split the global ln_peers list into per-lnet_peer_table lists.
The CPT of the peer table in which the lnet_peer is linked is
stored in lp_cpt.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I465f9b732964834dad327fbe5177fba0cfb6775f
Reviewed-on: https://review.whamcloud.com/25784
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add LNET_PEER_CONFIGURED flag 83/25783/23
Olaf Weber [Fri, 27 Jan 2017 15:25:02 +0000 (16:25 +0100)]
LU-9480 lnet: add LNET_PEER_CONFIGURED flag

Add the LNET_PEER_CONFIGURED flag, which indicates that a peer
has been configured by DLC. This is used to enforce that only
DLC can modify such a peer.

This includes some further refactoring of the code that creates
or modifies peers to ensure that the flag is properly passed
through, set, and cleared.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I647116ec19bc2f577732a02bf8efb52dad48a391
Reviewed-on: https://review.whamcloud.com/25783
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: preferred NIs for non-Multi-Rail peers 82/25782/24
Olaf Weber [Fri, 27 Jan 2017 15:24:40 +0000 (16:24 +0100)]
LU-9480 lnet: preferred NIs for non-Multi-Rail peers

When a node sends a message to a peer NI, there may be
a preferred local NI that should be the source of the
message. This is in particular the case for non-Multi-
Rail (NMR) peers, as an NMR peer depends in some cases
on the source address of a message to correctly identify
its origin. (This as opposed to using a UUID provided by
a higher protocol layer.)

Implement this by keeping an array of preferred local
NIDs in the lnet_peer_ni structure. The case where only
a single NID needs to be stored is optimized so that this
can be done without needing to allocate any memory.

A flag in the lnet_peer_ni, LNET_PEER_NI_NON_MR_PREF,
indicates that the preferred NI was automatically added
for an NMR peer. Note that a peer which has not been
explicitly configured as Multi-Rail will be treated as
non-Multi-Rail until proven otherwise. These automatic
preferences will be cleared if the peer is changed to
Multi-Rail.

- lnet_peer_ni_set_non_mr_pref_nid()
  set NMR preferred NI for peer_ni
- lnet_peer_ni_clr_non_mr_pref_nid()
  clear NMR preferred NI for peer_ni
- lnet_peer_clr_non_mr_pref_nids()
  clear NMR preferred NIs for all peer_ni

- lnet_peer_add_pref_nid()
  add a preferred NID
- lnet_peer_del_pref_nid()
  delete a preferred NID

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: If98501b34e83f099652f3b19aab5bbbf158f8280
Reviewed-on: https://review.whamcloud.com/25782
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: introduce LNET_PEER_MULTI_RAIL flag bit 81/25781/23
Olaf Weber [Fri, 27 Jan 2017 15:24:21 +0000 (16:24 +0100)]
LU-9480 lnet: introduce LNET_PEER_MULTI_RAIL flag bit

Add lp_state as a flag word to lnet_peer, and add lp_lock
to protect it. This lock needs to be taken whenever the
field is updated, because setting or clearing a bit is
a read-modify-write cycle.

The lp_multi_rail is removed, its function is replaced by
the new LNET_PEER_MULTI_RAIL flag bit.

The helper lnet_peer_is_multi_rail() tests the bit.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I15034be7670bcb18460dc709accf675711a48113
Reviewed-on: https://review.whamcloud.com/25781
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: refactor lnet_add_peer_ni() 80/25780/23
Olaf Weber [Fri, 27 Jan 2017 15:24:04 +0000 (16:24 +0100)]
LU-9480 lnet: refactor lnet_add_peer_ni()

Refactor lnet_add_peer_ni() and the functions called by it. In
particular, lnet_peer_add_nid() adds an lnet_peer_ni to an
existing lnet_peer, lnet_peer_add() adds a new lnet_peer.

lnet_find_or_create_peer_locked() is removed.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Iffcbf9ffc26460afc544f102bd0e0a56e23a83f3
Reviewed-on: https://review.whamcloud.com/25780
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: refactor lnet_del_peer_ni() 79/25779/23
Olaf Weber [Fri, 27 Jan 2017 15:23:51 +0000 (16:23 +0100)]
LU-9480 lnet: refactor lnet_del_peer_ni()

Refactor lnet_del_peer_ni(). In particular break out the code
that removes an lnet_peer_ni from an lnet_peer and put it into
a separate function, lnet_peer_del_nid().

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Id5988b308afb093f83cc2e7029d3f2961171c906
Reviewed-on: https://review.whamcloud.com/25779
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: rename lnet_add/del_peer_ni_to/from_peer() 78/25778/23
Olaf Weber [Fri, 27 Jan 2017 15:23:35 +0000 (16:23 +0100)]
LU-9480 lnet: rename lnet_add/del_peer_ni_to/from_peer()

Rename lnet_add_peer_ni_to_peer() to lnet_add_peer_ni(), and
lnet_del_peer_ni_from_peer() to lnet_del_peer_ni().  This brings
the function names closer to the ioctls they implement:
IOCTL_LIBCFS_ADD_PEER_NI and IOCTL_LIBCFS_DEL_PEER_NI. These
names are also a more accturate description their effect: adding
or deleting an lnet_peer_ni to LNet.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I0eefb60cbdedb998a659002b48d4c8ddd3b11fb2
Reviewed-on: https://review.whamcloud.com/25778
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: cleanup of lnet_peer_ni_addref/decref_locked() 77/25777/23
Olaf Weber [Fri, 27 Jan 2017 15:23:20 +0000 (16:23 +0100)]
LU-9480 lnet: cleanup of lnet_peer_ni_addref/decref_locked()

Address style issues in lnet_peer_ni_addref_locked() and
lnet_peer_ni_decref_locked(). In the latter routine, replace
a sequence of atomic_dec()/atomic_read() with atomic_dec_and_test().

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I9b7030ac9850b035f8bd80487a7b69b66b1d5858
Reviewed-on: https://review.whamcloud.com/25777
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add sanity checks on ping-related constants 76/25776/23
Olaf Weber [Mon, 27 Mar 2017 10:22:55 +0000 (12:22 +0200)]
LU-9480 lnet: add sanity checks on ping-related constants

Add sanity checks for LNet ping related data structures and
constants to wirecheck.c, and update the generated code in
lnet_assert_wire_constants().

In order for the structures and macros to be visible to
wirecheck.c, which is a userspace program, they were moved
from kernel-only lnet/lib-types.h to lnet/types.h

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I2949d27445b29ec69cf8c17b7769291f270a5923
Reviewed-on: https://review.whamcloud.com/25776
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add Multi-Rail and Discovery ping feature bits 75/25775/23
Olaf Weber [Fri, 27 Jan 2017 15:22:40 +0000 (16:22 +0100)]
LU-9480 lnet: add Multi-Rail and Discovery ping feature bits

Claim ping features bit for Multi-Rail and Discovery.

Assert in lnet_ping_target_update() that no unknown bits will
be send over the wire.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Ie84b155f1ae45e3c228a4e49dc898160b81efb94
Reviewed-on: https://review.whamcloud.com/25775
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: automatic sizing of router pinger buffers 74/25774/23
Olaf Weber [Fri, 27 Jan 2017 15:16:34 +0000 (16:16 +0100)]
LU-9480 lnet: automatic sizing of router pinger buffers

The router pinger uses fixed-size buffers to receive the data
returned by a ping. When a router has more than 16 interfaces
(including loopback) this means the data for some interfaces
is dropped.

Detect this situation, and track the number of remote NIs in
the lnet_rc_data_t structure.  lnet_create_rc_data_locked()
becomes lnet_update_rc_data_locked(), and modified to replace
an existing ping buffer if one is present. It is now also
called by lnet_ping_router_locked() when the existing ping
buffer is too small.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I7286702b8606e25a5c82291ea4138479c4bf010f
Reviewed-on: https://review.whamcloud.com/25774
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: add struct lnet_ping_buffer 73/25773/21
Olaf Weber [Fri, 27 Jan 2017 15:16:16 +0000 (16:16 +0100)]
LU-9480 lnet: add struct lnet_ping_buffer

The Multi-Rail code will use the ping target buffer also as the
source of data to push to other nodes. This means that there
will be multiple MDs referencing the same buffer, and care must
be taken to ensure that the buffer is not freed while any such
reference remains.

Encapsulate the struct lnet_ping_info (aka lnet_ping_info_t) in
a struct lnet_ping_buffer. This adds a reference count, and the
number of NIDs for the encapsulated lnet_ping_info has been
sized.

For sizing the buffer the constant LNET_PINGINFO_SIZE is replaced
with LNET_PING_INFO_SIZE(NNIS).

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Iae255a7ebd6099c050bddbea84fb1923a586ac66
Reviewed-on: https://review.whamcloud.com/25773
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
2 years agoLU-9480 lnet: configure lnet_interfaces_max tunable from dlc 71/25771/18
Olaf Weber [Fri, 27 Jan 2017 15:15:24 +0000 (16:15 +0100)]
LU-9480 lnet: configure lnet_interfaces_max tunable from dlc

Added the ability to configure lnet_interfaces_max from DLC.
Combined the configure and show of numa range and max interfaces
under a "global" YAML element when configuring using YAML.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I6f8babdf7900f963cd86acf92468175a49bbaeee
Reviewed-on: https://review.whamcloud.com/25771

2 years agoLU-9480 lnet: add lnet_interfaces_max tunable 70/25770/16
Olaf Weber [Fri, 27 Jan 2017 15:15:07 +0000 (16:15 +0100)]
LU-9480 lnet: add lnet_interfaces_max tunable

Add an lnet_interfaces_max tunable value, that describes the maximum
number of interfaces per node. This tunable is primarily useful for
sanity checks prior to allocating memory.

Allow lnet_interfaces_max to be set and get from the sysfs interface.

Add LNET_INTERFACES_MIN, value 16, as the minimum value.

Add LNET_INTERFACES_MAX_DEFAULT, value 200, as the default value. This
value was chosen to ensure that the size of an LNet ping message with
any associated LND overhead would fit in 4096 bytes.

(The LNET_INTERFACES_MAX name was not reused to allow for the early
detection of issues when merging code that uses it.)

Rename LNET_NUM_INTERFACES to LNET_INTERFACES_NUM

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I9bdc72cc688a414f7658fed93f84c9885c8342be
Reviewed-on: https://review.whamcloud.com/25770

2 years agoNew tag 2.10.52 2.10.52 v2_10_52 v2_10_52_0
Oleg Drokin [Tue, 22 Aug 2017 02:34:09 +0000 (22:34 -0400)]
New tag 2.10.52

Change-Id: I673949d64dd0067f1f220426ce3389806a886b5b
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9888 tests: Do not run conf-sanity 32b with ZFS 02/28602/2
James Nunez [Fri, 18 Aug 2017 18:42:06 +0000 (12:42 -0600)]
LU-9888 tests: Do not run conf-sanity 32b with ZFS

With recent changes to this test to support ZFS 0.7.1,
conf-sanity test 32b consistently fails in automated testing
with a ZFS file system. Add conf-sanity test 32b to the
ALWAYS_EXCEPT list for ZFS testing while the fialure is
investigated.

Test-Parameters: trivial testgroup=review-zfs-part-2
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I1d5f7e5d02f0c318153eab0db01d8ae67ad93f13
Reviewed-on: https://review.whamcloud.com/28602
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-9887 tests: ignore error sanity-lfsck test 9a,b 88/28588/7
James Nunez [Thu, 17 Aug 2017 20:04:14 +0000 (14:04 -0600)]
LU-9887 tests: ignore error sanity-lfsck test 9a,b

sanity-lfsck tests 9a and 9b are failing consistently on
checking that speed limiting LFSCK takes less time than the
user defined maximum speed. We should ignore these errors
for now and print the layout or namespace to help understand
this issue.

Test-Parameters: trivial testgroup=review-zfs-part-1
Test-Parameters: testgroup=review-dne-part-2

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I64cac59edd456e6fd519961a4055130c8dbc8a4a
Reviewed-on: https://review.whamcloud.com/28588
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
2 years agoLU-9745 dkms: Fix included dkms.conf file 10/28210/4
Nathaniel Clark [Tue, 25 Jul 2017 21:34:30 +0000 (17:34 -0400)]
LU-9745 dkms: Fix included dkms.conf file

When lustre-dkms is installed with other dkms packages,
the PRE/POST scripts don't seem to function correctly.
This includes the correct dkms.conf by default without having
to recreate and reread it during build.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic6f25480db40d784dfcb3b650f7c869716b903ee
Reviewed-on: https://review.whamcloud.com/28210
Tested-by: Jenkins
Tested-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9850 patchless client should conflict patched kernel 57/28557/3
Brian J. Murrell [Wed, 9 Aug 2017 15:09:44 +0000 (11:09 -0400)]
LU-9850 patchless client should conflict patched kernel

Due to how dependencies work in RPM (and a bug in how kmod RPMs generate
their dependency lists), on a node where the server and client repos are
both configured, YUM could allow the patched kernel to satisfy the
patchless-client RPM's requirements.

Add Conflicts: and Provides: to the kernel RPM and lustre-client RPM to
prevent this from happening.

This change also allows one to force the installation of the patched
kernel RPM (yum install kernel-lustre) if one desires.

Test-Parameters: trivial

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: If9c44a93937cd7603b0246676ebc9c8260a43b11
Reviewed-on: https://review.whamcloud.com/28557
Tested-by: Jenkins
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9826 test: Recreate disk2_7-zfs image to have a bigger file system 64/28464/5
Wei Liu [Thu, 10 Aug 2017 16:56:47 +0000 (09:56 -0700)]
LU-9826 test: Recreate disk2_7-zfs image to have a bigger file system

Increase 2.7 zfs file system size and move conf_sanity
test_32b out of the ALWAYS_EXCEPT list

Test-Parameters: ostfilesystemtype=zfs mdtfilesystemtype=zfs \
testlist=conf-sanity

Change-Id: I61e40bc495b06fcc73d4d6d5707433686984bcc7
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: https://review.whamcloud.com/28464
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6210 utils: Use C99 struct initializers in lsnapshot 17/28417/3
Steve Guminski [Mon, 7 Aug 2017 19:50:39 +0000 (15:50 -0400)]
LU-6210 utils: Use C99 struct initializers in lsnapshot

This patch makes no functional changes.  The long_options struct
initializers in lsnapshot are updated to C99 syntax.  The long
options are renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ieccc018218597ade289378fc8666988bf969d924
Reviewed-on: https://review.whamcloud.com/28417
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9832 tests: Use sys/sysmacros.h for major/minor/makedev 60/28360/2
Oleg Drokin [Fri, 4 Aug 2017 18:18:16 +0000 (14:18 -0400)]
LU-9832 tests: Use sys/sysmacros.h for major/minor/makedev

This is apparently the standard for GNU libc and they
started to warn about it now.

Change-Id: I5fe5c7b3cd08b724d77f752987ce1e753cb48d4b
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28360
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-9816 kernel: kernel upgrade RHEL7.4 [3.10.0-693.el7] 01/28301/6
Bob Glossman [Tue, 1 Aug 2017 14:32:02 +0000 (07:32 -0700)]
LU-9816 kernel: kernel upgrade RHEL7.4 [3.10.0-693.el7]

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ib0bcb3547fcf220e1b4665229930c6ff28c6906c
Reviewed-on: https://review.whamcloud.com/28301
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8999 quota: fix quota iteration interface 45/28345/4
Jinshan Xiong [Fri, 4 Aug 2017 01:42:39 +0000 (18:42 -0700)]
LU-8999 quota: fix quota iteration interface

Since zfs 0.7.0, object accounting is maintained by DMU, so that quota
iteration interface should retrieve the information over there.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I3d0744dfb52b1a9088b828bc72d648872ec4d00b
Reviewed-on: https://review.whamcloud.com/28345
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9829 lnet: Properly dereference string pointer 58/28358/2
Oleg Drokin [Fri, 4 Aug 2017 15:34:47 +0000 (11:34 -0400)]
LU-9829 lnet: Properly dereference string pointer

A bug highlighted by newer gcc. We really need to be doing
double dereference of the next pointer looking for end of string,
since the pointer is double indirect.

Change-Id: Id80522f43606a843383787d71eec1ddf00af5269
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/28358
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-9295 test: skip sanity-lfsck 9 less than 2.8 03/26403/5
James Nunez [Thu, 25 May 2017 22:46:39 +0000 (16:46 -0600)]
LU-9295 test: skip sanity-lfsck 9 less than 2.8

sanity-lfsck tests 9a and 9b check the version of the MDS
to see if the test should be run. Unfortunately, the
server_version variable is never initialized and the tests
are skipped.

For sanity-lfsck tests 9a and 9b, get the server version
using the lustre_version_code routine.

Test-Parameters: trivial testlist=sanity-lfsck
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I6c461a6940a0cbd0439c8f29d979ef799ea30229
Reviewed-on: https://review.whamcloud.com/26403
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8619 lbuild: update ZFS to use 0.7.1 69/22569/21
Andreas Dilger [Wed, 9 Aug 2017 04:55:46 +0000 (12:55 +0800)]
LU-8619 lbuild: update ZFS to use 0.7.1

Update lbuild to build against ZFS 0.7.1

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

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I04082cd6cd43c98477100f9fc308666e1b981c0a
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: https://review.whamcloud.com/22569
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9799 mount: Call read_ldd with initialized mount type 56/28456/2
Nathaniel Clark [Thu, 10 Aug 2017 14:20:04 +0000 (10:20 -0400)]
LU-9799 mount: Call read_ldd with initialized mount type

When re-reading the ldd when doing relabel, ensure the correct mount
type is used for the read. Otherwise ldiskfs complains:

   mount.lustre FATAL: unhandled/unloaded fs type 0 'ext3'

and ZFS complains:

   e2label: No such file or directory while trying to open MGS/MGT
   Couldn't find valid filesystem superblock.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ife53cff948d545c306e99e4b023989245a1ac3f7
Reviewed-on: https://review.whamcloud.com/28456
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9499 lfsck: set target bitmap properly 32/27632/2
Fan Yong [Wed, 14 Jun 2017 07:48:56 +0000 (15:48 +0800)]
LU-9499 lfsck: set target bitmap properly

If the notify from the peer server has LF_INCOMPLETE flags,
then record it in the target bitmap unconditionally to avoid
missing to update the bitmap for some corner cases.

This patch also addes more debug information when the LFSCK
updates the bitmap and handle double_scan_result.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3a6195136d608aa47e59e61f95c92978503e3a4b
Reviewed-on: https://review.whamcloud.com/27632
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9494 test: Improve message for skipping tests 50/27350/7
Ruth A Klundt [Fri, 7 Jul 2017 15:17:26 +0000 (09:17 -0600)]
LU-9494 test: Improve message for skipping tests

Modify skip messages for consistency and clarity.

Signed-off-by: Ruth Klundt <rklundt@sandia.gov>
Change-Id: I44ced56e67aa63ed84da6a15c88282bc3ff19332
Test-Parameters: trivial testlist=sanity
Reviewed-on: https://review.whamcloud.com/27350
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8066 obd: fix LPROC_SEQ_FOPS macros for debugfs 50/26650/5
James Simmons [Fri, 4 Aug 2017 21:12:24 +0000 (17:12 -0400)]
LU-8066 obd: fix LPROC_SEQ_FOPS macros for debugfs

While porting to debugfs I discovered a bug in that
for the debugfs case no data was being passed into
single_open(). This would cause a crash when reading
debugfs files since the seq_file private field was
NULL. Second change is the rename of the *WO_TYPE*
macro to LPROC_SEQ_FOPS_WR_ONLY to match upstream.

Change-Id: I9b6baebecaeb82795d7055148533862489473a1d
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/26650
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6401 uapi: migrate remaining uapi headers to uapi directory 46/25246/12
James Simmons [Mon, 7 Aug 2017 02:56:26 +0000 (22:56 -0400)]
LU-6401 uapi: migrate remaining uapi headers to uapi directory

Move all the remaining lustre headers shared between user land
and kernel space to the uapi directory. OBD_MAX_IOCTL_BUFFER
can be removed since the utilites don't even acknowledge it
value.

Change-Id: I6dcdf3f824dae6bc8a0786f0e61787ca68c10bd8
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/25246
Tested-by: Jenkins
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9235 libcfs: don't dump stack if just touched 62/23162/10
Hongchao Zhang [Wed, 10 May 2017 03:45:19 +0000 (11:45 +0800)]
LU-9235 libcfs: don't dump stack if just touched

If some lc_watchdog was touched before lcw_dump_stack dumped
the stack of the thread, it should not dump it anymore for
the thread is verified to be active and no need to dump.

Change-Id: I8e4acc1793bb8458ee3b6dc73f2953670ed22896
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/23162
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@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>
2 years agoLU-8618 tests: ha.sh improvements 28/22528/6
Elena Gryaznova [Mon, 29 May 2017 18:50:57 +0000 (21:50 +0300)]
LU-8618 tests: ha.sh improvements

Patch adds the following ha.sh changes:
- Customise SIMUL and IOR paths.
- Add -p max failover period parameter.
- Add -r dry run parameter.
- Add "iozone" load.
- Add the possibilities to set the number of mpi threads per client.
- CRM is not always configured to fail target back when
  the primary node is back. Add the possibility to execute
  failback command if required.
- The logs from all clients are required if non mpi load fails on
  one client only. Dump logs from all clients.
- Add the possibilities to:
  run ha.sh with custom ior, simul parameters;
  start only the defined list of applications;
  start MPI loads instances on defined number of clients.

Test-Parameters: trivial
Seagate-bug-id: MRP-2150, MRP-2896, MRP-3431, MRP-3252, MRP-3495
Signed-off-by: Elena Gryaznova <elena.gryaznova@seagate.com>
Reviewed-by: Vladimir Saveliev <vladimir.saveliev@seagate.com>
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Reviewed-by: Alexander Lezhoev <alexander.lezhoev@seagate.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Change-Id: I252aa0945286b30ffa6bad40aebf0c2cbc0c7261
Reviewed-on: https://review.whamcloud.com/22528
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8578 ldlm: ELC shouldn't wait on lock flush 86/22286/6
Andriy Skulysh [Fri, 2 Sep 2016 09:28:24 +0000 (12:28 +0300)]
LU-8578 ldlm: ELC shouldn't wait on lock flush

commit ad87adbff5148a74ac616dbc9bfa02a4e3814034
LU-5727 ldlm: revert the changes for lock canceling policy

but it removes the fix for LU-4300 when lru_resize is disabled.

Introduce ldlm_cancel_aged_no_wait_policy to be used by ELC.

Change-Id: Ic74a6bce4a261dc96c8c0f6d8f7e20315def8c0e
Seagate-bug-id: MRP-3662
Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Reviewed-on: https://review.whamcloud.com/22286
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6245 tests: remove it_test 06/28406/3
James Simmons [Thu, 10 Aug 2017 23:30:36 +0000 (19:30 -0400)]
LU-6245 tests: remove it_test

The test application it_test pulls in lustre kernel code which is
the wrong approach and this will not work in the future when the
lustre utilites will be build against the upstream kernel lustre
code. Looking at where it_test is actually run I discovered it is
never used. Since this is the case we can delete it.

Test-Parameters: trivial

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I8fdcf279590b0edf1c8da6d9f4618964162ec762
Reviewed-on: https://review.whamcloud.com/28406
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9725 quota: always deregister lwp 56/28356/3
Lai Siyao [Mon, 7 Aug 2017 20:25:41 +0000 (16:25 -0400)]
LU-9725 quota: always deregister lwp

qsd should always deregiter lwp upon finish no matter qsd_exp was
set before, otherwise the item will stay on the list, but qsd has
been freed.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I0d6206f2f2bc8177d0aa35b350f534d85eab1c03
Reviewed-on: https://review.whamcloud.com/28356
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9376 tests: remove sanity.sh test_103b 09/27109/3
Emoly Liu [Sat, 5 Aug 2017 19:04:51 +0000 (15:04 -0400)]
LU-9376 tests: remove sanity.sh test_103b

Remove mount option "noacl" related things from sanity.sh test_103b
and mount.lustre.8.

Test-Parameters: trivial

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I3da4500cc177894b10854c2ccd9ed884fec74789
Reviewed-on: https://review.whamcloud.com/27109
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9826 tests: Do not run conf-sanity 32b with ZFS 08/28408/3
James Nunez [Mon, 7 Aug 2017 17:29:50 +0000 (11:29 -0600)]
LU-9826 tests: Do not run conf-sanity 32b with ZFS

With ZFS 0.7.0, conf-sanity test 32b consistently fails
in automated testing. Since the issue may be the VM test
environment, add conf-sanity test 32b to the
ALWAYS_EXCEPT list for ZFS testing.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ib8582b85760057045bc7cce66d470e81e0e43dde
Reviewed-on: https://review.whamcloud.com/28408
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9054 tests: disable test_312 due to zdb issue 43/28343/3
Jinshan Xiong [Thu, 3 Aug 2017 22:13:56 +0000 (15:13 -0700)]
LU-9054 tests: disable test_312 due to zdb issue

zdb used to work for datasets of exported pool by '-e -p' options,
this has been changed in zfs-0.7.0.

This patch temporarily disables test_312 until zfs upstream ticket
https://github.com/zfsonlinux/zfs/issues/6464 is solved.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib0c9eeed4964ea4a0abfed70760cb8fbaeb44496
Reviewed-on: https://review.whamcloud.com/28343
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9558 kernel: replace CURRENT_TIME macro 05/28305/2
Deepa Dinamani [Tue, 1 Aug 2017 18:53:08 +0000 (14:53 -0400)]
LU-9558 kernel: replace CURRENT_TIME macro

CURRENT_TIME macro is not y2038 safe on 32 bit systems.

The patch replaces all the uses of CURRENT_TIME by current_time() for
filesystem times, and ktime_get_* functions for others.

struct timespec is also not y2038 safe.  Retain timespec for timestamp
representation here as lustre uses it internally everywhere.  These
references will be changed to use struct timespec64 in a separate patch.

This is also in preparation for the patch that transitions vfs
timestamps to use 64 bit time and hence make them y2038 safe.
current_time() is also planned to be transitioned to y2038 safe behavior
along with this change.

CURRENT_TIME macro will be deleted before merging the aforementioned
change.

Linux-commit: 47f38c539e9a42344ff5a664942075bd4df93876

Change-Id: Iec67df8f48066801c227aba2bc9221d444dada65
Link: http://lkml.kernel.org/r/1491613030-11599-10-git-send-email-deepa.kernel@gmail.com
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-on: https://review.whamcloud.com/28305
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9364 test: wait rmultiop_start to start 29/26729/6
Hongchao Zhang [Thu, 13 Apr 2017 07:48:32 +0000 (15:48 +0800)]
LU-9364 test: wait rmultiop_start to start

In rmultiop_start, the remote command could be delayed a while,
and wait some time for the command to run.

Test-Parameters: trivial testlist=replay-vbr

Change-Id: Ic8beec725edc89a527c74e2033e59e1da0d444c9
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/26729
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9012 contrib: to rename file ending with :rhel5.ed 42/24842/5
dilip krishnagiri [Mon, 7 Aug 2017 15:37:56 +0000 (09:37 -0600)]
LU-9012 contrib: to rename file ending with :rhel5.ed

Git clone of lustre-release master fails on windows
because of file contrib/patches/ofed/
01-dont-include-openib-initscript:rhel5.ed
On Windows ':' is not support in file name.
This file can be renamed as contrib/patches/ofed/
01-dont-include-openib-initscript-rhel5.ed
i.e. replace ':' with '-'.

submitting this as commented by Andreas for rhel5.ed file

Test-Parameters: trivial

Signed-off-by: dilip krishnagiri <dilipx.krishnagiri@intel.com>
Change-Id: I8170b01e79b5ea30c258b0b605c8b2f95917d60d
Reviewed-on: https://review.whamcloud.com/24842
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7899 osd: batch EA updates 93/21893/16
Alex Zhuravlev [Tue, 28 Feb 2017 09:44:14 +0000 (12:44 +0300)]
LU-7899 osd: batch EA updates

during file creation we set number of EAs: LMA, VBR, LinkEA, LOVEA, ACLs.
calling into SA to refill spill again and again is expensive. thus it
makes sense to postpone this to osd_trans_stop() where all changed EAs
has been already collected in a temporary buffer.

Change-Id: Ia2604ddafdf8b2ca4f6db4d70ead6d2d2761cd26
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/19143
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/21893

2 years agoLU-9748 lod: safely access update log stat 00/28000/3
Lai Siyao [Wed, 12 Jul 2017 13:26:56 +0000 (21:26 +0800)]
LU-9748 lod: safely access update log stat

'lod_child_got_update_log' and 'ltd_got_update_log' are not accessed
with lock, so there is race to check all got update log, use lod_lock
to serialize setting and checking these flags, as a side effect,
this lock can act as barrier before wakeup.

Add some debug messages, which can help understand long DNE recovery.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Icf65837fe24dbfef35963dcc8502888271334ba5
Reviewed-on: https://review.whamcloud.com/28000
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9266 hsm: don't add request when cdt is stopped 15/26215/5
Sergey Cheremencev [Mon, 20 Mar 2017 14:20:40 +0000 (22:20 +0800)]
LU-9266 hsm: don't add request when cdt is stopped

Check cdt_state after getting layout lock in mdt_hsm_add_actions.
Fix protects against several RESTORE records addressed to the
same object in llog. Such records causes mount to hung when
starting hsm:
D: 15524  TASK: ffff880068b5b540  CPU: 4   COMMAND: "lctl"
 #0 [ffff8800bacd9728] schedule at ffffffff81525d30
 #1 [ffff8800bacd97f0] ldlm_completion_ast at ffffffffa08527f5 [ptlrpc]
 #2 [ffff8800bacd9890] ldlm_cli_enqueue_local at ffffffffa0851b8e
[ptlrpc]
 #3 [ffff8800bacd9910] mdt_object_lock0 at ffffffffa0e4ec4c [mdt]
 #4 [ffff8800bacd99c0] mdt_object_lock at ffffffffa0e4f694 [mdt]
 #5 [ffff8800bacd99d0] mdt_object_find_lock at ffffffffa0e4f9c1 [mdt]
 #6 [ffff8800bacd9a00] hsm_restore_cb at ffffffffa0e9b533 [mdt]
 #7 [ffff8800bacd9a50] llog_process_thread at ffffffffa05fd699
[obdclass]
 #8 [ffff8800bacd9b10] llog_process_or_fork at ffffffffa05fdbaf
[obdclass]
 #9 [ffff8800bacd9b60] llog_cat_process_cb at ffffffffa0601250
[obdclass]

Change-Id: Ib09139795d847cac2e5f079a192a3548d32db09c
Seagate-bug-id: MRP-4251
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/26215
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9817 lnet: safe access to msg 08/28308/2
Amir Shehata [Tue, 1 Aug 2017 21:24:57 +0000 (14:24 -0700)]
LU-9817 lnet: safe access to msg

When tx credits are returned if there are pending messages they
need to be sent. Messages could have different tx_cpts, so the
correct one needs to be locked. After lnet_post_send_locked(),
if we locked a different CPT then we need to relock the correct one
However, as part of lnet_post_send_locked(), lnet_finalze() can
be called which can free the message. Therefore, the cpt of the
message being passed must be cached in order to prevent access to
freed memory.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I959fdc30daf87b5575d8371da20d5cf6f64e7d3c
Reviewed-on: https://review.whamcloud.com/28308
Tested-by: Jenkins
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9731 Limit work-around to EL7 only 02/28202/3
Brian J. Murrell [Tue, 25 Jul 2017 12:02:24 +0000 (08:02 -0400)]
LU-9731 Limit work-around to EL7 only

Since the workaround previously landed for LU-9731 only applies to
EL7, only apply it for EL7 builds.

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Id74f03f3af74f324320e094e32f7b7480259145c
Reviewed-on: https://review.whamcloud.com/28202
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9597 ofd: fix race for project setattr 74/28274/7
Wang Shilong [Sat, 29 Jul 2017 13:54:30 +0000 (21:54 +0800)]
LU-9597 ofd: fix race for project setattr

sanity-quota 33 exposed an intresting project quota bug,
problem is we could hit following condition:

step 1: create an empty file
step 2: buffer write data to file, at this time project id 0 is packed.
step 3: chattr file's project id

If write RPC is generated on client but not reaching OST yet, and step 3
chattr is issued in this time window and chattr on OST is done before
write PRC being processed on OST:

That means we have changed file's project ID, but ofd_attr_handle_id()
did not clear S_ISUID and S_ISGID for this case. Write RPC arrived on
OST, first write RPC will call ofd_attr_handle_id() to set attribute.
Unfortunately it will think this is first write as S_ISUID and S_ISGID
is set, project id will be reset with packed id 0, thus we got wrong
project accounting.

We should use another file mode to indicate whether
project id has been initialized, this patch tries to
fix this problem.

Change-Id: Ie2f9ce5b662c3011aa1cd2f59e1fb20526a3e3d7
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/28274
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8066 libcfs: migrate to debugfs 88/24688/28
Dmitry Eremin [Fri, 28 Jul 2017 20:51:52 +0000 (16:51 -0400)]
LU-8066 libcfs: migrate to debugfs

move /proc/sys/lnet to debugfs

Parameters in lnet sysctl are of debug quality, so let's move them
to debugfs instead.

Linux-commit: 0871d551af37c72c308397c16c31bae945e6a79d

Remove redundant lnet debugfs variables

/proc/sys/lnet/console_ratelimit, debug_path and panic_on_lbug
are module parameters with no special magic accessible via
/sys/module/libcfs/parameters/libcfs_console_ratelimit,
/sys/module/libcfs/parameters/libcfs_debug_file_path and
/sys/module/libcfs/parameters/libcfs_panic_on_lbug respectively.

As such just replace them with corresponding symlinks

Linux-commit: 1b4d97b6c6ca05446ff33843a7b174cdd765df5a

get rid of debugfs/lnet/console_backoff

module parameter libcfs_console_backoff accessible through
/sys/module/libcfs/parameters/libcfs_console_backoff would
do the same thing, just add a special "uintpos" parameter
type to disallow 0 values too.

Also add a symlink to the module parameter variable for
backwards compatibility

Linux-commit: 8710427dd68f4dff8976d221e220317cea20ecec

get rid of debugfs/lnet/debug_mb

It's just a fancy libcfs_debug_mb module parameter wrapper,
so just add debug buffer size check and resizing and the same
functionality now would be accessible via
/sys/module/libcfs/parameters/libcfs_debug_mb

Also add a symlink for backwards compatibility.

Linux-commit: 8dc08446d0671709bdec9e037845b014e33663b1

get rid of debugfs/lnet/console_{min, max}_delay_centisecs

They are just fancy module parameters wrappers,
so just the same functionality now would be accessible via
/sys/module/libcfs/parameters/libcfs_console_{min,max}_delay

Also install compatibility symlinks

Linux-commit: 35ca907d245e8c218f39b6ed8bd6a1c656d056cc

Fix kstrtouint return value check fix

Apparently kstrtouint could return not just -EINVAL, but also -ERANGE,
so make sure we just check the return value for something negative.

Noticed by Dan Carpenter <dan.carpenter@oracle.com>

Linux-commit: aa66d6f87f300b15ac2efdcde9e198bf5a9020ce

Properly handle debugfs read- and write-only files

It turns out that unlike procfs, debugfs does not really enforce
permissions for root (similar to regular filesystems), so we need
to ensure we are not providing ->write() method to read-only files
and ->read() method for write-only files at registration.

This fixes a couple of crashes on unexpected access.

Linux-commit:49a76d7040b466dd92f198ded4aba3cd3569d48f

Change-Id: I69ff4d9766969f2ca5d5478d4e822879ee78b467
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
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/24688
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
2 years agoLU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory 89/28089/7
James Simmons [Sat, 5 Aug 2017 00:43:14 +0000 (20:43 -0400)]
LU-6245 uapi: move libcfs/lnet UAPI header into own uapi directory

Move all the libcfs/lnet headers shared between user land and
kernel space to the new lnet uapi directory.

Test-Parameters: trivial

Change-Id: Id6142b0e890fd47d3318dc3c98e64f72b5df2594
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28089
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9712 kernel: correct malformed ChangeLog 73/28273/2
Bob Glossman [Sat, 29 Jul 2017 02:18:43 +0000 (19:18 -0700)]
LU-9712 kernel: correct malformed ChangeLog

Somewhwre in the recent set of landings for kernel updates
the wrong lines in ChangeLog were updated.
This mod corrects that.

Test-Parameters: trivial

Change-Id: I95a66eb4108aebdb6883f445cfa183988554ad74
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-on: https://review.whamcloud.com/28273
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9744 mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog 62/27962/2
Bruno Faccini [Fri, 7 Jul 2017 14:42:07 +0000 (16:42 +0200)]
LU-9744 mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog

In hsm_cdt_request_completed() and upon error being returned
from mdt_hsm_get_md_hsm(), where "struct md_hsm mh" has not been
populated, HS_DIRTY can be wrongly detected and thus CLF_HSM_DIRTY
flag will be reported by error
This can be the cause of errors in associated sanity-hsm sub-tests
test_220a, test_222c, test_222d, tests_224a, when analyzing
ChangeLog flags.
!IS_ERR(obj) should also be tested before adding CLF_HSM_DIRTY
in cl_flags.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I4469a55b35ea5d35a9f0be152f085bd676f74240
Reviewed-on: https://review.whamcloud.com/27962
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_del_range() 83/27883/2
Steve Guminski [Mon, 22 May 2017 12:46:52 +0000 (08:46 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_del_range()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_del_range() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I442d2cb65c1ffefc2229ead83e04b7ec2d8160e5
Reviewed-on: https://review.whamcloud.com/27883
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_test_id() 81/27881/2
Steve Guminski [Mon, 26 Jun 2017 18:09:14 +0000 (14:09 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_test_id()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_test_id() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Iddbee594f8ccd9cada11c6c792e31656c16f7170
Reviewed-on: https://review.whamcloud.com/27881
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-8958 llite: remove llite_loop left overs 95/26795/11
James Simmons [Mon, 31 Jul 2017 18:24:19 +0000 (14:24 -0400)]
LU-8958 llite: remove llite_loop left overs

With the removal of llite_loop several pieces of code are still
present in the llite layer that were only used by the lloop device.
We can remove these no longer used pieces.

Change-Id: I67f2761ae29b8ba7bb3bc9bcc3e3f8ece73a3ea3
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/26795
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9758 build: allow disabling lustre test and iokit rpm creation 85/27985/6
James Simmons [Mon, 31 Jul 2017 17:25:03 +0000 (13:25 -0400)]
LU-9758 build: allow disabling lustre test and iokit rpm creation

While attempting to create a basic set of rpms that didn't
include the lustre test and iokit rpm I encountered build
breakage. Test the lustre_test conditional in the spec file
so we don't attempt to build special lustre test rpms. The
lustre test rpm is actually dependant on the lustre iokit
rpm so if --disable-iokit is set we should disable lustre
test rpms generation as well.

Test-Parameters: trivial

Change-Id: I0adeb0eded1a3b99481fc4b7ad3cda2afd32b6d2
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27985
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6142 socklnd: remove typedefs from ksocklnd 75/28275/3
James Simmons [Mon, 31 Jul 2017 21:14:48 +0000 (17:14 -0400)]
LU-6142 socklnd: remove typedefs from ksocklnd

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

Test-Parameters: trivial

Change-Id: I78d69aea46721f4e97a1775c64ae0d59879aa4fd
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/28275
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9019 mgs: migrate to 64 bit time 10/27910/11
James Simmons [Tue, 1 Aug 2017 06:25:58 +0000 (02:25 -0400)]
LU-9019 mgs: migrate to 64 bit time

Port the remaining time code from 32 bits to 64 bits.
Replace cfs_time_current_sec() to avoid the overflow
issues in 2038 with ktime_get_real_seconds(). Moved
lprocfs_ir_timeout_seq_show from printing 32 times
to 64 bit times. Do a direction compare instead of
using the  cfs_time_before() wrapper. Change the
following to time64_t:

fsdb_barrier_expected
fsdb_barrier_latest_create_time
mgs_start_time
ir_timeout

Change-Id: I10bfd3f1479ad2823e325bfc464b802b210c238f
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27910
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
2 years agoLU-7356 build: handle configure options for mount plugin 81/17581/16
James Simmons [Tue, 1 Aug 2017 05:37:40 +0000 (01:37 -0400)]
LU-7356 build: handle configure options for mount plugin

Currently if you build lustre with configure options
--disable-shared and/or --disable-static it will fail
to build in the case of the mount plugins. The mount
plugins are always built to be sharable code using
libtool but this is not compatiable with the confiure
--disable-share option. The solution was to create a
temporary static library and for the static case we
directly link into the lustre utilites. If shared
libraries are enabled then that temporary library
is turned into a dynamic plugin. The lustre utilites
was updated to handle both cases.

Test-Parameters: trivial

Change-Id: I0eec25c8bce71c0e5c533ff3dfbe752677f37a26
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: https://review.whamcloud.com/17581
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8275 tests: add flag to enable secret shared key for tests 80/20780/97
Chris Hanna [Wed, 19 Jul 2017 14:25:10 +0000 (10:25 -0400)]
LU-8275 tests: add flag to enable secret shared key for tests

When the SHARED_KEY environment variable is set to true,
test-framework will set up a shared key between the nodes and start
Lustre with shared key enabled. Three tests (28,29,30) are also
added to sanity-sec in order to test shared key features.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Signed-off-by: Chris Hanna <hannac@iu.edu>
Change-Id: I2abff35fbb7dd4f227c6cd12a66cb0b77f610157
Reviewed-on: https://review.whamcloud.com/20780
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoNew tag 2.10.51 2.10.51 v2_10_51 v2_10_51_0
Oleg Drokin [Thu, 3 Aug 2017 23:57:30 +0000 (19:57 -0400)]
New tag 2.10.51

Change-Id: I87e70d18c01fe26e283014193463286f0d725cd1
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7544 doc: improve setquota man page 63/28163/4
Niu Yawei [Fri, 21 Jul 2017 03:01:50 +0000 (23:01 -0400)]
LU-7544 doc: improve setquota man page

Move 'lfs setquota' to a separate man page and change the man page to
use "K, M, G, T, P" suffixes for block limits.

Test-Parameters: trivial
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I8de81ebfed86151dbb1ac16690f3b4e377f95366
Reviewed-on: https://review.whamcloud.com/28163
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
2 years agoLU-9778 llite: Read ahead should return pages read 52/28052/3
Patrick Farrell [Fri, 14 Jul 2017 14:07:52 +0000 (09:07 -0500)]
LU-9778 llite: Read ahead should return pages read

ll_read_ahead_pages was modified by:
LU-7990 clio: revise readahead to support 16MB IO
d8467ab8a2ca15fbbd5be3429c9cf9ceb0fa78b8

And returning the count of pages read was removed.

This only affects debug, but it's very nice to have it
printed out, and several messages still try to print out
pages read ahead, but print 0.

Restore this functionality.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I80fe66b5195629e0c46d5d19c76e3bcc0030a22a
Reviewed-on: https://review.whamcloud.com/28052
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
2 years agoLU-9733 obd: fix fsname parsing 16/27916/5
Wang Shilong [Mon, 3 Jul 2017 11:55:30 +0000 (19:55 +0800)]
LU-9733 obd: fix fsname parsing

Lustre support Lustre fsname started with numbers.
So here we should try fsname firstly, if it failed,
fall back to number parsing.

Change-Id: Idd98b9fdc8375729faa61f51251caa101035dd93
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/27916
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6210 utils: Use C99 struct initializer in mount_utils_zfs.c 25/27825/2
Steve Guminski [Mon, 26 Jun 2017 17:53:13 +0000 (13:53 -0400)]
LU-6210 utils: Use C99 struct initializer in mount_utils_zfs.c

This patch makes no functional changes.  The ZLB_INIT macro is
updated to C99 syntax.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ieaf53059782254935a13f0efd3f72785dacc0b8b
Reviewed-on: https://review.whamcloud.com/27825
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
2 years agoLU-9710 utils: adjust barrier_stat input/output 10/27810/5
Fan Yong [Wed, 19 Jul 2017 05:58:06 +0000 (13:58 +0800)]
LU-9710 utils: adjust barrier_stat input/output

The command format will be:
lctl barrier_stat [--state|-s] [--timeout|-t] <fsname>

If no option is specified, or both "state" and "timeout"
options are specified, then the output format will be:
state: xxx
timeout: nnn seconds

Otherwise, only the value ('xxx' or 'nnn') corresponding
to the given option will be printed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If39f95ef984be3ab709b1366fdefe8eedb4b2453
Reviewed-on: https://review.whamcloud.com/27810
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>
2 years agoLU-9558 llite: user enhanced getattr functionality in newer kernels 15/27715/3
James Simmons [Wed, 21 Jun 2017 21:37:04 +0000 (17:37 -0400)]
LU-9558 llite: user enhanced getattr functionality in newer kernels

Starting with the linux kernel 4.11 a new system call was added
to enhance the file info available. This new functionality has
changed the getattr functions in the linux kernel. This patch
only provides the most basic support for now.

Linux-commit: a528d35e8bfcc521d7cb70aaf03e1bd296c8493f

Change-Id: Iee1b02bb94dab05a3197866af9eedd6f35cac7c5
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27715
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: Bob Glossman <bob.glossman@intel.com>
2 years agoLU-9558 llite: handle struct vm_operations changes 51/27651/8
James Simmons [Thu, 27 Jul 2017 18:09:17 +0000 (14:09 -0400)]
LU-9558 llite: handle struct vm_operations changes

For the linux 4.11 kernel passing in struct vm_area_struct
to struct vm_operations members has been removed since
struct vm_area_struct has been merged into struct vm_fault.
Handle these changes in the llite layer.

Linux-commit: 11bac80004499ea59f361ef2a5516c84b6eab675

Test-Parameters: trivial

Change-Id: Ie44dd50de487044e3e2205978b7a36b15f7b0983
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/27651
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9203 lnet: fix lnet_cpt_of_md() 65/28165/7
Amir Shehata [Fri, 21 Jul 2017 04:17:50 +0000 (21:17 -0700)]
LU-9203 lnet: fix lnet_cpt_of_md()

The intent of this function is to get the cpt nearest to the
memory described by the MD.

There are three scenarios that must be handled:
1. The memory is described by an lnet_kiov_t structure
 -> this describes kernel pages
2. The memory is described by a struct kvec
 -> this describes kernel logical addresses
3. The memory is a contiguous buffer allocated via vmalloc

For case 1 and 2 we look at the first vector which contains
the data to be DMAed, taking into consideration the msg offset.

For case 2 we have to take the extra step of translating the kernel
logical address to a physical page using virt_to_page() macro.

For case 3 we need to use is_vmalloc_addr() and vmalloc_to_page to
get the associated page to be able to identify the CPT.

o2iblnd uses the same strategy when it's mapping the memory into
a scatter/gather list. Therefore, lnet_kvaddr_to_page() common
function was created to be used by both the o2iblnd and
lnet_cpt_of_md()

kmap_to_page() performs the high memory check which
lnet_kvaddr_to_page() does. However, unlike the latter it handles
the highmem case properly instead of calling LBUG. It's not
100% clear why the code was written that way. Since the legacy
code will need to still be maintained, adding kmap_to_page() will
not simplify the code. Furthermore, the behavior for kernels
which export kmap_to_page() will be different from kernels which
do not. At worst calling kmap_to_page() might mask some problems
which would've been caught by the LBUG earlier on. However, at
the time of this fix, that LBUG has never been observed.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I2c67e5df77d60112bf27f900e0325d189f193aed
Reviewed-on: https://review.whamcloud.com/28165
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Sonia Sharma <sonia.sharma@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-4536 tests: Re-enable sanity/65ic 03/27803/3
Nathaniel Clark [Wed, 19 Jul 2017 05:34:22 +0000 (01:34 -0400)]
LU-4536 tests: Re-enable sanity/65ic

Because of work done for LU-9019 to bring timing to be universally
64bit, re-enable this test.

Test-Parameters: trivial
Test-Parameters: testlist=sanity mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=2 ostcount=2 mdscount=1 mdtcount=1 clientcount=2
Test-Parameters: testlist=sanity mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=2 ostcount=2 mdscount=1 mdtcount=1 clientcount=2
Test-Parameters: testlist=sanity mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=2 ostcount=2 mdscount=1 mdtcount=1 clientcount=2
Test-Parameters: testlist=sanity mdtfilesystemtype=zfs ostfilesystemtype=zfs osscount=2 ostcount=2 mdscount=1 mdtcount=1 clientcount=2

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ifae4b2f6d3ad1e8c02eab8b1ca97f9924c0bf360
Reviewed-on: https://review.whamcloud.com/27803
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7991 osd-zfs: remove obsolete quota code 61/27661/6
Fan Yong [Tue, 25 Jul 2017 06:09:21 +0000 (14:09 +0800)]
LU-7991 osd-zfs: remove obsolete quota code

Directly use ZFS backend quota accounting objects,
no need be mapped from Lustre own account objects.
Related obsolete logic is removed totally.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2c6aeb1ccac52348d8d163017f73ef0fd9133551
Reviewed-on: https://review.whamcloud.com/27661
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7988 hsm: run HSM coordinator once per second at most 41/19341/41
Frank Zago [Wed, 6 Apr 2016 21:03:14 +0000 (16:03 -0500)]
LU-7988 hsm: run HSM coordinator once per second at most

When there is heavy HSM usage, each new HSM request can trigger the
HSM coordinator, which may run many times per seconds. When it is
running it locks the HSM catalog (using cdt_llog_lock) preventing any
other HSM operation to happen, such as insertion, removal or dumping
of the requests.

Limit the coordinator to run once per second, and only if there is
work to do. It will still execute the loop once every 10 seconds (or
as defined by the procfs loop_period parameter) to do housekeeping.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Ide3f061f8943a3088ea713993521897fb74e5d99
Reviewed-on: https://review.whamcloud.com/19341
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoRevert "LU-9564 build: Add server-build for Ubuntu with Kernel 4.4.0" 93/28293/2
Oleg Drokin [Tue, 1 Aug 2017 05:05:28 +0000 (05:05 +0000)]
Revert "LU-9564 build: Add server-build for Ubuntu with Kernel 4.4.0"

This actually breaks our Ubuntu builds which prevents any sort of full testing, so I am reverting this now.

This reverts commit 86c3f90d3ab8dbd21dc6fa325aa3a0556fb94035.

Change-Id: I14d242bfde1efb0144080b882e63542fc2190465
Reviewed-on: https://review.whamcloud.com/28293
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Jenkins
2 years agoLU-9439 scripts: add lnet script in .gitignore 06/28106/2
Dmitry Eremin [Wed, 19 Jul 2017 14:00:04 +0000 (17:00 +0300)]
LU-9439 scripts: add lnet script in .gitignore

Ignore generated script.

Test-Parameters: trivial
Change-Id: Id1c67749958b98dc10610514e11fcecbe6ffe3c5
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/28106
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-7589 build: update checkpatch to ~4.13-rc1 kernel 55/28055/3
Andreas Dilger [Sat, 15 Jul 2017 05:57:23 +0000 (23:57 -0600)]
LU-7589 build: update checkpatch to ~4.13-rc1 kernel

Update checkpatch.pl to v4.12-11743-g96d0d83 kernel version.

This version includes new functionality that allows us to
replace the Lustre specific dep_functions and dep_includes
checks added in our local version with the "spelling.txt"
file.

Allow CDEBUG/CERROR/LCONSOLE/DEBUG_REQ text strings to exceed
80 columns, as with upstream printk messages.

Test-Parameters: trivial

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2a16bbd85722b15eb9188eb504bac3a2f63ebbe5
Reviewed-on: https://review.whamcloud.com/28055
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9773 kernel: kernel update [SLES12 SP2 4.4.74-92.29] 43/28043/2
Bob Glossman [Thu, 13 Jul 2017 19:32:30 +0000 (12:32 -0700)]
LU-9773 kernel: kernel update [SLES12 SP2 4.4.74-92.29]

Update target and kernel_config files for new version

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I42107acb5a12f5200d3cb58121d10ffdc1dbc6d2
Reviewed-on: https://review.whamcloud.com/28043
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9763 kernel: kernel update RHEL6.9 [2.6.32-696.6.3.el6] 29/28029/4
Bob Glossman [Tue, 11 Jul 2017 18:47:57 +0000 (11:47 -0700)]
LU-9763 kernel: kernel update RHEL6.9 [2.6.32-696.6.3.el6]

Update RHEL6.9 kernel to 2.6.32-696.6.3.el6
kernel patch added as a workaround for LU-9698

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I4c3d2faa35d70b5aa981e8dc9bc630275c1c61f1
Reviewed-on: https://review.whamcloud.com/28029
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-9683 ptlrpc: fix argument misorder 27/28027/4
Alex Zhuravlev [Wed, 19 Jul 2017 04:59:13 +0000 (00:59 -0400)]
LU-9683 ptlrpc: fix argument misorder

involved in timediffs calculation.

Change-Id: Ib4a45dddb3866824b696aaeaa190f2ab9b1c71ac
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/28027
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-8346 obdclass: Set lc_version 94/27994/3
Patrick Farrell [Tue, 11 Jul 2017 14:31:46 +0000 (09:31 -0500)]
LU-8346 obdclass: Set lc_version

The patch LU-8346 obdclass: guarantee all keys filled
removed the setting of lc_version, which makes us always
refill cached envs.  This is very expensive, particularly
for fast reads.

Original commit e58f8d609a81576eaf5bc9d0fa53bef274a01bf,
https://review.whamcloud.com/26099

Change-Id: I13ba7d19185b899d1f68d244365160539e881b8e
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/27994
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_del_idmap() 91/27891/2
Steve Guminski [Mon, 22 May 2017 13:04:01 +0000 (09:04 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_del_idmap()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_del_idmap() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ic97d308286ce03507bf3f928d9a2b23d6d39947f
Reviewed-on: https://review.whamcloud.com/27891
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_add_idmap() 90/27890/2
Steve Guminski [Mon, 22 May 2017 13:06:09 +0000 (09:06 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_add_idmap()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_add_idmap() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Iafeb7e76a943d8f8118623c532da1e8e2880aba2
Reviewed-on: https://review.whamcloud.com/27890
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_modify() 89/27889/2
Steve Guminski [Mon, 22 May 2017 12:54:11 +0000 (08:54 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_modify()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_modify() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I4c1bd5a3aa26c486436ae68d698fd89f8735a7fb
Reviewed-on: https://review.whamcloud.com/27889
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_set_fileset() 88/27888/2
Steve Guminski [Mon, 22 May 2017 12:50:48 +0000 (08:50 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_set_fileset()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_set_fileset() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I8c0e90e04dd407246e95e59c5b856b9d11b78500
Reviewed-on: https://review.whamcloud.com/27888
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_nodemap_add_range() 82/27882/2
Steve Guminski [Mon, 22 May 2017 12:42:50 +0000 (08:42 -0400)]
LU-6210 utils: Use C99 initializer in jt_nodemap_add_range()

This patch makes no functional changes.  The long_options struct
initializer in jt_nodemap_add_range() is updated to C99 syntax.
It is renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Iba46b68e1c19f89e770f234ab1149926d64f7efb
Reviewed-on: https://review.whamcloud.com/27882
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: C99 initializer in llog_cancel_parse_optional() 80/27880/2
Steve Guminski [Mon, 22 May 2017 12:23:27 +0000 (08:23 -0400)]
LU-6210 utils: C99 initializer in llog_cancel_parse_optional()

This patch makes no functional changes.  The long_options struct
initializer in llog_cancel_parse_optional() is updated to C99 syntax.
The option struct and option string are renamed to long_opts and
short_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ie6e1c823ebc59c3791c7c6b0360f33d1d0184c1a
Reviewed-on: https://review.whamcloud.com/27880
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-6210 utils: Use C99 initializer in jt_obd_md_common() 79/27879/2
Steve Guminski [Mon, 22 May 2017 12:13:56 +0000 (08:13 -0400)]
LU-6210 utils: Use C99 initializer in jt_obd_md_common()

This patch makes no functional changes.  The long_opts struct
initializer in jt_obd_md_common() is updated to C99 syntax.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ifa7140e9980570940f8dfd1200307d02242a8c45
Reviewed-on: https://review.whamcloud.com/27879
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: Dmitry Eremin <dmitry.eremin@intel.com>
2 years agoLU-9712 kernel: kernel update [SLES11 SP4 3.0.101-107] 41/27841/2
Bob Glossman [Mon, 26 Jun 2017 17:05:26 +0000 (10:05 -0700)]
LU-9712 kernel: kernel update [SLES11 SP4 3.0.101-107]

Update SLES11 SP4 kernel to 3.0.101-107

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ic62b288becc936d54ee88539ab1635ca3a78cf7f
Reviewed-on: https://review.whamcloud.com/27841
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6051 utils: allow lfs_migrate to migrate links 53/27553/2
Andreas Dilger [Sat, 10 Jun 2017 02:39:11 +0000 (20:39 -0600)]
LU-6051 utils: allow lfs_migrate to migrate links

When running on a server that supports "lfs migrate", it is possible
to migrate hard links transparently.  This is still not possible for
servers that do not support "lfs migrate" (layout swap) so we still
need to keep the hard-link check if "lfs migrate" fails.

Add test for migrating many hardlinks on supported kernels.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7fa1c70611aa7dd61f822844d5fe339f730640e5
Reviewed-on: https://review.whamcloud.com/27553
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
2 years agoLU-6210 utils: Use C99 struct initializers in lfs_hsm_request() 26/27526/3
Steve Guminski [Fri, 14 Apr 2017 19:47:25 +0000 (15:47 -0400)]
LU-6210 utils: Use C99 struct initializers in lfs_hsm_request()

This patch makes no functional changes.  Struct initializers that
use C89 or GCC-only syntax are updated to C99 syntax.  Variables of
type struct option are renamed to long_opts for consistency.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

This patch updates lfs_hsm_request() to use the C99 syntax.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I62b07e59a3f81cf8ee936ae46b1cd8f99913e53c
Reviewed-on: https://review.whamcloud.com/27526
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: Dmitry Eremin <dmitry.eremin@intel.com>