Whamcloud - gitweb
fs/lustre-release.git
7 years agoLU-7734 lnet: implement Peer Discovery 40/21540/9
Olaf Weber [Fri, 27 Jan 2017 15:36:13 +0000 (16:36 +0100)]
LU-7734 lnet: implement Peer Discovery

Implement Peer Discovery.

A peer is queued for discovery by lnet_peer_queue_for_discovery().
This sets the LNET_PEER_QUEUED flag (to indicate the lnet_peer is
on the discovery queues) and 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: I9fbc0528788c352580c6d0449c7c66cba2740df2

7 years agoLU-7734 lnet: add the Push target 39/21539/9
Olaf Weber [Fri, 27 Jan 2017 15:35:58 +0000 (16:35 +0100)]
LU-7734 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: If1beac356987045089db0d27ec56e93e72ef0057

7 years agoLU-7734 lnet: tune lnet_peer_discovery_enabled with lnetctl 39/25139/1
Olaf Weber [Fri, 27 Jan 2017 15:34:51 +0000 (16:34 +0100)]
LU-7734 lnet: tune lnet_peer_discovery_enabled with lnetctl

A new tunable, lnet_peer_discovery_enabled, has been introduced.
Make it tunable with lnetctl.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I7664fc2b4690231c0e2aaace30c25e32b41e0ff5

7 years agoLU-7734 lnet: add discovery thread 38/21538/9
Olaf Weber [Fri, 27 Jan 2017 15:32:11 +0000 (16:32 +0100)]
LU-7734 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>
Change-Id: Id31bc8d3b3cf81f7f56d17ddd9cb34a937b93feb

7 years agoLU-7734 lnet: add msg_type to lnet_event 37/21537/9
Olaf Weber [Fri, 27 Jan 2017 15:31:57 +0000 (16:31 +0100)]
LU-7734 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: I5baca7be5ebb4968090fd830a3c61cb2442ee389

7 years agoLU-7734 lnet: reference counts on lnet_peer/lnet_peer_net 36/21536/9
Olaf Weber [Fri, 27 Jan 2017 15:25:30 +0000 (16:25 +0100)]
LU-7734 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: Ica78e903126d67eb2c677ce69e634b9f72f6e4d1

7 years agoLU-7734 lnet: add LNET_PEER_CONFIGURED flag 35/21535/9
Olaf Weber [Fri, 27 Jan 2017 15:25:02 +0000 (16:25 +0100)]
LU-7734 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: Ie08723fab446de7757e279cbda7e5d56e136a4a0

7 years agoLU-7734 lnet: preferred NIs for non-Multi-Rail peers 34/21534/9
Olaf Weber [Fri, 27 Jan 2017 15:24:40 +0000 (16:24 +0100)]
LU-7734 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: I99b891c28c09a1365ef47b4b7deb3eef7e0ad77d

7 years agoLU-7734 lnet: introduce LNET_PEER_MULTI_RAIL flag bit 33/21533/9
Olaf Weber [Fri, 27 Jan 2017 15:24:21 +0000 (16:24 +0100)]
LU-7734 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: I7e5678d75b2563d26896d3e108ce8ece0487dc48

7 years agoLU-7734 lnet: refactor lnet_add_peer_ni() 09/21109/10
Olaf Weber [Fri, 27 Jan 2017 15:24:04 +0000 (16:24 +0100)]
LU-7734 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: If83ec37c6b70d851ebbff925d367dcaa945a2fd4

7 years agoLU-7734 lnet: refactor lnet_del_peer_ni() 08/21108/10
Olaf Weber [Fri, 27 Jan 2017 15:23:51 +0000 (16:23 +0100)]
LU-7734 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: I6b3faca9f8aca0f9b03e40f735c728870d72fe70

7 years agoLU-7734 lnet: rename lnet_add/del_peer_ni_to/from_peer() 07/21107/10
Olaf Weber [Fri, 27 Jan 2017 15:23:35 +0000 (16:23 +0100)]
LU-7734 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: I1665288100dfd10e8b569cdb00540248ab68f182

7 years agoLU-7734 lnet: cleanup of lnet_peer_ni_addref/decref_locked() 06/21106/10
Olaf Weber [Fri, 27 Jan 2017 15:23:20 +0000 (16:23 +0100)]
LU-7734 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: I0daf9a7f7c591cdbb44eb69019635b5e383a39c7

7 years agoLU-7734 lnet: add sanity checks on ping-related constants 95/21095/10
Olaf Weber [Fri, 27 Jan 2017 15:23:05 +0000 (16:23 +0100)]
LU-7734 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: I2c70debe83375e32da965cfcc93e65eb32970952

7 years agoLU-7734 lnet: add LNET_PING_FEAT_MULTI_RAIL bit 96/21096/10
Olaf Weber [Fri, 27 Jan 2017 15:22:40 +0000 (16:22 +0100)]
LU-7734 lnet: add LNET_PING_FEAT_MULTI_RAIL bit

Claim a ping feature bit for Multi-Rail.

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: I6716f9175f413328cc1af30d01f33d3e5e8b56df

7 years agoLU-7734 lnet: use 'struct lnet_hdr' in wirecheck 38/25138/1
Olaf Weber [Fri, 27 Jan 2017 15:22:00 +0000 (16:22 +0100)]
LU-7734 lnet: use 'struct lnet_hdr' in wirecheck

Replace lnet_hdr_t with struct lnet_hdr in wirecheck.c and the
code it generates.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Ia87d0bd725684cebb655e0f719293968cae4925e

7 years agoLU-7734 lnet: use 'struct lnet_magicversion' in wirecheck 37/25137/1
Olaf Weber [Fri, 27 Jan 2017 15:20:27 +0000 (16:20 +0100)]
LU-7734 lnet: use 'struct lnet_magicversion' in wirecheck

Replace lnet_magicversion_t with struct lnet_magicversion in
wirecheck.c and the code it generates.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I899794b15e2b609891103bf53175bb2ceba80d12

7 years agoLU-7734 lnet: remove "struct' from generated comment 36/25136/1
Olaf Weber [Fri, 27 Jan 2017 15:17:01 +0000 (16:17 +0100)]
LU-7734 lnet: remove "struct' from generated comment

The CHECK_STRUCT() generates a comment saying "Checks for struct "
followed by the type name. If the type name is 'struct mumble' the
result is "Checks for struct struct mumble". Drop the extra "struct".

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I90b13a2c500c63accb90ef567b197defd5521dea

7 years agoLU-7734 lnet: whitespace cleanup for wirecheck.c 25/22025/7
Olaf Weber [Fri, 27 Jan 2017 15:16:45 +0000 (16:16 +0100)]
LU-7734 lnet: whitespace cleanup for wirecheck.c

Clean up the whitespace use in wirecheck.c and in the generated code.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I5c90d09fd694c8151f6f11f716c491ac3db79eb0

7 years agoLU-7734 lnet: automatic sizing of router pinger buffers 24/22024/7
Olaf Weber [Fri, 27 Jan 2017 15:16:34 +0000 (16:16 +0100)]
LU-7734 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: I9474e2e162d2facdf571fe207dea254dd3f8e469

7 years agoLU-7734 lnet: add struct lnet_ping_buffer 97/21097/10
Olaf Weber [Fri, 27 Jan 2017 15:16:16 +0000 (16:16 +0100)]
LU-7734 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: Id37cd37c7b42a8e62c35a6d7b45a1a300e88c5e2

7 years agoLU-7734 lnet: cleanup debug code 84/22184/6
Olaf Weber [Fri, 27 Jan 2017 15:15:50 +0000 (16:15 +0100)]
LU-7734 lnet: cleanup debug code

Cleaned up debug code that was added to allow for
debug messages from user space. However, the code is currently
not being used.

Test-Parameters: trivial
Change-Id: I342a1c4dd60aae397eea5ef39beeba97abd87a67
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: configure lnet_max_interfaces tunable from dlc 56/22056/8
Olaf Weber [Fri, 27 Jan 2017 15:15:24 +0000 (16:15 +0100)]
LU-7734 lnet: configure lnet_max_interfaces tunable from dlc

Added the ability to configure lnet_max_interfaces 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: I5b8d16e3fc533874000c36d8233232d5a07c4d7c

7 years agoLU-7734 lnet: add lnet_max_interfaces tunable 92/21092/10
Olaf Weber [Fri, 27 Jan 2017 15:15:07 +0000 (16:15 +0100)]
LU-7734 lnet: add lnet_max_interfaces tunable

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

Add LNET_MIN_INTERFACES, value 16, as the minimum value.

Add LNET_MAX_INTERFACES_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_MAX_INTERFACES name was not reused to allow for the early
detection of issues when merging code that uses it.)

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I1fd88e9e37d21614bb0af8a4fe14d9ae5ae62c1e

7 years agoLU-7734 lnet: rename LNET_MAX_INTERFACES 91/21091/10
Olaf Weber [Fri, 27 Jan 2017 15:14:50 +0000 (16:14 +0100)]
LU-7734 lnet: rename LNET_MAX_INTERFACES

LNET_MAX_INTERFACES is the number of interfaces supported by
interface bonding in the ksocknal LND. It shows up in LNet
because a number of data structures are shared between LNDs.

Rename it to LNET_NUM_INTERFACES to reduce the confusion of
what it does.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Id6aabf494575a75fb74fe55668838e4435a95d8e

7 years agoLU-7734 lnet: loopback NID in lnet_select_pathway() 12/21712/8
Olaf Weber [Fri, 27 Jan 2017 15:14:34 +0000 (16:14 +0100)]
LU-7734 lnet: loopback NID in lnet_select_pathway()

In lnet_select_pathway() sending to the loopback NID is handled
as a special case, because there are no credits involved. (The
loopback NID doesn't use credits, and therefore does not have
any credits. If a message goes through the credit-managing code
it therefore ends up waiting indefinitely for credits to become
available.)

The check whether we're sending over the loopback NID must be
done after we've completed choosing the NI to send over. In its
present location it only handles the case where the loopback
NID was explicitly passed in as the source NID.

(Lustre does not exercise this code path during normal operation,
the bug was encountered while testing code for the peer discovery
feature.)

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Ie7416ffd0079b8f7c6450830e55abd36c1099077

7 years agoLU-7734 socklnd: propagate errors on send failure 11/21711/8
Olaf Weber [Fri, 27 Jan 2017 15:13:53 +0000 (16:13 +0100)]
LU-7734 socklnd: propagate errors on send failure

When an attempt to send a message fails, for example because no
connection could be established with the remote address, socklnd
drops the message. For a PUT or REPLY message with non-zero
payload, ksocknal_tx_done() calls lnet_finalize() with -EIO
as the error code. But for an ACK or GET message there is no
payload, and lnet_finalize() is called with 0 (no error) as the
error code. This leaves upper layers to rely on other means to
determine that sending the message did actually fail, and that
(for example) no REPLY will ever answer a failed GET.

Add an error code parameter to ksocknal_tx_done().

In ksocknal_txlist_done() change the 0/1 'error' indicator to be
an actual error code that is passed on the ksocknal_tx_done().
Update the callers of ksocknal_txlist_done() to pass in the error
code if they have encountered an error.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Idf6dc7a3a2c95cecee6b272c35a66ef57a704b52

7 years agoLU-7734 lnet: fix lnet shutdown race 32/21532/9
Olaf Weber [Fri, 27 Jan 2017 15:13:29 +0000 (16:13 +0100)]
LU-7734 lnet: fix lnet shutdown race

The locking changes for the lnet_net_lock made for Multi-Rail
introduce a race in the LNet shutdown path. The code keeps two
states in the_lnet.ln_shutdown: 0 means LNet is either up and
running or shut down, while 1 means lnet is shutting down. In
lnet_select_pathway() if we need to restart and drop and relock
the lnet_net_lock we can find that LNet went from running to
stopped, and not be able to tell the difference.

Replace ln_shutdown with a three-state ln_state patterned on
ln_rc_state: states are LNET_STATE_SHUTDOWN, LNET_STATE_RUNNING,
and LNET_STATE_STOPPING. Most checks against ln_shutdown now test
ln_state against LNET_STATE_RUNNING. LNet moves to RUNNING state
in lnet_startup_lndnets().

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I241fe329171c88cd8ca62d3eaa83aec4d66dad54

7 years agoLU-7734 gnilnd: update GNI lnd driver to handle multirail api changes 92/21192/4
James Simmons [Thu, 7 Jul 2016 18:07:50 +0000 (14:07 -0400)]
LU-7734 gnilnd: update GNI lnd driver to handle multirail api changes

The multirail changes moved several parameters in struct lnet_ni
to the new data structure called struct lnet_net. This patch
updates the Gemini driver to handle the API changes.

Test-Parameters: trivial
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: I75830c570ed56c5b1b665115e8ac96a733a7e57e
Reviewed-on: https://review.whamcloud.com/21192
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: Fix setting numa range
Amir Shehata [Thu, 12 Jan 2017 21:57:11 +0000 (13:57 -0800)]
LU-7734 lnet: Fix setting numa range

Call the correct API when setting numa_range.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Test-Parameters: trivial
Change-Id: I1f9f8f1aabc277dff1fddd678cd360a9c49af4a5
Reviewed-on: https://review.whamcloud.com/24861
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: Update lnetctl usage
Stephen Champion [Fri, 9 Dec 2016 20:31:49 +0000 (12:31 -0800)]
LU-7734 lnet: Update lnetctl usage

Bring lnetctl help descriptions, man page, and usage in line
with changes to peer functions.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Test-Parameters: trivial
Change-Id: Idf115319727d92f23e50a97585f2f2c1e8c1b7b8
Reviewed-on: https://review.whamcloud.com/24279
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: cpt locking
Amir Shehata [Fri, 2 Dec 2016 05:23:20 +0000 (21:23 -0800)]
LU-7734 lnet: cpt locking

When source nid is specified it is necessary to also
use the destination nid. Otherwise bulk transfer will end up
on a different interface than the nearest interface to the
memory. This has significant performance impact on NUMA
systems such as the SGI UV.

The CPT which the MD describing the bulk buffers belongs to
is not the same CPT of the actual pages of memory.
Therefore, it is necessary to communicate the CPT of the pages
to LNet, in order for LNet to select the nearest interface.

The MD which describes the pages of memory gets attached to
an ME, to be matched later on. The MD which describes the
message to be sent is different and this patch adds the
handle of the bulk MD into the MD which ends up being
accessible by lnet_select_pathway(). In that function
a new API, lnet_cpt_of_md_page(), is called which returns the
CPT of the buffers used for the bulk transfer.
lnet_select_pathway() proceeds to use this CPT to select
the nearest interface.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I4117ef912835f16dcdcaafb70703f92d74053b9b
Reviewed-on: https://review.whamcloud.com/24085

7 years agoLU-7734 lnet: rename peer key_nid to prim_nid
Amir Shehata [Thu, 27 Oct 2016 23:49:27 +0000 (16:49 -0700)]
LU-7734 lnet: rename peer key_nid to prim_nid

To make the interface clear, renamed key_nid to
prim_nid to indicate that this parameter refers to
the peer's primary nid.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I74bd17cdd55ba8d2c52bc28557db149d23ecbfb5
Reviewed-on: http://review.whamcloud.com/23460
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: Enhance DLC ip2nets
Amir Shehata [Thu, 8 Sep 2016 01:32:34 +0000 (18:32 -0700)]
LU-7734 lnet: Enhance DLC ip2nets

If the interfaces YAML block is specified then commission
the interfaces which match the ip-range if it is defined.
Otherwise commission the interfaces as long as they exist
and are up.

If the interfaces YAML block is not specified but an
ip-range is specified then configure all interfaces
in the system that match the ip-range.

If no interfaces and no ip-range is specified, then
commission the first interface that exists and is UP.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I01b2ced6f50fed2528f626166154be874f394e8b
Reviewed-on: http://review.whamcloud.com/22372
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: fix NULL access in lnet_peer_aliveness_enabled
Amir Shehata [Fri, 26 Aug 2016 19:39:27 +0000 (12:39 -0700)]
LU-7734 lnet: fix NULL access in lnet_peer_aliveness_enabled

When a peer is not on a local network, lpni->lpni_net is NULL.
The lpni_net is access in lnet_peer_aliveness_enabled() without
checking if it's NULL. Fixed.

Test-Parameters: trivial
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: If328728e2bda2a19b273140a20c04b22bdda6bc4
Reviewed-on: http://review.whamcloud.com/22183
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: set primary NID in ptlrpc_connection_get()
Olaf Weber [Thu, 4 Aug 2016 11:27:01 +0000 (13:27 +0200)]
LU-7734 lnet: set primary NID in ptlrpc_connection_get()

Set the NID in ptlrpc_connection::c_peer to the primary NID of a peer.
This ensures that regardless of the NID used to start a connection, we
consistently use the same NID (the primary NID) to identify a peer. It
also means that PtlRPC will not create multiple connections to a peer.

The primary NID is obtained by calling LNetPrimaryNID(), an addition
to the exported symbols of the LNet module. The name was chosen to
match the existing naming pattern.

Test-Parameters: trivial
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Idc0605d17a58678b634db246221028cf81ad2407
Reviewed-on: http://review.whamcloud.com/21710
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: fix string.h header inclusion
Amir Shehata [Thu, 11 Aug 2016 01:07:17 +0000 (18:07 -0700)]
LU-7734 lnet: fix string.h header inclusion

string.h is intended for user space and libcfs_string.h
is intended for kernel space. Use string.h in liblnetconfig
library.

Add cfs_expr_list_values() in the string.h header file since
it's used in liblnetconfig library.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I50b1bb1aff6fe176cfbe28f039f34d063c9265e4
Reviewed-on: http://review.whamcloud.com/21874
Tested-by: Jenkins
Reviewed-by: Olaf Weber <olaf@sgi.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
7 years agoLU-7734 lnet: minor fixes
Amir Shehata [Wed, 20 Jul 2016 09:11:50 +0000 (02:11 -0700)]
LU-7734 lnet: minor fixes

Fixed some issues Gatekeeper helper robot pointed out

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id33b4c9e94b22bddc0bfddf8f51235b81d3d86dc
Reviewed-on: http://review.whamcloud.com/21450

7 years agoLU-7734 lnet: double free in lnet_add_net_common()
Olaf Weber [Wed, 20 Jul 2016 12:57:36 +0000 (14:57 +0200)]
LU-7734 lnet: double free in lnet_add_net_common()

lnet_startup_lndnet() always consumes its net parameter, so we
should not free net after the function has been called. This
fixes a double free triggered by adding a network twice.

Eliminate the netl local variable.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I1cfc3494eada4660b792f6a1ebd96b5dc80d9945
Reviewed-on: http://review.whamcloud.com/21446
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: Fix crash in router_proc.c
Amir Shehata [Thu, 14 Jul 2016 23:51:32 +0000 (16:51 -0700)]
LU-7734 lnet: Fix crash in router_proc.c

Fixed NULL access in the case when a peer is a remote
peer. In that case lpni_net is NULL.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ida234ff016b2bdc305acf74df0f99600d2555e27
Reviewed-on: http://review.whamcloud.com/21327

7 years agoLU-7734 lnet: fix routing selection
Amir Shehata [Thu, 14 Jul 2016 23:50:07 +0000 (16:50 -0700)]
LU-7734 lnet: fix routing selection

Always prefer locally connected networks over routed networks.
If there are multiple routed networks and no connected networks
pick the best gateway to use. If all gateways are equal then
round robin through them.

Renamed dev_cpt to ni_dev_cpt to maintain naming convention.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ie6a3aaa7a9ec4f5474baf5e1ec0258d481418cb1
Reviewed-on: http://review.whamcloud.com/21326

7 years agoLU-7734 lnet: power8 compile fix
James Simmons [Wed, 29 Jun 2016 17:19:41 +0000 (13:19 -0400)]
LU-7734 lnet: power8 compile fix

On Power8 the following error occured:

error: inlining failed in call to always_inline â€˜lnet_get_numa_range’:
function body not available inline __u32 lnet_get_numa_range(void);

The reason for this was for the linux kernel you
must fill in the body of a inline function. Replace
this inline function with exposing the lnet_numa_range
module parameter like we do for portal_rotor. Also
treat all the lnet_numa_range handling as unsigned int.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Ic566e56eb1e333d145de21d1c197218c6425dc5b
Reviewed-on: http://review.whamcloud.com/21078
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: Routing fixes part 2
Amir Shehata [Wed, 6 Jul 2016 02:36:08 +0000 (19:36 -0700)]
LU-7734 lnet: Routing fixes part 2

Fix lnet_select_pathway() to handle the routing cases correctly.
The following general cases are handled:
. Non-MR directly connected
. Non-MR not directly connected
. MR Directly connected
. MR Not directly connected
  . No gateway
  . Gateway is non-mr
  . Gateway is mr

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: If2d16b797b94421e78a9f2a254a250a440f8b244
Reviewed-on: http://review.whamcloud.com/21167

7 years agoLU-7734 lnet: Routing fixes part 1
Amir Shehata [Mon, 4 Jul 2016 21:51:06 +0000 (14:51 -0700)]
LU-7734 lnet: Routing fixes part 1

This is the first part of a routing fix.
- Fix crash in lnet_parse_get()
- Resolve deadlock when adding a route.
- Fix an issue with dynamically turning on routing
- Set the final destination NID properly when routing a msg

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I68d0e4d52192aa96e37c77952a1ebe75c1b770c5
Reviewed-on: http://review.whamcloud.com/21166

7 years agoLU-7734 lnet: fix lnet_select_pathway()
Amir Shehata [Mon, 20 Jun 2016 21:21:13 +0000 (14:21 -0700)]
LU-7734 lnet: fix lnet_select_pathway()

Fixed the selection algorithm to work properly with > 1 local
networks. The behavior now is to iterate through all interfaces
on all networks

Also removed the health variable from struct lnet_peer_net since
it's never used.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ib91748e80446585b6a9e1bc0f3af6894599d8aaa
Reviewed-on: http://review.whamcloud.com/20890
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
7 years agoLU-7734 lnet: configuration fixes
Amir Shehata [Fri, 17 Jun 2016 22:55:13 +0000 (15:55 -0700)]
LU-7734 lnet: configuration fixes

Fix cpt configuration from DLC to configure the proper list
of cpts in LNet. Check in LNet that no CPTs are outside the
available CPTs in the system.

Fix peer_rtr_credits name to peer_tx_credits to reflect the
actual value.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ic4a3985a470ed901be6166df4079205677921817
Reviewed-on: http://review.whamcloud.com/20862
Tested-by: Jenkins
7 years agoLU-7734 lnet: fix lnet_peer_table_cleanup_locked()
Olaf Weber [Thu, 16 Jun 2016 10:27:46 +0000 (12:27 +0200)]
LU-7734 lnet: fix lnet_peer_table_cleanup_locked()

In lnet_peer_table_cleanup_locked() we delete the entire peer if the
lnet_peer_ni for the primary NID of the peer is deleted. If the next
lnet_peer_ni in the list belongs to the peer being deleted, then the
next pointer kept by list_for_each_entry_safe() ends up pointing at
freed memory.

Add a list_for_each_entry_from() loop to advance next to a peer_ni
that does not belong to the peer being deleted and will therefore
remain present in the list.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I92bf219dc93a79f7d90035ccfbb38cd251138c04
Reviewed-on: http://review.whamcloud.com/20824
Tested-by: Jenkins
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: Fix lnet_msg_free()
Amir Shehata [Fri, 10 Jun 2016 22:07:06 +0000 (15:07 -0700)]
LU-7734 lnet: Fix lnet_msg_free()

Remove the ni_decref in lnet_msg_free(), since this function
gets called with no lnet_net_lock() held

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ibfcbcea25287f4d22ae6146d7aa01f4279ffe969
Reviewed-on: http://review.whamcloud.com/20729

7 years agoLU-7734 lnet: simplify and fix lnet_select_pathway()
Amir Shehata [Fri, 10 Jun 2016 06:43:35 +0000 (23:43 -0700)]
LU-7734 lnet: simplify and fix lnet_select_pathway()

In lnet_select_pathway() we restart selection if the DLC seq
counter changes. Provided we take a hold on the preferred
lnet_peer_ni, we only need to restart if an lnet_ni was added
or removed. Update the locations where lnet_incr_dlc_seq() is
called to take this into account.

A number of local variables must be reset whenever we goto
again. Do this immediately after the label for the global
variables, and immediately before the block that uses them
for the helper variables.

In the loop where NUMA distances are compared, use the NUMA
range for distances smaller than the NUMA range, simplifying
the subsequent comparisons between distances.

Remote the lo_sent output parameter. Instead do an early
return with LNET_CREDIT_OK.

Move the increment of the best_lpni->lpni_seq number after
the check that best_lpni isn't NULL.

When routing, the best_gw should be treated as the best_lpni
for the purpose of determining the CPT to lock.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: Ie71eebc2301601cf1c85c6248dbed06951b89274
Reviewed-on: http://review.whamcloud.com/20720

7 years agoLU-7734 lnet: protect peer_ni credits
Amir Shehata [Thu, 9 Jun 2016 08:17:45 +0000 (01:17 -0700)]
LU-7734 lnet: protect peer_ni credits

Currently multiple NIs can talk to the same peer_ni. The per-CPT
lnet_net_lock therefore no longer protects the lpni against
concurrent updates. To resolve this issue a spinlock is added
to the lnet_peer_ni, which must be locked when the peer NI
credits, delayed message queue, and delayed routed message queue
are modified. The lock is not taken when reporting credits.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Olaf Weber <olaf@sgi.com>
Change-Id: I52153680a74d43e595314b63487026cc3f6a5a8f
Reviewed-on: http://review.whamcloud.com/20702

7 years agoLU-7734 lnet: proper cpt locking
Amir Shehata [Thu, 9 Jun 2016 06:08:06 +0000 (23:08 -0700)]
LU-7734 lnet: proper cpt locking

1. add a per NI credits, which is just the total credits
   assigned on NI creation
2. Whenever percpt credits are added or decremented, we
   mirror that in the NI credits
3. We use the NI credits to determine best NI
4. After we have completed the peer_ni/ni selection we
   determine the cpt to use for locking:
cpt_of_nid(lpni->nid, ni)

The lpni_cpt is not enough to protect all the fields in the
lnet_peer_ni structure. This is due to the fact that multiple
NIs can talk to the same peer, and functions can be called with
different cpts locked. To properly protect the fields in the
lnet_peer_ni structure, a spin lock is introduced for the
purpose.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ief7868c3c8ff7e00ea9e908dd50d8cef77d9f9a4
Reviewed-on: http://review.whamcloud.com/20701

7 years agoLU-7734 lnet: peer/peer_ni handling adjustments
Amir Shehata [Thu, 26 May 2016 22:42:39 +0000 (15:42 -0700)]
LU-7734 lnet: peer/peer_ni handling adjustments

A peer can be added by specifying a list of NIDs
The first NID shall be used as the primary NID. The rest of
the NIDs will be added under the primary NID

A peer can be added by explicitly specifying the key NID, and then
by adding a set of other NIDs, all done through one API call

If a key NID already exists, but it's not an MR NI, then adding that
Key NID from DLC shall convert that NI to an MR NI

If a key NID already exists, and it is an MR NI, then re-adding the
Key NID shall have no effect

if a Key NID already exists as part of another peer, then adding that
NID as part of another peer or as primary shall fail

if a NID is being added to a peer NI and that NID is a non-MR, then
that NID is moved under the peer and is made to be MR capable

if a NID is being added to a peer and that NID is an MR NID and part
of another peer, then the operation shall fail

if a NID is being added to a peer and it is already part of that Peer
then the operation is a no-op.

Moreover, the code is structured to consider the addition of Dynamic
Discovery in later patches.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I71f740192a31ae00f83014ca3e9e06b61ae4ecd5
Reviewed-on: http://review.whamcloud.com/20531

7 years agoLU-7734 lnet: Add peer_ni and NI stats for DLC
Doug Oucharek [Fri, 13 May 2016 00:25:21 +0000 (17:25 -0700)]
LU-7734 lnet: Add peer_ni and NI stats for DLC

This patch adds three stats to the peer_ni and NI structures:
send_count, recv_count, and drop_count. These stats get printed
when you do an "lnetctl net show -v" (for NI) and
"lnetctl peer show" (for peer_ni).

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: Ic41c88cbc68dba677151d87a1fab53a48d36ea29
Reviewed-on: http://review.whamcloud.com/20170
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Amir Shehata <amir.shehata@intel.com>
7 years agoLU-7734 lnet: rename LND peer to peer_ni
Amir Shehata [Fri, 1 Apr 2016 19:28:58 +0000 (12:28 -0700)]
LU-7734 lnet: rename LND peer to peer_ni

Patch to rename LND peers to peer_ni to reflect the fact that these
constructs reflect an actual connection between a local NI and remote
peer NI.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I1c25a12eae61d8822a8c4ada2e077a5b2011ba22
Reviewed-on: http://review.whamcloud.com/19307
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: handle N NIs to 1 LND peer
Amir Shehata [Fri, 1 Apr 2016 17:41:34 +0000 (10:41 -0700)]
LU-7734 lnet: handle N NIs to 1 LND peer

This patch changes o2iblnd only, as socklnd already handles this
case. In the new design you can have multiple NIs communicating
to one peer. In the o2ilbnd the kib_peer has a pointer to the NI
which implies a 1:1 relationship.

This patch changes kiblnd_find_peer_locked() to use the peer NID
and the NI NID as the key. This way a new peer will be created for
each unique NI/peer_NI pair.

This is similar to how socklnd handles this case.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ifab7764489757ea473b15c46c1a22ef9ceeeceea
Reviewed-on: http://review.whamcloud.com/19306
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: handle non-MR peers
Amir Shehata [Thu, 31 Mar 2016 23:53:02 +0000 (16:53 -0700)]
LU-7734 lnet: handle non-MR peers

Add the ability to declare a peer to be non-MR from the DLC
interface. By default if a peer is configured from DLC it is
assumed to be MR capable, except when the non-mr flag is set.

For non-MR peers always use the same NI to communicate with it.
If multiple NIs are used to communicate with a non-MR peer the
peer will consider that it's talking to different peers which could
cause upper layers to be confused.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ie3ec45f5f44fa7d72e3e0335b1383f9c3cc92627
Reviewed-on: http://review.whamcloud.com/19305
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: Primary NID and traffic distribution
Amir Shehata [Tue, 15 Mar 2016 21:44:07 +0000 (14:44 -0700)]
LU-7734 lnet: Primary NID and traffic distribution

When receiving messages from a multi-rail peer we must keep track of
both the source NID and the primary NID of the peer. When sending a
reply message or RPC respone, the source NID is preferred. But most
other uses require identifcation of the peer regardless of which
source NID the message came from, and so the primary NID of the peer
must then be used.

An example for this is the creation of match entries. Another occurs
when an event is created: the initiator should be the primary NID, to
ensure upper layers (PtlRPC and Lustre) always see the same NID for
that peer.

This change also contains code to have PtlRPC use LNET_NID_ANY for
the 'self' parameter of LNetPut() and LNetGet() when it doesn't care
which NI it sends from, and to provide a local/peer NID pair when it
does. This can be broken out into a separate change.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: If4391f2537a94f5784e8c61ae03aad266b2f8e7d
Reviewed-on: http://review.whamcloud.com/18938
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: NUMA support
Amir Shehata [Tue, 15 Mar 2016 10:13:03 +0000 (03:13 -0700)]
LU-7734 lnet: NUMA support

This patch adds NUMA node support. NUMA node information is stored
in the CPT table. A NUMA node mask is maintained for the entire table
as well as for each CPT to track the NUMA nodes related to each of
the CPTs. Following key APIs added:

cfs_cpt_of_node(): returns the CPT of particular NUMA node
cfs_cpt_distance(): calculates the distance between two CPTs

When the LND device is started it finds the NUMA node of the physical
device and then from there it finds the CPT, which is subsequently
stored in the NI structure.

When selecting the NI, the MD CPT is determined and the distance
between the MD CPT and the device CPT is calculated. The NI
with the shortest distance is preferred.

If the device or system is not NUMA aware then the CPT for the
device will default to CFS_CPT_ANY and the distance calculated
when CFS_CPT_ANY is used is largest in the system. IE, none
NUMA aware devices are least preferred.

A NUMA range value can be set. If the value is large enough
it amounts to basically turning off NUMA criterion completely.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I2d7c63f8e8fc8e8a6a249b0d6bfdd08fd090a837
Reviewed-on: http://review.whamcloud.com/18916
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: configure local NI from DLC
Amir Shehata [Fri, 29 Jan 2016 01:00:09 +0000 (17:00 -0800)]
LU-7734 lnet: configure local NI from DLC

This patch adds the ability to configure multiple network interfaces
on the same network. This can be done via the lnetctl CLI interface
or through a YAML configuration. Refer to the multi-rail HLD for
more details on the syntax.

It also deprecates ip2nets kernel parsing. All string parsing and
network maching now happens in the DLC userspace library.

New IOCTLs are added for adding/deleting local NIs, to keep backwards
compatibility with older version of the DLC and lnetctl.

The changes also include parsing and matching ip2nets syntax at the
user level and then passing down the network interfaces down to the
kernel to be configured.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I19ee7dc76514beb6f34de6517d19654d6468bcec
Reviewed-on: http://review.whamcloud.com/18886
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
7 years agoLU-7734 lnet: configure peers from DLC
Amir Shehata [Wed, 13 Jan 2016 01:09:31 +0000 (17:09 -0800)]
LU-7734 lnet: configure peers from DLC

This patch adds the ability to configure peers from the DLC
interface.

When a peer is added a primary NID should be provided. If none is
provided then the first NID in the list of NIDs will be used
as the primary NID.

Basic error checking is done at the DLC level to ensure properly
formatted NIDs. However, if a NID is a duplicate, this will be
detected when adding it in the kernel. Operation is halted, which
means some peer NIDs might have already been added, but not the
entire set. It's the role of the caller to backtrack and remove that
peer that failed to add.

When deleting a peer a primary NID or a normal NID can be provided.
If a standard NID is provided, then the peer is found, and the
primary NID is compared to the peer ni. If they are the same the
entire peer is deleted. Otherwise, only the identified peer ni is
deleted. If a set of NIDs are provided each one will be removed
from the peer identified by the peer NID in turn.

The existing show peer credits API can be used to show peer
information.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Iaf588a062b44d74305aa9aa7d31c7341c6c384b9
Reviewed-on: http://review.whamcloud.com/18476
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoLU-7734 lnet: Multi-Rail local_ni/peer_ni selection
Amir Shehata [Tue, 5 Jan 2016 00:02:25 +0000 (16:02 -0800)]
LU-7734 lnet: Multi-Rail local_ni/peer_ni selection

This patch implements the local_ni/peer_ni selection algorithm.
It adds APIs to the peer module to encapsulate
iterating through the peer_nis in a peer and creating a peer.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ifc0e5ebf84ab25753adfcfcb433b024100f35ace
Reviewed-on: http://review.whamcloud.com/18383
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Tested-by: Jenkins
Tested-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: Multi-Rail peer split
Amir Shehata [Sat, 12 Dec 2015 04:02:54 +0000 (20:02 -0800)]
LU-7734 lnet: Multi-Rail peer split

Split the peer structure into peer/peer_net/peer_ni, as
described in the Multi-Rail HLD.

Removed deathrow list in peers, instead peers are immediately
deleted. deathrow complicates memory management for peers to
little gain.

Moved to LNET_LOCK_EX for any operations which will modify the
peer tables. And CPT locks for any operatios which read the peer
tables. Therefore there is no need to use lnet_cpt_of_nid() to
calculate the CPT of the peer NID, instead we use lnet_nid_cpt_hash()
to distribute peers across multiple CPTs.

It is no longe true that peers and NIs would exist on
the same CPT. In the new design peers and NIs don't have a 1-1
relationship. You can send to the same peer from several NIs, which
can exist on separate CPTs

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ida41d830d38d0ab2bb551476e4a8866d52a25fe2
Reviewed-on: http://review.whamcloud.com/18293
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
7 years agoLU-7734 lnet: Multi-Rail local NI split
Amir Shehata [Sat, 12 Dec 2015 04:02:54 +0000 (20:02 -0800)]
LU-7734 lnet: Multi-Rail local NI split

This patch allows the configuration of multiple NIs under one Net.
It is now possible to have multiple NIDs on the same network:
   Ex: <ip1>@tcp, <ip2>@tcp.
This can be configured using the following syntax:
   Ex: tcp(eth0, eth1)

The data structures for the example above can be visualized
as follows

               NET(tcp)
                |
        -----------------
        |               |
      NI(eth0)        NI(eth1)

For more details refer to the Mult-Rail Requirements and HLD
documents

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Id7c73b9b811a3082b61e53b9e9f95743188cbd51
Reviewed-on: http://review.whamcloud.com/18274
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
7 years agoNew tag 2.9.52 2.9.52 v2_9_52 v2_9_52_0
Oleg Drokin [Tue, 24 Jan 2017 05:26:21 +0000 (00:26 -0500)]
New tag 2.9.52

Change-Id: I7fd2714e14825f5966751a6d0a66313c1e3088b5
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8587 utils: Fix incorrect indenting in llapi_hsm_log_ct_progress 70/24570/3
Oleg Drokin [Sun, 1 Jan 2017 18:45:06 +0000 (13:45 -0500)]
LU-8587 utils: Fix incorrect indenting in llapi_hsm_log_ct_progress

gcc6 highlights this case of incorrect indenting:
        if (progress_type == CT_RUNNING)
                rc = llapi_json_add_item(&json_items, "current_bytes",
                                         LLAPI_JSON_BIGNUM, &current);
                if (rc < 0)
                        goto err;

Just add the braces around, though logic-wise it's all fine.

Change-Id: I770857fe2f9ce29817558247ce0987842b8d06b4
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/24570
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
7 years agoLU-8996 kernel: kernel update RHEL6.8 [2.6.32-642.13.1.el6] 78/24878/2
Bob Glossman [Tue, 10 Jan 2017 17:06:03 +0000 (09:06 -0800)]
LU-8996 kernel: kernel update RHEL6.8 [2.6.32-642.13.1.el6]

Update RHEL6.8 kernel to 2.6.32-642.13.1.el6

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3d8ffa55ff050503a69c4db260ac6b915564349a
Reviewed-on: https://review.whamcloud.com/24878
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>
7 years agoLU-8929 lfsck: dumper gets current position properly 69/24869/2
Fan Yong [Tue, 27 Sep 2016 15:12:12 +0000 (23:12 +0800)]
LU-8929 lfsck: dumper gets current position properly

It is normal that the LFSCK iteration has been done when the
dump hanlder found the status as LS_SCANNING_PHASE1, it may
because of race, or the LFSCK failed to update the status.
Under such cases, the dump handler will use the position in
the last checkpoint as the current position. It may be not
100% accurate, but not serious issue.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I672258baa9d0b0aa8ec12249c13b2b147a274ab4
Reviewed-on: https://review.whamcloud.com/24869
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7481 utils: label lustre device correctly 45/24845/3
Hongchao Zhang [Sat, 8 Oct 2016 19:49:33 +0000 (03:49 +0800)]
LU-7481 utils: label lustre device correctly

Currently, the device label will be read before mounting Lustre,
the flags LDD_F_VIRGIN and LDD_F_WRITECONF will be set according
to the label (the corresponding original flags containing in the
lustre_disk_data will be ignored). But the device label could be
changed during mount by the journal recovery, and the device should
be also labeled to indicate the target device is supposed to start.

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

Change-Id: I2df1d81f764a7d1ffa26afb0197d137c057a25e9
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/24845
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8932 lnet: define new network driver ptl4lnd 68/24768/3
Gregoire Pichon [Tue, 13 Dec 2016 13:41:42 +0000 (14:41 +0100)]
LU-8932 lnet: define new network driver ptl4lnd

Assign an ID to the new network driver ptl4lnd developped by Bull
that implements a LND based on Portals 4 API. It is intended to be
used with BXI, the Bull interconnect hardware.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I38e505916899dc7f01b3ad0372c9f068fa06f308
Reviewed-on: https://review.whamcloud.com/24768
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
7 years agoLU-7429 tests: generate dangling name entry properly 63/24763/2
Fan Yong [Sun, 25 Sep 2016 00:24:10 +0000 (08:24 +0800)]
LU-7429 tests: generate dangling name entry properly

There may be some creation after the dangling injection, such as
create ".lustre/lost+found/MDTxxxx" for LFSCK, create some quota
related local files. These creations may reuse the just released
local object/inode that is referenced by the dangling name entry.
That will fail the dangling injection as to the subsequent LFSCK
will not find dangling name entry. So before deleting the target
object for the dangling name entry, remove some other objects to
avoid the target object being reused by some potential creations.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I0e1bb60c1095119e10009fe2a8ce38687e3e7692
Reviewed-on: https://review.whamcloud.com/24763
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4423 ptlrpc: use 64-bit times for ptlrpc_sec 10/24710/3
Arnd Bergmann [Wed, 11 Jan 2017 01:50:19 +0000 (20:50 -0500)]
LU-4423 ptlrpc: use 64-bit times for ptlrpc_sec

Here we use an unsigned long to store the timeout for gc,
which is probably safe until 2106, but this patch converts it
to use ktime_get_real_seconds() and time64_t for consistency.

Linux-commit: 8cc980713ec9e6847896891c54562ad815c33424

Change-Id: I9c66ac818239debe676b78fbee5764cd5b69028c
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24710
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
7 years agoLU-4423 ptlrpc: use 64-bit times in ptlrpc_enc_page_pool 08/24708/2
Arnd Bergmann [Wed, 4 Jan 2017 21:40:12 +0000 (16:40 -0500)]
LU-4423 ptlrpc: use 64-bit times in ptlrpc_enc_page_pool

ptlrpc_enc_page_pool computes time deltas using 'long' values from
get_seconds(). This is probably safe beyond y2038, but it's better
to go use monotonic times and 64-bit here for consistency.

Linux-commit: 80018a9edbc3180ae31a7197f9dacab975a7f5e2

Change-Id: I15511b04d8b4f7353ce109d8d9bb7887f551d880
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24708
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
7 years agoLU-4423 lnet: Better cookie gen 82/24682/6
Tina Ruchandani [Thu, 5 Jan 2017 14:53:30 +0000 (09:53 -0500)]
LU-4423 lnet: Better cookie gen

api-ni.c uses do_gettimeofday to get a 'cookie' or timestamp.
This patch replaces it with ktime_get_ns for the following reasons:

1. ktime_get_ns returns a __u64 which is safer than 'struct timeval'
   which will overflow on 32-bit systems in year 2038 and beyond.
2. Improved resolution: nsecs instead of usecs.
3. Reduced compute: ktime_get_ns is faster than the multiply/add
   combination used in this function

Linux-commit: 9056be30542bfff51190bdda67088f319cf4c9f5

Drop unneeded wrapper function Remove the function
lnet_create_interface_cookie() and replace its call
with the function ktime_get_ns().

Linux-commit: 7bcd831b8579212303ec7c30e975432b914493dc

The ln_interface_cookie is used to ensure that a node can tell whether
the following sequence of events has happened:

node sends GET or PUT to peer
node is rebooted
peer sends REPLY or ACK to node

The ln_interface_cookie is set once, when LNet starts, and remains
unchanged afterwards. To avoid accidentally obtaining the same cookie
after a reboot, the code generated ths cookie using ktime_get_ns().
Once generated, the value of the cookie is not interpreted, only
compared for equality. Olaf Weber reported that due to the use of
ktime_get_ns() a small chance exist of generating a cookie of identical
value across reboots. Using ktime_get_real_ns() removes any chance of
this from happening.

Change-Id: I159a0ff2573afb87f279a8e8f282b0ac076d9bf3
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24682
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.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>
7 years agoLU-4423 libcfs: Use swap() in cfs_hash_bd_order() 76/24576/2
Amitoj Kaur Chawla [Mon, 2 Jan 2017 00:19:16 +0000 (19:19 -0500)]
LU-4423 libcfs: Use swap() in cfs_hash_bd_order()

Use swap() function instead of using a temporary variable for swapping
two variables.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
type T;
T a,b,c;
@@
- a = b;
- b = c;
- c = a;
+ swap(b, c);
//<smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Change-Id: I19aa52fe4e05fed2e03c1d8515731a5ce01b3d09
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24576
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>
7 years agoLU-4315 docs: Fix Makefile.am to have one man page per line 71/24371/4
Steve Guminski [Thu, 15 Dec 2016 15:20:05 +0000 (10:20 -0500)]
LU-4315 docs: Fix Makefile.am to have one man page per line

The man pages for lfs(1) and lctl(8) are quite large. Splitting
them into one page per subcommand will allow for more detailed
information for each subcommand.

This patch modifies the Makefile.am so that the source man pages
are listed one per line.  This will make it easier for subsequent
patches to add new pages.  Existing pages that were missing from
the Makefile.am have been added to it, and an obsolete page has
been removed from the Makefile.am and been deleted.

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: If312fff9bc5e68176caf0a70a51876e69b1614d8
Reviewed-on: https://review.whamcloud.com/24371
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
7 years agoLU-8926 llite: reduce jobstats race window 53/24253/5
Patrick Farrell [Tue, 13 Dec 2016 15:43:34 +0000 (09:43 -0600)]
LU-8926 llite: reduce jobstats race window

In the current code, lli_jobid is set to zero on every call
to lustre_get_jobid.  This causes problems, because it's
used asynchronously to set the job id in RPCs, and some
RPCs will falsely get no jobid set.  (For small IO sizes,
this can be up to 60% of RPCs.)

It would be very expensive to put hard synchronization
between this and every outbound RPC, and it's OK to very
rarely get an RPC without correct job stats info.

This patch only updates the lli_jobid when the job id has
changed, which leaves only a very small window for reading
an inconsistent job id.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I6c3a7f8683dc5f5d467940920938db18b0c20462
Reviewed-on: https://review.whamcloud.com/24253
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
7 years agoLU-8855 llite: return small device numbers for compat stat() 77/23877/3
John L. Hammond [Mon, 21 Nov 2016 15:22:52 +0000 (09:22 -0600)]
LU-8855 llite: return small device numbers for compat stat()

The compat_sys_*stat*() syscalls will fail unless the devices majors
and minors are both less than 256. So in ll_getattr_it(), if we are in
32 bit compat mode then coerce the device numbers in to the expected
format.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1bf13258902e13c76b9ebf3476fd1767712de0b3
Reviewed-on: https://review.whamcloud.com/23877
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8821 mdt: avoid double find in mdt_path_current() 01/23701/2
John L. Hammond [Thu, 12 Nov 2015 15:49:09 +0000 (09:49 -0600)]
LU-8821 mdt: avoid double find in mdt_path_current()

In mdt_path_current() avoid finding the object we are already holding
a reference to.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iae4796047d2c5b02989d29baf2e7620545f7e45c
Reviewed-on: https://review.whamcloud.com/23701
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8066 obdclass: move lustre sysctl to sysfs 28/23428/6
Oleg Drokin [Sun, 1 Jan 2017 19:11:04 +0000 (14:11 -0500)]
LU-8066 obdclass: move lustre sysctl to sysfs

Backport from upstream the changes to port lustre
systctl to sysfs. Needed to re-export the function
lprocfs_read_frac_helper for later work. The
following patches were backported:

Fix class_procfs_init error return value. Dan Carpenter noticed
that procfs conversion patches introduced a bug where should
kobject_create_and_add, an error is not returned from
class_procfs_init.

Linux-commit: 3c4872f94359ed38a1392c0a9238c48a9aee6f8f

Move sysctl timeout to sysfs. This is the first step of
moving lustre sysctls from /proc/sys/lustre to /sys/fs/lustre

Linux-commit: e2424a1265f2772b66f068c205256e2aef5f74a0

Move max_dirty_mb from sysctl to sysfs. max_dirty_mb is
now a parameter in /sys/fs/lustre.

Linux-commit: df476a4d5de09d9324b108fc9c5ff2c00a0850d0

Move debug controls to sysfs. debug_peer_on_timeout,
dump_on_timeout and dump_on_eviction controls from
/proc/sys/lustre to /sys/fs/lustre

Linux-commit: 9e7fa14935901bcd09576b2866d5dd15f69caf83

Move AT controls from sysctl to sysfs. Adaptive Timeouts
controls are being moved from /proc/sys/lustre to
/sys/fs/lustre

Linux-commit: bcef118e7ed67e28edcaab9be9ca11412176c540

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Change-Id: Id1b00bebf9ecca5284e9c71f4c0f91e56cbf391b
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23428
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>
7 years agoLU-4423 ldlm: use 64-bit time for pl_recalc 50/23350/4
Arnd Bergmann [Sun, 1 Jan 2017 16:41:33 +0000 (11:41 -0500)]
LU-4423 ldlm: use 64-bit time for pl_recalc

The ldlm pool calculates elapsed time by comparing the previous and
current get_seconds() values, which is unsafe on 32-bit machines
after 2038.

This changes the code to use time64_t and ktime_get_real_seconds(),
keeping the 'real' instead of 'monotonic' time because of the
debug prints.

Linux-commit: 8f83409cf2382c968f96877368cd5b542b92af1d
Linux-commit: b8cb86fd95bb461c3496e1f4b4083b198c963a9c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I81cca5b529dbf5615cf46461ad1c9179fdee7835
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23350
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>
7 years agoLU-8710 ptlrpc: use current CPU instead of harcoded 0 05/23305/3
Dmitry Eremin [Fri, 21 Oct 2016 12:38:46 +0000 (15:38 +0300)]
LU-8710 ptlrpc: use current CPU instead of harcoded 0

fix crash if CPU 0 disabled.

Change-Id: I8ac5a10f544a1c8fc454bc64a6bb1d3607240be9
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23305
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-8703 libcfs: remove usless CPU partition code 03/23303/3
Dmitry Eremin [Fri, 21 Oct 2016 11:56:31 +0000 (14:56 +0300)]
LU-8703 libcfs: remove usless CPU partition code

 * remove scratch buffer and mutex which guard it.
 * remove global cpumask and spinlock which guard it.
 * remove cpt_version for checking CPUs state change during setup
   because of just disable CPUs state change during setup.
 * remove whole global struct cfs_cpt_data cpt_data.
 * remove few unused APIs.

Change-Id: I0cc853d57952e76cf32801838a19e6872905aaa0
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23303
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-4423 obd: use ktime_t for calculating elapsed time 46/23146/9
Arnd Bergmann [Tue, 10 Jan 2017 23:16:11 +0000 (18:16 -0500)]
LU-4423 obd: use ktime_t for calculating elapsed time

process_param2_config() tries to print how much time has passed
across a call_usermodehelper() function, and uses struct timeval
for that.

We want to remove this structure, so this is better expressed
in terms of ktime_t and ktime_us_delta().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Change-Id: I90c61d9d49ee0d500772f1b370790e37859f18b2
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23146
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>
7 years agoLU-7471 tests: Modified make_custom_file_for_progress fn 46/17346/7
Aditya Pandit [Tue, 24 Nov 2015 09:35:40 +0000 (15:05 +0530)]
LU-7471 tests: Modified make_custom_file_for_progress fn

After executing tests like test_200 and if there is not
enough space the function make_custom_file_for_progress was returning
1 on error but this error was not getting caught properly.
Modified the code to catch the error properly.

Test-Parameters: trivial testlist=sanity-hsm

Seagate-bug-id: MRP-3026
Signed-off-by: Mikhail V. Pridushchenko <mikhail.v.pridushchenko@seagate.com>
Signed-off-by: Aditya Pandit <aditya.pandit@seagate.com>
Change-Id: I0db45e327d6f49d066b5c631096a459b8acd2758
Signed-off-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-on: https://review.whamcloud.com/17346
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-3764 tests: clean up sanity test_116a code style 82/7882/4
Andreas Dilger [Tue, 8 Oct 2013 18:56:06 +0000 (12:56 -0600)]
LU-3764 tests: clean up sanity test_116a code style

Clean up the code style for sanity.sh test_116a():
- proper indentation
- don't use $ for variables inside $((...))
- one statement per line

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5fe502b85365e00ce34b90f8fabfb58320a07e51
Reviewed-on: https://review.whamcloud.com/7882
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Steve Guminski <stephenx.guminski@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9019 osd : remove struct timeval use in osd-ldiskfs 96/24896/2
James Simmons [Fri, 13 Jan 2017 21:39:23 +0000 (16:39 -0500)]
LU-9019 osd : remove struct timeval use in osd-ldiskfs

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

Both osd_write_prep() and osd_read_prep() want to report
the time it took to perform its operations in the
osd_get_page counter. This is currently done with
a call to do_gettimeofday with struct timeval which is
not 2038 safe. Move this operation to 64 bit time
handling.

Change-Id: I457ac799d855d2596220b6e0d0c5039e8b00021f
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24896
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8562 osp: osp_precreate_thread gets stuck after disconnect 58/24758/3
Ned Bass [Sat, 7 Jan 2017 01:43:47 +0000 (17:43 -0800)]
LU-8562 osp: osp_precreate_thread gets stuck after disconnect

osp_precreate_thread() can get stuck because d->opd_got_disconnected
never gets reset. When opd_got_disconnected is set,
osp_precreate_cleanup_orphans() returns early with EAGAIN and can't
clear d->opd_pre_recovering. And because d->opd_pre_recovering can't
be cleared we always break out of the while loop where
d->opd_got_disconnected normally gets reset. So
osp_precreate_cleanup_orphans() is stuck always failing.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I0b4f4e2e55e7a8d7ffae633a4d3c578b4a484ae2
Reviewed-on: https://review.whamcloud.com/24758
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sergey Cheremencev <sergey.cheremencev@seagate.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8840 osp: handle EA cache properly 82/23782/10
Fan Yong [Thu, 22 Sep 2016 08:54:55 +0000 (16:54 +0800)]
LU-8840 osp: handle EA cache properly

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

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I352b99b1ed08f1b15bdb8da2bf28689ae2d61c23
Reviewed-on: https://review.whamcloud.com/23782
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-6245 libcfs: remove wrappers for timer functions 33/23733/4
James Simmons [Tue, 10 Jan 2017 23:21:33 +0000 (18:21 -0500)]
LU-6245 libcfs: remove wrappers for timer functions

Use the linux timer_list api directly instead of going
throught a abstraction layer in libcfs.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ida47b2746e68b7428cbc30b40fbdc8810b7d05f7
Reviewed-on: https://review.whamcloud.com/23733
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8732 tests: lnet-selftest Error inserting modules 50/23250/2
Abrarahmed Momin [Tue, 22 Mar 2016 12:09:47 +0000 (17:39 +0530)]
LU-8732 tests: lnet-selftest Error inserting modules

Prevent locally derived module option MODOPTS_LIBCFS being
passed as part of environment variable to remote nodes.
This issue is more prominent in interop setups that have
different version LIBCFS library supporting different module
parameters.

Test-Parameters: trivial testlist=lnet-selftest
Signed-off-by: Abrarahmed Momin <abrar.habib@seagate.com>
Signed-off-by: Arshad Hussain <arshad.hussain@seagate.com>
Change-Id: Ie56103c55611bb62a7dfb314526c48781ab20bc4
Seagate-bug-id: MRP-2675
Reviewed-by: Ujjwal Lanjewar <ujjwal.lanjewar@seagate.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Reviewed-on: https://review.whamcloud.com/23250
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-9019 lnet: simplify lnet_eq_wait_locked 47/23147/9
James Simmons [Fri, 13 Jan 2017 22:54:34 +0000 (17:54 -0500)]
LU-9019 lnet: simplify lnet_eq_wait_locked

We can simplify the code by taking advantage of the behavior
of schedule_timeout_interruptible(). Instead of testing if
tms is less than zero we can pass in a signed long that
schedule_timeout_interruptible is expecting and for the case
of no timeout we can pass in MAX_SCHEDULE_TIMEOUT.

Change-Id: I15126aab500e975ec34ee270d3a1f9b83cf50902
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/23147
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-6142 lnet: code style cleanups, improve error handling 69/18469/5
James Simmons [Tue, 10 Jan 2017 23:11:34 +0000 (18:11 -0500)]
LU-6142 lnet: code style cleanups, improve error handling

During submission of the dynamic LNet work to the upstream
client Dan Carpenter suggested several improvements and a
few fixes. They are:

1) Rename the goto labels to be more clear.

2) Replace CLASSERT with BUILD_BUG_ON

3) Rework the loops to reduce the code indentation level
   and to make them more clear.

4) Add test to ensure the ioctl data is really smaller
   than what is reported in the ioctl header.

5) Fix one off error in lnet_get_peer_info

6) Handle errors instead of sucesses in lnet_dyn_[un]configure

Change-Id: If003d313ae587fd6311d9dfb419e8c6f59ef4705
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/18469
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-7115 fld: don't retry for no LWP device 41/17041/13
Yang Sheng [Wed, 4 Nov 2015 08:36:37 +0000 (16:36 +0800)]
LU-7115 fld: don't retry for no LWP device

Just try again for LWP import since other client
import may run into deadloop.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: If1759b5ad7daa06abe6231669ad92e006ecb3059
Reviewed-on: https://review.whamcloud.com/17041
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8994 lmv: honour the specified stripe index 77/24777/3
Di Wang [Mon, 9 Jan 2017 15:17:09 +0000 (10:17 -0500)]
LU-8994 lmv: honour the specified stripe index

when creating the striped directory, specified
stripe index should always be used even the parent
has default stripe index.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Ief00af3790282a0887b9d28c581ccf0070cc758f
Reviewed-on: https://review.whamcloud.com/24777
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
7 years agoLU-8753 osp: add rpc generation 64/24364/6
Di Wang [Wed, 14 Dec 2016 22:13:30 +0000 (17:13 -0500)]
LU-8753 osp: add rpc generation

Add rpc generation to make sure current update
request will not be sent until the remote llog
object got refresh.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Iae678686b522d545b69510444805a1e411acfcfe
Reviewed-on: https://review.whamcloud.com/24364
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
7 years agoLU-8871 kernel: kernel upgrade [SLES12 SP2 4.4.21-84] 57/24257/12
Bob Glossman [Thu, 8 Dec 2016 16:49:51 +0000 (08:49 -0800)]
LU-8871 kernel: kernel upgrade [SLES12 SP2 4.4.21-84]

Major linux version upgrade, from linux 3.12 to linux 4.4.
All new ldiskfs and kernel patches.
All new target and config files.

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

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I354197d5426ebde3da6c814bfb7f97f0f04113eb
Reviewed-on: https://review.whamcloud.com/24257
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>
7 years agoLU-4423 ptlrpc: use 64-bit times for ptlrpc sec expiry 09/24709/2
Arnd Bergmann [Wed, 4 Jan 2017 21:41:46 +0000 (16:41 -0500)]
LU-4423 ptlrpc: use 64-bit times for ptlrpc sec expiry

The exp_flvr_expire and imp_sec_expire are defined as 'unsigned long',
which doesn't overflow until 2106, but to be on the safe side, this
changes the code to use time64_t like we do everywhere else.

Linux-commit: 986ef135c2afce959971b0086fc04e0f9f654120

Change-Id: Id1a560504e9a9c673e0880ac4e3e80938b3789bc
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/24709
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
7 years agoLU-8945 ptlrpc : remove userland usage from ptlrpc 96/24396/4
James Simmons [Tue, 27 Dec 2016 15:08:15 +0000 (10:08 -0500)]
LU-8945 ptlrpc : remove userland usage from ptlrpc

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

Test-Parameters: trivial

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

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

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

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

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

The following struct initializers have been updated:

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

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I6533b9cbfd9a98e903ba8e0f5c5d8e725226366d
Reviewed-on: https://review.whamcloud.com/23754
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>