Whamcloud - gitweb
fs/lustre-release.git
9 years agoLU-5875 lnet: return -EEXIST if NI is not unique 56/13056/6
Amir Shehata [Fri, 12 Dec 2014 22:43:03 +0000 (14:43 -0800)]
LU-5875 lnet: return -EEXIST if NI is not unique

Return -EEXIST and not -EINVAL when trying to add a
network interface which is not unique.

Some minor cleanup in api-ni.c

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ic74a768c0e7688ba0e35740e2ca2ac9ae4f999ea
Reviewed-on: http://review.whamcloud.com/13056
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5874 lnet: reject invalid net configuration 12/12912/7
Amir Shehata [Tue, 2 Dec 2014 02:06:39 +0000 (18:06 -0800)]
LU-5874 lnet: reject invalid net configuration

Currently if there exists a route that goes over a
remote net and then this net is added dynamically as
a local net, then traffic stops because the code in
lnet_send() determines that the destination nid
can be reached from another local_ni, but the src_nid
is still stuck on the earlier NI, because the src_nid
is stored in the ptlrpc layer and is not updated
when a local NI is configured.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Idd4ea9e131db127f541dd8d75b90ac509c16e2c3
Reviewed-on: http://review.whamcloud.com/12912
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6025 lctl: remove bad error checking from nodemap_cmd() 91/13191/3
Kit Westneat [Sat, 20 Dec 2014 00:25:31 +0000 (19:25 -0500)]
LU-6025 lctl: remove bad error checking from nodemap_cmd()

There was some error checking that didn't really make sense in
nodemap_cmd() and was causing false errors. memcpy() doesn't have an
error condition, so there's no need to check it.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I58225f8ebb1d8dc0941534503f939b213d57c27f
Reviewed-on: http://review.whamcloud.com/13191
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5767 lfsck: use OUT RPC to create remote orphan parent 72/13172/8
Fan Yong [Wed, 22 Oct 2014 07:00:20 +0000 (15:00 +0800)]
LU-5767 lfsck: use OUT RPC to create remote orphan parent

When the namespace LFSCK tries to repair the missing name entry,
means inserting the lost name entry back to its parent directory,
it may find that the parent MDT-object was also lost. Under such
case, the namespace LFSCK will firstly create the missing parent
MDT-object as an orphan and insert into the
.lustre/lost+found/MDTxxxx/ directory remotely. Then insert the
lost name entry into the orphan parent according to the linkEA.
Originally, the namespace LFSCK uses the LFSCK RPC to handle the
case of creating orphan parent MDT-object on remote MDT. But it
is not the normal way for cross-MDTs modification that usually
is handled via the OUT RPC. This patch replaces the LFSCK RPC
with normal OUT RPC to create orphan parent on remote MDT.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8b192e51f4c159cbf28e266f22ec487a8c6a68f0
Reviewed-on: http://review.whamcloud.com/13172
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: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6018 conf: replace RHEL_KERNEL_VERSION with RHEL_RELEASE_NO 33/13033/3
Minh Diep [Thu, 11 Dec 2014 15:58:54 +0000 (07:58 -0800)]
LU-6018 conf: replace RHEL_KERNEL_VERSION with RHEL_RELEASE_NO

No longer we use kernel version to detect kernel when we
compile ofed compat-rdma. We are using RHEL_RELEASE_NO

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Iab9a316570b61dfecf1c65c5da5e7af6a68601a5
Reviewed-on: http://review.whamcloud.com/13033
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>
9 years agoLU-6002 lnet: startup acceptor thread dynamically 10/13010/5
Amir Shehata [Tue, 13 Jan 2015 01:14:33 +0000 (17:14 -0800)]
LU-6002 lnet: startup acceptor thread dynamically

With DLC it's possible to start up a system with no NIs that require
the acceptor thread, and thus it won't start.  Later on the user
can add an NI that requires the acceptor thread to start, it is
then necessary to start it up.

If the user removes a NI and as a result there are no more
NIs that require the acceptor thread then it should be stopped.
This patch adds logic in the dynamically adding and removing NIs
code to ensure the above logic is implemented.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Iecada597d417dcb8991e9fb98f6844382295246a
Reviewed-on: http://review.whamcloud.com/13010
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5423 llite: pack suppgid to MDS correctly 76/12476/17
Fan Yong [Sat, 27 Sep 2014 15:38:20 +0000 (23:38 +0800)]
LU-5423 llite: pack suppgid to MDS correctly

The ll_lookup_it() may trigger IT_OPEN RPC to open a file by name.
But at that time, the client does not know the target file's GID,
so it cannot pack the necessary supplementary group ID in the RPC.
Because of missing the supplementary group ID, the RPC maybe fail
for open permission check on the MDS. Under such case, MDS should
return the target file's GID, if the current thread on the client
in the right group (according to the file's GID), the client will
try the IT_OPEN RPC again with the right supplementary group ID.

This patch is also helpful if some other(s) changed the file's GID
after current RPC sent to the MDS with the suppgid as the original
GID by race.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icaf1ae72b64a27c64c42830d231bae4bca4acb66
Reviewed-on: http://review.whamcloud.com/12476
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6020 kerberos: checksum errors when using kerberos 76/13076/2
Andrew Perepechko [Mon, 15 Dec 2014 21:54:34 +0000 (00:54 +0300)]
LU-6020 kerberos: checksum errors when using kerberos

derive_key_lucid() uses krb5int_derive_key() to
construct the requested key. However, in the
end it copies the key from kout keyblock, whereas
the derive function puts it into key_out. The
original code contains the invalid assumption
that krb5_k_create_key() binds the newly created
key to the keyblock which was used to create it.

Xyratex-bug-id: SNT-15
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Change-Id: Id2f28b4a9ca3909861a703f2ce07ed860087e809
Reviewed-on: http://review.whamcloud.com/13076
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>
9 years agoLU-5971 llite: merge ccc_io and vvp_io 51/13351/2
John L. Hammond [Mon, 12 Jan 2015 18:55:36 +0000 (12:55 -0600)]
LU-5971 llite: merge ccc_io and vvp_io

Move the contents of struct vvp_io into struct ccc_io, delete the
former, and rename the latter to struct vvp_io. Rename various ccc_io
related functions to use vvp rather than ccc.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I6200f1a5ff4d639d547bd45f91e146dbcc80fe6d
Reviewed-on: http://review.whamcloud.com/13351
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5971 llite: remove struct ll_ra_read 47/13347/2
John L. Hammond [Mon, 12 Jan 2015 14:26:17 +0000 (08:26 -0600)]
LU-5971 llite: remove struct ll_ra_read

Remove the unused function ll_ra_read_get(). This makes the struct
ll_ra_read members lrr_reader and lrr_linkage and the struct
ll_readahead_state member ras_read_beads unnecessary so remove them.
In struct vvp_io replace the struct ll_ra_read cui_bead member with
cui_ra_start and cui_ra_count.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id54ad063d917fb9e13a6708a87c940450c4af506
Reviewed-on: http://review.whamcloud.com/13347
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6101 osd: zfs-osd should convert hash 40/13340/3
Alex Zhuravlev [Sun, 11 Jan 2015 12:14:26 +0000 (15:14 +0300)]
LU-6101 osd: zfs-osd should convert hash

externally applied hash should be converted properly.

Change-Id: I91417e1067620ef271b4db5454e39d5e74bda514
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/13340
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6105 build: Update SPL/ZFS version to 0.6.3-1.2 22/13322/4
Nathaniel Clark [Fri, 9 Jan 2015 19:44:37 +0000 (14:44 -0500)]
LU-6105 build: Update SPL/ZFS version to 0.6.3-1.2

Update to latest release of ZFS & SPL:
Includes fixes compatibility with kernels up through 3.17 and fixes
SPL mutex_exit races.

Also address redefinition of SHRINK_STOP between SPL and Lustre.  Both
use the same numeric value -1 but in ways that cause gcc to complain.

Test-Parameters: mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2ba0119d3535beb3bae1b47021c5a167ce25e129
Reviewed-on: http://review.whamcloud.com/13322
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6026 tests: modify sanity-sec use right LNET, flush locks 35/13235/6
Kit Westneat [Mon, 5 Jan 2015 05:12:47 +0000 (00:12 -0500)]
LU-6026 tests: modify sanity-sec use right LNET, flush locks

There were a couple of spots in sanity-sec that had the @tcp LNET type
hardcoded in. This caused it to fail on other LNET networks, like
o2ib. This patch uses the $NETTYPES variable to determine the correct
NID.

There is also a chance that the client will not flush its locks prior
to doing the nodemap tests. This patch adds a line to force a flush.

Test-Parameters: alwaysuploadlogs nettypes=o2ib testlist=sanity-sec
Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I68c6400217100939c171ad3707ed834c98a7755a
Reviewed-on: http://review.whamcloud.com/13235
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-6034 lnet: add default case for check summing 92/13092/7
James Simmons [Wed, 7 Jan 2015 18:32:23 +0000 (13:32 -0500)]
LU-6034 lnet: add default case for check summing

To avoid breaking backwards ioctl compatiability
this patch adds data fields to ioctl data structures
to report the check summing algorithims supported

Change-Id: Idb5fd6633a7f7c2e04bb582f122d625dd95afb25
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/13092
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5732 hsm: complementary testsuite for user HSM API 36/12836/7
Frank Zago [Thu, 9 Oct 2014 00:56:08 +0000 (19:56 -0500)]
LU-5732 hsm: complementary testsuite for user HSM API

A few tests for the userspace Lustre HSM API. Tests
registration, archiving, progress report amd HSM state
of files.

Change-Id: I64ba3361d6a7b768b133b584e551724cf2c5bee2
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/12836
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5565 osd-ldiskfs: handle non-existing objects 08/12608/6
John L. Hammond [Mon, 10 Nov 2014 18:11:50 +0000 (12:11 -0600)]
LU-5565 osd-ldiskfs: handle non-existing objects

In the DT API method implementations in lustre/osd/osd_ldiskfs.c
replace assertions that the object exists (or does not exist) with
appropriate error returns.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If346861eb352efaf0b90a8e7778e8fbb3cf16bf0
Reviewed-on: http://review.whamcloud.com/12608
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>
9 years agoLU-4648 ldiskfs: delete external EA in another transaction 81/8881/14
Bobi Jam [Thu, 16 Jan 2014 15:26:08 +0000 (23:26 +0800)]
LU-4648 ldiskfs: delete external EA in another transaction

The transaction credit of ldiskfs_delete_inode() does not count in
the external EA inodes deletion, which could lead to transaction
credit deficiency.

This patch collect the inode's xattr inodes and put them to orphan
list, and later delete them in another transaction after deleting the
main inode.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Id9a64e4232e450b2628de9be323aeb65389209ce
Reviewed-on: http://review.whamcloud.com/8881
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6085 mdt: return valid attribute only to client 44/13344/3
Jinshan Xiong [Mon, 12 Jan 2015 07:50:13 +0000 (23:50 -0800)]
LU-6085 mdt: return valid attribute only to client

In mdt_pack_attr2body(), it didn't check the valid bit of lu_attr.
This causes that clients see different file type.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib79f868205918a52f66c619d80468c4637b99bb5
Reviewed-on: http://review.whamcloud.com/13344
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6091 llite: glimpse the inode before doing fiemap 80/13280/3
Li Dongyang [Thu, 8 Jan 2015 00:02:24 +0000 (11:02 +1100)]
LU-6091 llite: glimpse the inode before doing fiemap

For a new inode, the i_size is 0 until a stat, which will yield
an empty fiemap result.
Fix the issue by glimpsing the size before doing fiemap.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Change-Id: I072fd1f5e13c7fd127199a10b44366aed145b8e1
Reviewed-on: http://review.whamcloud.com/13280
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4181 lnet_selftest: bogus lst errors 79/13279/3
Isaac Huang [Wed, 7 Jan 2015 22:05:39 +0000 (15:05 -0700)]
LU-4181 lnet_selftest: bogus lst errors

It should not be counted as errors if a test RPC
has been stopped due to administrative actions,
e.g. lst end_session from the remote test console.

Change-Id: Ia35f5e357ce6bf7ad57efb3652ebb27c772ac611
Signed-off-by: Isaac Huang <he.huang@intel.com>
Reviewed-on: http://review.whamcloud.com/13279
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6110 build: Fix autogen.sh failure 45/13345/2
Yan Burman [Mon, 12 Jan 2015 09:22:36 +0000 (11:22 +0200)]
LU-6110 build: Fix autogen.sh failure

commit bca975c7fa261ffb926e8a18d5869b886c65f447
removed lustre/include/linux,
but failed to do so in all relevant places,
thus running autogen.sh fails:
configure.ac:24: required file `lustre/include/linux/Makefile.in' not
found

Fix by removing lustre/include/linux from m4 file

Signed-off-by: Yan Burman <yanb@mellanox.com>
Change-Id: I9fccbe5895779dfd1bab66341aa6b094e33f604f
Reviewed-on: http://review.whamcloud.com/13345
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6099 lnet: correct YAML output 04/13304/2
Amir Shehata [Fri, 9 Jan 2015 00:53:06 +0000 (16:53 -0800)]
LU-6099 lnet: correct YAML output

Currently when dumping out network configuration the parameter
CPT describes which cpu partitions the network is configured on.
The current output looks like:
CPT = [0,1,...]
however the library used to parse YAML doesn't accept the use of
'[', so now I enclose it in double quotes:
CPT = "[0,1,...]"

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ib15b2bc7db9463875ee0414ef614d71a42039fbb
Reviewed-on: http://review.whamcloud.com/13304
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-1453 scrub: rename confused name full_scrub_speed 58/12958/9
Fan Yong [Sun, 28 Sep 2014 12:34:42 +0000 (20:34 +0800)]
LU-1453 scrub: rename confused name full_scrub_speed

Such name means if the rate of auto detected inconsistent
OI mappings exceeds the specified threshold, then trigger
OI scrub to scan the whole device. To avoid confusion,
rename it as full_scrub_threshold_rate.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I331fcd60c01828f5b689f4d1dc4601f38c3e9cf4
Reviewed-on: http://review.whamcloud.com/12958
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 all: use NULL instead of 0 67/12567/7
Frank Zago [Mon, 29 Sep 2014 02:00:59 +0000 (21:00 -0500)]
LU-5396 all: use NULL instead of 0

It is preferable to use NULL instead of 0 for pointers. This fixes sparse
warnings such as:

  lustre/fld/fld_request.c:126:17: warning: Using plain integer as NULL pointer

The second parameter of class_match_param() was changed to a const, to
be able to remove a cast in one user, to prevent splitting a long
line. No other code change.

Change-Id: Icc7b46cef32685c942f5af970d1610467fee4496
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/12567
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: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 lod: (and mdt, mgs) make some symbols static 23/12223/12
Frank Zago [Tue, 23 Dec 2014 02:25:54 +0000 (21:25 -0500)]
LU-5396 lod: (and mdt, mgs) make some symbols static

Some functions and variables are only used in their C file, so reduce
their scope. This reduces the code size, and fixes sparse warnings
such as:

   warning: symbol 'proc_lnet_routes' was not declared.
       Should it be static?
   warning: symbol 'proc_lnet_routers' was not declared.
       Should it be static?

Some prototypes were removed from C files and added to the proper
header.

Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: I48d5e51f6f7de030f332bc99b3be3a06ed5b10e1
Reviewed-on: http://review.whamcloud.com/12223
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: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lustre: remove lustre/include/linux/ 71/13271/2
John L. Hammond [Tue, 6 Jan 2015 15:38:23 +0000 (09:38 -0600)]
LU-2675 lustre: remove lustre/include/linux/

Merge the contents of lustre/include/linux/lvfs.h into
lustre/include/lvfs.h. Merge lustre/include/linux/lustre_user.h into
lustre/include/lustre/lustre_user.h. Move lustre_compat25.h and
lustre_patchless_compat.h from lustre/include/linux/ to
lustre/include/ and rename lustre_compat25.h to lustre_compat.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I217d3c9b2369b469f95f916becafbfe674fed3ef
Reviewed-on: http://review.whamcloud.com/13271
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6066 lfsck: handle file's nlink attribute properly 81/13181/2
Fan Yong [Thu, 9 Oct 2014 16:05:33 +0000 (00:05 +0800)]
LU-6066 lfsck: handle file's nlink attribute properly

If the LFSCK does not know whether the file's linkEA is valid
or not, then it should not use the linkEA to verify the file's
nlink attribute.

If the file has been removed during the LFSCK, the LFSCK should
skip the file's nlink attribute verification.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I13deedce369f8c76ed97bc0bd29e00c82b1e89ff
Reviewed-on: http://review.whamcloud.com/13181
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5275 lprocfs: reduce scope of params_tree.h 25/13225/3
John L. Hammond [Wed, 31 Dec 2014 17:38:14 +0000 (11:38 -0600)]
LU-5275 lprocfs: reduce scope of params_tree.h

Only include libcfs/params_tree.h for kernel builds. Eliminate the
include cycle between libcfs.h and params_tree.h. Remove nonsensical
stub definitions for struct file, struct inode, and others. Remove
several uses of PDE() by modifying LPROCFS_ENTRY_CHECK() to accept a
struct inode * rather than a struct proc_dir_entry *. Correct several
nop uses of LPROCFS_ENTRY_CHECK().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib70575b05366565c95c1db857023c5481325308a
Reviewed-on: http://review.whamcloud.com/13225
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5934 mdt: faulty assertion in mdt_intent_reint 79/13179/2
Liang Zhen [Wed, 24 Dec 2014 05:52:43 +0000 (13:52 +0800)]
LU-5934 mdt: faulty assertion in mdt_intent_reint

mdt_intent_reint() may set lhc::mlh_reg_lh for resent request,
which means lhc::mlh_reg_lh can be a valid lock handle when
processing of resent request failed and assert(rc == 0) is faulty.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I65628d6585cfcec94b820ab631bd391fe77186f2
Reviewed-on: http://review.whamcloud.com/13179
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5678 o2iblnd: connection refcount fix for kiblnd_post_rx 52/12852/3
Liang Zhen [Tue, 25 Nov 2014 15:57:49 +0000 (23:57 +0800)]
LU-5678 o2iblnd: connection refcount fix for kiblnd_post_rx

kiblnd_post_rx() can't refer to rx::rx_conn anymore after
ib_post_recv() because this rx can be polled out by another thread
which may drop this rx and destroy rx::rx_conn.

This patch fixes this issue by taking an extra refcount on connection
before calling ib_post_recv().

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I100f186ea372b1e8aa46eb18a5e29b31b2cdd9a7
Reviewed-on: http://review.whamcloud.com/12852
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 lnet: make some functions static 06/12206/15
Frank Zago [Sun, 7 Sep 2014 15:50:03 +0000 (10:50 -0500)]
LU-5396 lnet: make some functions static

Some functions and variables are only used in their C file, so reduce
their scope. This reduces the code size, and fixes sparse warnings
such as:

  warning: symbol 'proc_lnet_routes' was not declared.
      Should it be static?
  warning: symbol 'proc_lnet_routers' was not declared.
      Should it be static?

Some prototypes were removed from C files and added to the proper
header.

Change-Id: I6b0c527d64ea9e3394cc686699d2e75eec5c16a2
Signed-off-by: Frank Zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/12206
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoRevert "LU-5570 lnet: check router aliveness timestamp" 02/13302/2
Oleg Drokin [Fri, 9 Jan 2015 01:34:32 +0000 (01:34 +0000)]
Revert "LU-5570 lnet: check router aliveness timestamp"

Liang mentions that the rebase is unclean and as such is buggy.

This reverts commit 339c7b2b784a528f41c432e9b90285d3445b7536.

Change-Id: I851e7762b27586fc72821300bfd77e88c1f53171
Reviewed-on: http://review.whamcloud.com/13302
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6079 lnet: remove asm/irq.h include 29/13229/3
Alex Zhuravlev [Sat, 3 Jan 2015 11:09:48 +0000 (14:09 +0300)]
LU-6079 lnet: remove asm/irq.h include

no need to include it.

Change-Id: Idc416cb241b6b3443c784510677b1ef556a42940
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/13229
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5478 llite: get rid of obd_* typedefs 43/13143/3
Dmitry Eremin [Fri, 19 Dec 2014 13:28:54 +0000 (16:28 +0300)]
LU-5478 llite: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 2 in series: modify llite

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Idfa717f29cb47e4dd8c05cc956be3fb883cb1ba7
Reviewed-on: http://review.whamcloud.com/13143
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-5971 llite: rename ccc_lock to vvp_lock 88/13088/2
John L. Hammond [Tue, 16 Dec 2014 15:42:51 +0000 (09:42 -0600)]
LU-5971 llite: rename ccc_lock to vvp_lock

Rename struct ccc_lock to struct vvp_lock and merge the CCC lock
methods into the VVP lock methods.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I46b4190b5085c8eeb137c7250c38bfa9a49fe7d7
Reviewed-on: http://review.whamcloud.com/13088
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5971 llite: rename ccc_page to vvp_page 86/13086/2
John L. Hammond [Tue, 16 Dec 2014 15:01:48 +0000 (09:01 -0600)]
LU-5971 llite: rename ccc_page to vvp_page

Rename struct ccc_page to struct vvp_page and remove obsolete CCC page
methods.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie45b23230fdaed5c3004e73d1faf5d6a4af32447
Reviewed-on: http://review.whamcloud.com/13086
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6030 ldiskfs: cleanup ldiskfs_journal_dirty_metadata 67/13067/4
Yang Sheng [Mon, 15 Dec 2014 08:24:24 +0000 (16:24 +0800)]
LU-6030 ldiskfs: cleanup ldiskfs_journal_dirty_metadata

ldiskfs_journal_dirty_meatdata only exist in ext3 code.
In the ext4 ldiskfs_handle_dirty_metadata instead of it.
As we won't support ext3 any more, Cleanup its usage
from ldiskfs & osd.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I7a1f65bd41fb552cb099831fc0254926ae5c2df3
Reviewed-on: http://review.whamcloud.com/13067
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5759 tests: use lfs getstripe -M instead of get_mds_num 63/12363/14
Andreas Dilger [Wed, 7 Jan 2015 01:37:06 +0000 (17:37 -0800)]
LU-5759 tests: use lfs getstripe -M instead of get_mds_num

The get_mds_num() helper function returned the MDS facet number,
but now that can be done via "lfs getdirstripe -M".

Remove this function and fix the few callers to use
"lfs getstripe -M" and create test directory with -c1
flag to prevent directory striping.

Fix some coding style issues in the affected functions.

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs \
ostfilesystemtype=ldiskfs mdtcount=1 testlist=replay-dual

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs \
ostfilesystemtype=ldiskfs mdtcount=1 testlist=sanity

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I35d2ad5d859190c0292d3cc09df23fec40165751
Reviewed-on: http://review.whamcloud.com/12363
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5648 ofd: Reject precreate requests below last_id 68/12068/4
Oleg Drokin [Fri, 26 Sep 2014 02:47:19 +0000 (22:47 -0400)]
LU-5648 ofd: Reject precreate requests below last_id

Such requests are a sure sign that MDS idea about precreated
objects for us is invalid. If we don't reject it here, objects
would be potentially doubly used by multiple files.

Change-Id: I633081d3768104009e1d5e9392cdfbb79f2fd221
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/12068
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>
9 years agoLU-1706 build: Fixes for debian build system with Ubuntu 12.04+ 29/13129/8
Blake Caldwell [Mon, 22 Dec 2014 08:07:06 +0000 (03:07 -0500)]
LU-1706 build: Fixes for debian build system with Ubuntu 12.04+

Propagate values from autoconf (LINUX, LINUXRELEASE, LINUX_OBJ)
to the debian build system to correctly identify kernel sources
(--with-linux) and objects (--with-linux-obj). The 'make debs'
target previously used KERNEL_VERSION, which does not get set
anymore.

Other fixes for building debs with Ubuntu 12.04+:
 1) Add module-assistant to Build-Depends in debian/control
 2) Omit copying lustre-*-orig.tar.gz and lustre-*.diff.gz files
    since this is the upstream source
 3) Change debhelper compatibility level to 7 (10.04+)
 4) Use dh_prep instead of dh_clean -k
 5) avoid non-functional --disable-zerocopy configure option
 6) do not try to install lc_common script that is
    only in server builds

Signed-off-by: Blake Caldwell <blakec@ornl.gov>
Change-Id: I9787bac687d26b03c4d1204347240624bfaced96
Reviewed-on: http://review.whamcloud.com/13129
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6080 utils: copytool to also unregister FIFO upon signal 36/13236/2
Bruno Faccini [Mon, 5 Jan 2015 16:42:05 +0000 (17:42 +0100)]
LU-6080 utils: copytool to also unregister FIFO upon signal

Copytool should also call llapi_hsm_unregister_event_fifo() upon
termination signal handling, to close FIFO and also unlink it if
transient.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I61add8719004a3126aee82accb0bf1267d8eb612
Reviewed-on: http://review.whamcloud.com/13236
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5751 libcfs: check mask returned by cpumask_of_node 07/13207/2
Liang Zhen [Tue, 30 Dec 2014 15:44:11 +0000 (23:44 +0800)]
LU-5751 libcfs: check mask returned by cpumask_of_node

cpumask_of_node can return NULL if NUMA node is unavailable,
in this case cfs_node_to_cpumask will try to copy from NULL
and cause kernel panic.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Ia866c80a5cf5eaba76e392daa77a572fd427d18c
Reviewed-on: http://review.whamcloud.com/13207
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5577 obd: change type of cl_conn_count to size_t 25/13125/3
Dmitry Eremin [Thu, 11 Sep 2014 18:45:11 +0000 (22:45 +0400)]
LU-5577 obd: change type of cl_conn_count to size_t

Change type of cl_conn_count to size_t.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iac5410f0b96b63f79b7a85e2a9d61cc031919189
Reviewed-on: http://review.whamcloud.com/13125
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6045 lnet: return appropriate errno when adding route 16/13116/2
Amir Shehata [Thu, 18 Dec 2014 03:31:54 +0000 (19:31 -0800)]
LU-6045 lnet: return appropriate errno when adding route

When adding route it ignored specific scenarios, namely:
1. route already exists
2. route is on a local net
3. route is unreacheable

This patch returns the appropriate return codes from the lower level
function lnet_add_route(), and then ignores the above case from the
calling function, lnet_parse_route().  This is needed so we don't
halt processing routes in the module parameters.

However, we can now add routes dynamically, and it should be returned
to the user whether adding the requested route succeeded or failed.

In userspace it is determined whether to continue adding routes or to
halt processing.  Currently "lnetctl import < config" continues
adding the rest of the configuration and reports at the end which
operations passed and which ones failed.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ie5367cae74e2b30fc29c33c46d31e11a1629bb5a
Reviewed-on: http://review.whamcloud.com/13116
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5935 lnet: Fixes to make lnetctl function as expected. 82/12782/11
James Simmons [Mon, 15 Dec 2014 22:20:31 +0000 (17:20 -0500)]
LU-5935 lnet: Fixes to make lnetctl function as expected.

During testing of the lnetctl utility I ran into some
issues. One of the problems is when you print out help
for peer_credits you get help for stats. With this patch
the help option for peer_credits is set to return the
proper help message.

The second problem was for grabbing stats data. No data
was returned but instead it reported a error. The reason
for this is that libcfs_ioctl_getdata() test to see if the
size of the data passed in is less than the struct
libcfs_ioctl_data in size. For the stats function its
data structure struct lnet_ioctl_lnet_stats is smaller
than what is allowed. Instead of checking if the data
is less than libcfs_ioctl_data in size we check to ensure
that the data is not smaller than the ioctl hdr data which
is universal.

The bug in libcfs_ioctl_getdata() exposed a bunch of cases
with new ioctls that don't check to see if the data imported
from userland equals the size reported in the ioctl hdr
data. We address those cases in this patch as well.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib5abc288d94b0f93549312a3fe283cbb8205febf
Reviewed-on: http://review.whamcloud.com/12782
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6059 llite: unlock inode size in ll_lov_setstripe_ea_info() 67/13167/3
John L. Hammond [Mon, 22 Dec 2014 15:46:54 +0000 (09:46 -0600)]
LU-6059 llite: unlock inode size in ll_lov_setstripe_ea_info()

In ll_lov_setstripe_ea_info() release the inode size lock on all
appropriate exit paths.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iba3bd560db0c7a718721d40da447126405ab0858
Reviewed-on: http://review.whamcloud.com/13167
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
9 years agoLU-5734 lnet: improve clean up code and API 58/12658/13
Amir Shehata [Mon, 10 Nov 2014 19:56:52 +0000 (11:56 -0800)]
LU-5734 lnet: improve clean up code and API

This patch addresses a set of related issues: LU-5734, LU-5839,
LU-5849, LU-5850.

Create the local lnet_startup_lndni() API.  This function starts
up one LND.  lnet_startup_lndnis() calls this function in a loop
on every ni in the list passed in.  lnet_startup_lndni() is
responsible for cleaning up after itself in case of failure.
It calls lnet_free_ni() if the ni fails to start.  It calls
lnet_shutdown_lndni() if it successfully called the
lnd startup function, but fails later on.

lnet_startup_lndnis() also cleans up after itself.
If lnet_startup_lndni() fails then lnet_shutdown_lndnis() is
called to clean up all nis that might have been
started, and then free the rest of the nis on the list
which have not been started yet.

To facilitate the above changes lnet_dyn_del_ni() now
manages the ping info.  It calls lnet_shutdown_lndni(),
to shutdown the NI.  lnet_shutdown_lndni() is no longer
an exposed API and doesn't manage the ping info, making
it callable from lnet_startup_lndni() as well.

There are two scenarios for calling lnet_startup_lndni()

1. from lnet_startup_lndnis()
If lnet_startup_lndni() fails it requires to shutdown the ni
without doing anything with the ping information as it hasn't
been created yet.

2. from lnet_dyn_add_ni()
As above it will shutdown the ni, and then lnet_dyn_add_ni() will
take care of managing the ping info

The second part of this change is to ensure that the LOLND is not
added by lnet_parse_networks(), but the caller which needs to do
it (IE: LNetNIInit)

This change ensures that lnet_dyn_add_ni() need only check if there is
only one net that's being added, if not then it frees everything,
otherwise it proceeds to startup the requested net.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I8bf1d93b7afa31c6f7f25733516f6a5c175c6c9d
Reviewed-on: http://review.whamcloud.com/12658
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6056 tests: fix -hsm wrong usage of bash's local built-in 59/13159/3
Bruno Faccini [Fri, 19 Dec 2014 22:42:05 +0000 (23:42 +0100)]
LU-6056 tests: fix -hsm wrong usage of bash's local built-in

In sanity-hsm test script, there were several places where the
bash's local built-in was used with assignments from a command
substitution and command's exit code was tested after.

This is a wrong usage since the 'local' builtin does not propagate
the exit code.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I4257e55ec61ed0c4e48812407b5cf82ab316b701
Reviewed-on: http://review.whamcloud.com/13159
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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>
9 years agoLU-6048 kernel: kernel update [RHEL7 3.10.0-123.13.2.el7] 53/13153/5
Bob Glossman [Thu, 18 Dec 2014 17:41:39 +0000 (09:41 -0800)]
LU-6048 kernel: kernel update [RHEL7 3.10.0-123.13.2.el7]

update RHEL7 kernel to 3.10.0-123.13.2.el7

Test-Parameters: clientdistro=el7 mdsfilesystemtype=ldiskfs\
        mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0dba7339527054c731fd7887cb2d01fde681cfad
Reviewed-on: http://review.whamcloud.com/13153
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5971 llite: rename ccc_object to vvp_object 77/13077/2
John L. Hammond [Mon, 15 Dec 2014 23:18:40 +0000 (17:18 -0600)]
LU-5971 llite: rename ccc_object to vvp_object

Rename struct ccc_object to struct vvp_object and merge the CCC object
methods into the VVP object methods.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iadb4ef84b430f6423312d27e4e95fbcd77af33b1
Reviewed-on: http://review.whamcloud.com/13077
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5971 llite: rename ccc_device to vvp_device 75/13075/4
John L. Hammond [Mon, 15 Dec 2014 20:25:41 +0000 (14:25 -0600)]
LU-5971 llite: rename ccc_device to vvp_device

Rename struct ccc_device to struct vvp_device and merge the CCC device
methods into the VVP device methods.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ifb7c8c0fc7416c56b8bbafa969a52dc4d4db654e
Reviewed-on: http://review.whamcloud.com/13075
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4178 tests: increase sanity-hsm wait_request_state tiemout 06/13206/2
John L. Hammond [Tue, 30 Dec 2014 15:01:58 +0000 (09:01 -0600)]
LU-4178 tests: increase sanity-hsm wait_request_state tiemout

In the sanity-hsm.sh utility function wait_request_state() increase
the wait_result timeout from 100 seconds to 200.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4fd2734d7d178cbfa3b881b725e3b5aff7ab603e
Reviewed-on: http://review.whamcloud.com/13206
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6073 tests: use sys/xattr.h in tests/*.c 97/13197/2
John L. Hammond [Mon, 29 Dec 2014 16:42:57 +0000 (10:42 -0600)]
LU-6073 tests: use sys/xattr.h in tests/*.c

In lustre/tests/{multiop,orphan_linkea_check}.c include sys/xattr.h
rather than attr/xattr.h since the former is more likely to be
installed that the latter and provides the needed declarations.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I79b49233ab42566c8084c2070d0d75a6508656dc
Reviewed-on: http://review.whamcloud.com/13197
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Blake Caldwell <blakec@ornl.gov>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 build: remove obsolete Kernelenv files 96/13196/2
John L. Hammond [Mon, 29 Dec 2014 16:18:07 +0000 (10:18 -0600)]
LU-2675 build: remove obsolete Kernelenv files

Remove the obsolete Kernelenv.{in,mk} files from libcfs/ and lnet/.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I778b00c3c4b315d9811f594d2b99457a83b696c7
Reviewed-on: http://review.whamcloud.com/13196
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5946 lprocfs: cleanup stats locking code 72/12872/2
Andreas Dilger [Thu, 27 Nov 2014 23:48:33 +0000 (16:48 -0700)]
LU-5946 lprocfs: cleanup stats locking code

Add comment blocks on lprocfs_stats_lock() and lprocfs_stats_unlock().
Move common NOPERCPU code out of the switch() statements to reduce
code size and complexity, since it doesn't depend on the opc at all.

Replace switch() in lprocfs_stats_unlock() with a simple if/else,
since the lock opc was already checked in lprocfs_stats_lock().

Add an enum for the lprocfs_stats_lock() operations to make it clear
what the valid values are and allow compiler checking.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1906d44981c025964d6a510000b217f10ca23031
Reviewed-on: http://review.whamcloud.com/12872
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5577 osc: change cl_extent_tax and *grants to unsigned 86/12386/6
Dmitry Eremin [Wed, 5 Nov 2014 01:39:12 +0000 (20:39 -0500)]
LU-5577 osc: change cl_extent_tax and *grants to unsigned

Change the type accordant usage and remove warnings.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iaaf45b3634a6d3667c0481c9e76c5ee69964c48c
Reviewed-on: http://review.whamcloud.com/12386
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.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>
9 years agoLU-5570 lnet: check router aliveness timestamp 48/11748/9
Liang Zhen [Thu, 11 Dec 2014 20:53:31 +0000 (15:53 -0500)]
LU-5570 lnet: check router aliveness timestamp

In current LNet, peer aliveness timestamp is only recorded for peers
on routers, this patch will change this and also record aliveness of
routers on regular nodes, so lnet can check aliveness timestamp of
routers before sending message, avoid to choose router which has old
aliveness timestamp and can be potentially dead or congested.

Another change in this patch is, when lnet got a remote message from
router, it will update remote NI status of router, in this case, lnet
can get up-to-date aliveness informaiton without waiting to the next
RC ping.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I305ba684ced231a87656458382966aeb8ff7ba48
Reviewed-on: http://review.whamcloud.com/11748
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5928 obdclass: fix export of nodemap to procfs 75/13175/3
Dmitry Eremin [Tue, 23 Dec 2014 13:43:59 +0000 (16:43 +0300)]
LU-5928 obdclass: fix export of nodemap to procfs

Rewrite export code of nodemaps to use nid_stats instead of
exp directly like is done for other members.

Clean up redundant code.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ib3ddeabcb1c132eb1b91a0cf9583cc0f74a61e5d
Reviewed-on: http://review.whamcloud.com/13175
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6043 lnet: Fix YAML FSM and other cleanup 15/13115/2
Amir Shehata [Thu, 18 Dec 2014 02:34:00 +0000 (18:34 -0800)]
LU-6043 lnet: Fix YAML FSM and other cleanup

1. Fixed the FSM to be able to parse lnetctl YAML output properly
2. Don't print out elements which are not configured
3. Minor static analysis cleanup (LU-6021)

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I0e7812775a3c718882f0845c71ac7fb2fa46d1b0
Reviewed-on: http://review.whamcloud.com/13115
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.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>
9 years agoLU-5781 osc: osc_lock_weight endless loop fix 62/12362/3
Jinshan Xiong [Thu, 6 Nov 2014 18:00:32 +0000 (10:00 -0800)]
LU-5781 osc: osc_lock_weight endless loop fix

With huge number of pages to scan by osc_lock_weight() it is likely
CLP_GANG_RESCHED is returned from osc_page_gang_lookup() and the scan
will be repeated again from the start. To be sure that the scan is
progressing across those restarts, next scan should be started from
the last scanned page index plus one.

Xyratex-bug-id: MRP-2145
Change-Id: I60775f2d8f688029d97ad4fe64f9b2698ed278c8
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/12362
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4259 osd-zfs: Add brw_stats collection and display 67/11467/4
Nathaniel Clark [Tue, 16 Dec 2014 15:11:09 +0000 (10:11 -0500)]
LU-4259 osd-zfs: Add brw_stats collection and display

Collect stats consistant with brw_stats where possible for osd-zfs.
The supported stats are: (prefixed with BRW_R and BRW_W)
 * PAGES
 * RPC_HIST
 * IO_TIME (reads only)
 * DISK_IOSIZE
 * DISCONTINOUS PAGES (only meaningful for writes, always single
buffer for reads)

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Icd0d703d3cf31487cdfa524613cfc550db228dba
Reviewed-on: http://review.whamcloud.com/11467
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agonew tag 2.6.92 2.6.92 v2_6_92 v2_6_92_0
Oleg Drokin [Fri, 2 Jan 2015 17:54:25 +0000 (12:54 -0500)]
new tag 2.6.92

Change-Id: If6d3f1f589179aa930d3bb59f38b86ceaf583f9f

9 years agoLU-6069 kernel: kernel update [SLES11 SP3 3.0.101-0.46] 86/13186/3
Bob Glossman [Wed, 24 Dec 2014 22:35:41 +0000 (14:35 -0800)]
LU-6069 kernel: kernel update [SLES11 SP3 3.0.101-0.46]

Update target and config files for new version
Revision of the ldiskfs patch series for only sles11sp3 is included.
It is no longer the same as the sp2 series.

Test-Parameters: envdefinitions=SANITY_EXCEPT=170\
 mdsdistro=sles11sp3 ossdistro=sles11sp3\
 clientdistro=sles11sp3 mdsfilesystemtype=ldiskfs\
 mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I9a20662339ca9c95a4bfabd182d43aba3c4443ea
Reviewed-on: http://review.whamcloud.com/13186
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6076 tests: skip sanity/124a if necessary 22/13222/2
Nathaniel Clark [Wed, 31 Dec 2014 17:06:32 +0000 (12:06 -0500)]
LU-6076 tests: skip sanity/124a if necessary

If prior tests haven't been run, this test will fail, so safely skip
it.

Test-Parameters: testlist=sanity envdefinitions=ONLY=124a
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I13d7a56b96eda5084627edd8c912782bee20a27c
Reviewed-on: http://review.whamcloud.com/13222
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5914 lfsck: dt_lookup() LBUG 88/13188/2
Lai Siyao [Fri, 26 Dec 2014 14:15:35 +0000 (22:15 +0800)]
LU-5914 lfsck: dt_lookup() LBUG

This patch contains two fixes:
1. object can be remote in lfsck_namespace_rebuild_linkea(), remove
   assert on this.
2. initialize dt_index_ops for parent in l_n_verify_stripe_slave()
   before dt_lookup() on it.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I0755f471470cc0805db222640bba1d04f4128388
Reviewed-on: http://review.whamcloud.com/13188
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: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6042 osc: osc_object_ast_clear() LBUG 63/13163/2
Bobi Jam [Mon, 22 Dec 2014 04:36:59 +0000 (12:36 +0800)]
LU-6042 osc: osc_object_ast_clear() LBUG

An OSC object could be destroyed with AGL locks waiting for granted,
so we'd get rid of the osc_object_ast_clear() assertion that its
dlm locks all getting granted.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I47f6c9a5f5b57291e8452713af417310f25a5e03
Reviewed-on: http://review.whamcloud.com/13163
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5851 build: split lustre-osd RPMs 89/12589/6
Bruno Faccini [Wed, 5 Nov 2014 19:38:36 +0000 (20:38 +0100)]
LU-5851 build: split lustre-osd RPMs

Since Lustre Server DKMS builds osd Kernel modules and Provides
lustre-osd, we need to find a way to also install the
osd-specific dso that is also shipped as part of lustre-osd RPM.

To fix this, now ship the osd-specific dso as part of its own RPM.
And also create its new lustre-osd-mount dependency to ensure
the lustre-osd -> lustre-osd-mount -> lustre coherency and
ordering for Server installs.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I25d498590212e696f74018c0af694bfee4d1cc81
Reviewed-on: http://review.whamcloud.com/12589
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6025 utils: reset optind before calls to getopt_long() 63/13063/4
Kit Westneat [Sat, 13 Dec 2014 17:36:29 +0000 (12:36 -0500)]
LU-6025 utils: reset optind before calls to getopt_long()

The nodemap commands in lctl were not properly resetting optind
between calls to getopt_long(). This patch sets optind to 0 before
calling any subcommands.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I14a1f34000c678799298dae3c248c839a1f32d52
Reviewed-on: http://review.whamcloud.com/13063
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-6033 tests: inject failure before counting the objects 98/13098/4
Fan Yong [Thu, 9 Oct 2014 09:36:11 +0000 (17:36 +0800)]
LU-6033 tests: inject failure before counting the objects

Some test cases need to inject some failure stub on OST that will
be triggered when creating the OST objects. For that, we need to
calculate how many objects to be created to guarantee that all the
pre-created OST-objects on the MDT can be exhausted. Under some
race cases, the MDT may be in pre-creating OST-objects and finished
the pre-creation just after the precreated_ost_obj_count() returning
zero to the caller but before the caller injecting the failure stub
on the OST. Then the subsequent failure injection will be useless.
To resolve such trouble, the caller of precreated_ost_obj_count()
should inject related failure stub before calculating the pre-created
OST-objects count.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I01c98c0eb67aa0974c3223356557ae76f23ddb77
Reviewed-on: http://review.whamcloud.com/13098
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3455 mdt: sync when evicting client 67/11767/14
Hongchao Zhang [Mon, 20 Oct 2014 16:28:17 +0000 (00:28 +0800)]
LU-3455 mdt: sync when evicting client

If some client is evicted from the MDT, then the underlying OSD
should be synchronized, otherwise the recovery will be failed
for the replay requests were dropped alongside with the client.

in test_20b in replay-single.sh, the occupied disk space will be
released only after DMUs are committed for ZFS, then it should
wait some more time before calling 'df' to get the disk usage info.

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=20b \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientcount=4 osscount=2 mdscount=2 \
mdssizegb=10 ostsizegb=10 austeroptions=-R failover=true iscsi=1 \
testlist=replay-single,replay-single,replay-single,replay-single,replay-single

Change-Id: Ic126bd3c58a6d2da1c69c7231e88a8977417d37b
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/11767
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6068 misc: update Intel copyright messages 2014 74/13174/2
Andreas Dilger [Tue, 23 Dec 2014 10:45:04 +0000 (03:45 -0700)]
LU-6068 misc: update Intel copyright messages 2014

Update the copyright messages for changes made in 2014.

In some cases, changes made in 2013 did not generate an updated
copyright message, so these files are updated accordingly.  In some
cases there were no licenses on newly-added files, so add them (either
with new copyrights, or including copyrights from the source files).

Some types of changes that are not actually changing the code
(e.g. whitespace, mass changes to add or remote prefixes, patches
updating the copyright messages, patch reversions and the reverted
patch, patches that only delete code, etc.) have been excluded.

The updatecw.sh script was updated to fix a number of problems:
- it now handles comments in nroff (man page) files properly
- remove need to handle non-Intel copyrights specially
- allow subdirectory to be specified on command-line
- improve script debugging when running with "sh -vx"
- print patches changing the most files, to catch mass replacements

There are still a few cases that need to be fixed up by hand (e.g.
files split up and "git log --follow" can't find the original).

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ib4875400a4908dc79ddc8b82ab0fe3ee903ebbe5
Reviewed-on: http://review.whamcloud.com/13174
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5478 utils: get rid of obd_* typedefs 50/13150/2
Dmitry Eremin [Fri, 19 Dec 2014 14:49:06 +0000 (17:49 +0300)]
LU-5478 utils: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 8 in series: modify utils and ptlrpc

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I618e6e8465c845951f4735ac7ff2743544534809
Reviewed-on: http://review.whamcloud.com/13150
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-5478 osd: get rid of obd_* typedefs 49/13149/2
Dmitry Eremin [Fri, 19 Dec 2014 14:37:39 +0000 (17:37 +0300)]
LU-5478 osd: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 7 in series: modify osd-ldiskfs/osd-zfs

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I9809d57ae8665fb7a932645cc2258d3adc1a0ff1
Reviewed-on: http://review.whamcloud.com/13149
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-5478 obdclass: get rid of obd_* typedefs 46/13146/2
Dmitry Eremin [Fri, 19 Dec 2014 14:09:55 +0000 (17:09 +0300)]
LU-5478 obdclass: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 5 in series: modify obdclass/obdecho/ofd

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I674972390c808001249ce3c23a9f58888c13d1be
Reviewed-on: http://review.whamcloud.com/13146
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-5478 mdc: get rid of obd_* typedefs 45/13145/2
Dmitry Eremin [Fri, 19 Dec 2014 13:58:09 +0000 (16:58 +0300)]
LU-5478 mdc: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

patch 4 in series: modify mdc/mdt/mgc

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I35b51c3e722f7463b7bab04a5fb2e19544b47178
Reviewed-on: http://review.whamcloud.com/13145
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-5478 style: get rid of obd_* typedefs 40/13140/2
Dmitry Eremin [Fri, 19 Dec 2014 10:11:30 +0000 (13:11 +0300)]
LU-5478 style: get rid of obd_* typedefs

We have a bunch of typedefs for common things that made no sense
and hid the actual type from plain view.
Replace them with proper uXX or sXX types.
Exception is in lustre_idl.h and lustre_ioctl.h where
they are replaced with __uXX and __sXX to be able to be included
in userspace

First patch in series: modify main includes

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I49f53ea25e28b1af31dd7d4cd36b27cf644464fc
Reviewed-on: http://review.whamcloud.com/13140
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-2675 obd: remove linux/obd.h 23/13123/3
John L. Hammond [Tue, 23 Dec 2014 22:10:33 +0000 (17:10 -0500)]
LU-2675 obd: remove linux/obd.h

Remove the now unneeded header lustre/include/linux/obd.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I70c0b40fded991b1e871bf8624cb91f39e065ea7
Reviewed-on: http://review.whamcloud.com/13123
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5905 tests: add version check codes to conf-sanity test 56 45/13045/2
Jian Yu [Fri, 12 Dec 2014 07:34:15 +0000 (23:34 -0800)]
LU-5905 tests: add version check codes to conf-sanity test 56

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

Lustre-commit: 3dc232918c7c9b95398ac6a0dc4c2130adc2851d
Lustre-change: http://review.whamcloud.com/12145
or
Lustre-commit: e6745116cc372647f785c4063389734620c92e91
Lustre-change: http://review.whamcloud.com/12319

Test-Parameters: alwaysuploadlogs envdefinitions=ONLY=56 \
ossjob=lustre-b2_6 mdsjob=lustre-b2_6 ossbuildno=2 mdsbuildno=2 \
testlist=conf-sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I8c1b41f6912c006d4bb9edd756af3fa345dd55f3
Reviewed-on: http://review.whamcloud.com/13045
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lnet: remove lnet/include/lnet/linux/ 32/12932/4
John L. Hammond [Thu, 4 Dec 2014 17:10:44 +0000 (11:10 -0600)]
LU-2675 lnet: remove lnet/include/lnet/linux/

Remove the linux specific headers from lnet/include/lnet/linux/,
moving whatever was worthwhile from them to their parent headers or
elsewhere. Also remove lnet/klnds/socklnd/socklnd_lib-linux.h and
rename lnet/klnds/socklnd/socklnd_lib-linux.c to socklnd_lib.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id10683e95277791f9c99492907369a608b28a1fb
Reviewed-on: http://review.whamcloud.com/12932
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6027 mdd: Don't list "trusted.link" for orphans 84/12884/5
Li Wei [Fri, 28 Nov 2014 09:15:04 +0000 (17:15 +0800)]
LU-6027 mdd: Don't list "trusted.link" for orphans

Commit 09fe679 prevents mdd_xattr_get() from accessing XATTR_NAME_LINK
EAs of orphan objects but leaves mdd_xattr_list() unchanged.  This is
problematic for fgetxattr() calls on orphan objects when EA cache
refills are involved.  To respond to such a refill, mdt lists all of
the object's EA names and gets the value for each name.  In the case
of an orphan, XATTR_NAME_LINK EA will be listed, but corresponding
mdd_xattr_get() call will return -ENOENT, causing the fgetxattr() call
to fail eventually.  This patch updates mdd_xattr_list() to filter out
XATTR_NAME_LINK EAs for orphan objects as well, following commit
09fe679.

Change-Id: Ie59e4c9342056bacf57a82cf9bf77cfdedc99f6d
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/12884
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
9 years agoLU-6027 osd-zfs: Preserve lu_buf when listing EAs 80/12880/4
Li Wei [Sat, 29 Nov 2014 03:21:19 +0000 (11:21 +0800)]
LU-6027 osd-zfs: Preserve lu_buf when listing EAs

Current osd_xattr_list() in osd-zfs modifies its lu_buf argument,
leaving lu_buf::lb_buf pointing to the end of the original buffer.
This behavior is unnecessary and counter-intuitive.  This patch
preserves the content of the lu_buf argument and updates OSD API to
reduce the chance of future regressions.

Change-Id: I0d3e334848734ca6f44778e87b5ff3b044826784
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/12880
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 llite: remove some cl wrappers 50/12850/3
John L. Hammond [Tue, 25 Nov 2014 14:50:16 +0000 (08:50 -0600)]
LU-2675 llite: remove some cl wrappers

In llite remove the wrapper functions and macros:
  cl_i2info()
  cl_i2sbi()
  cl_iattr2fd()
  cl_inode_info
  cl_inode_mode()
  cl_inode_{a,m,c}time()
  cl_isize_{lock,unlock}()
  cl_isize_{read,write,write_nolock}()

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I310c16c842781cbec741a7c43b746b582546badd
Reviewed-on: http://review.whamcloud.com/12850
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-1399 config: check lustre_cfg_new() return 39/10739/5
Andreas Dilger [Tue, 17 Jun 2014 22:20:54 +0000 (16:20 -0600)]
LU-1399 config: check lustre_cfg_new() return

Check if lustre_cfg_new() fails its allocation and pass that error
on to the caller instead of dereferencing the NULL pointer.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8a934777ea68a866f5f087a6c0948a6dbc3ebbe5
Reviewed-on: http://review.whamcloud.com/10739
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4239 mdt: Optimize fid2path 17/10717/19
Patrick Farrell [Mon, 1 Dec 2014 06:56:18 +0000 (00:56 -0600)]
LU-4239 mdt: Optimize fid2path

On directory paths 100 or more deep, fid2path
gives a spurious:
ioctl err -75: Value too large for defined data type

This bug occurs because all of the fids found during
a path lookup are stored in pli_fids and the
array is too small for very deep paths.

The stored fids are not used except for the last one, so
this array is not necessary.

Additionally, from Frank Zago:

It is not necessary to copy back and forth the fid, linkno,
and path.
Keep the input getinfo_fid2path, and remove

struct path_lookup_info

which was mostly a copy of getinfo_fid2path. This saves
several copies and a memory allocation.

The fid to be returned back to user space is stored in
fp->gf_fid.

Also added doxygen comments and replaced an 'EXIT' and
'return rc' with 'RETURN(rc)'.

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: I357b4d91b9c65a836d289d5815c763306ac34565
Reviewed-on: http://review.whamcloud.com/10717
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3727 nfs: Fix ll_get_parent() LBUG caused by permission 27/7327/13
Li Xi [Wed, 8 Oct 2014 12:27:22 +0000 (20:27 +0800)]
LU-3727 nfs: Fix ll_get_parent() LBUG caused by permission

When ll_get_parent() is trying to get the attributes of parent
directory, EACCES will be returned if NFS daemon user does not
have the execute permission of the child directory. This patch
fixes the problem by skipping permission check for ll_get_parent().

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Id922d170c89519b755f69a2818d6ed53f8cc7ad9
Reviewed-on: http://review.whamcloud.com/7327
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6055 hsm: improve error handling in sanity-hsm 54/13154/2
John L. Hammond [Fri, 19 Dec 2014 16:44:05 +0000 (10:44 -0600)]
LU-6055 hsm: improve error handling in sanity-hsm

In path2fid() propagate errors from 'lfs path2fid'.  In
file_creation_failure() redirect the output of df to stderr so that it
is not captured by command substitution.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7fabf46af4aa36c6affef45cf8c9b044a7aa29dd
Reviewed-on: http://review.whamcloud.com/13154
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5648 ofd: In destroy orphan case always let MDS know last id 67/12067/3
Oleg Drokin [Fri, 26 Sep 2014 02:15:36 +0000 (22:15 -0400)]
LU-5648 ofd: In destroy orphan case always let MDS know last id

It appears that if we think MDS asked us to delete too many
precreate objects (more than 2 MAX_PRECREATE counts)
then we don't do the precreation, but do not let MDS know it needs
to advance the last_id forward by quite a bit.
This lead to reassigning these objects to other files after recovery.

Change-Id: Icbd5b9e3cd81129f56ee5cd3aafd5f418affbecc
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/12067
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-6035 kernel: kernel update RHEL6.6 [2.6.32-504.3.3.el6] 06/13106/3
Bob Glossman [Tue, 16 Dec 2014 21:18:19 +0000 (13:18 -0800)]
LU-6035 kernel: kernel update RHEL6.6 [2.6.32-504.3.3.el6]

Update RHEL6.6 kernel to 2.6.32-504.3.3.el6

Test-Parameters: clientdistro=el6.6 mdsdistro=el6.6\
  ossdistro=el6.6 mdsfilesystemtype=ldiskfs\
  mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I07f3a84b776e3bcd8f1b7ba2250e0bbb3d47f010
Reviewed-on: http://review.whamcloud.com/13106
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5528 ptlrpc: fix race between connect vs resend 23/11723/12
Alexander.Boyko [Wed, 20 Aug 2014 13:07:35 +0000 (17:07 +0400)]
LU-5528 ptlrpc: fix race between connect vs resend

Buggy code at ptlrpc_connect_interpret()
finish:
rc = ptlrpc_import_recovery_state_machine(imp);
...
Set import connection flags
When import has FULL state ptlrpc_import_recovery_state_machine()
wakeup all waiters on import and all delayed request, which was
resented. And it could happened that request was send without
updated flags and AT is disabled. If such request is in progress
on the server, server drop the new instance, and could do early reply
for it. But this early reply confuse client, cause it wait real
reply(no AT for this request). Client try to touch buffer outside
reply and got EPROTO error.
The same bug existed for initital connect too. Import became FULL
before import connection flags was set.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-2034
Change-Id: Ic6959e3194c23bdd88a7da1a8f0ea9b4cd4285f0
Reviewed-on: http://review.whamcloud.com/11723
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5773 test: reduce thread count 78/13078/4
Niu Yawei [Tue, 16 Dec 2014 02:59:55 +0000 (21:59 -0500)]
LU-5773 test: reduce thread count

Reduce thread count for the test_1c of obdfilter-survery test to
prevent OOM on vm.

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs \
mdtcount=1 testlist=obdfilter-survey,obdfilter-survey,obdfilter-survey

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I83926a538827dea6682bd0f84434ba5d351cfd88
Reviewed-on: http://review.whamcloud.com/13078
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6024 nodemap: fix ACL handling in mdt_finish_open 62/13062/3
Kit Westneat [Sat, 13 Dec 2014 16:11:53 +0000 (11:11 -0500)]
LU-6024 nodemap: fix ACL handling in mdt_finish_open

This patch adds ACL mapping code to mdt_finish_open so that clients
get a correctly mapped list. The code is essentially the same as in
mdt_getattr_internal.

Signed-off-by: Kit Westneat <kit.westneat@gmail.com>
Change-Id: I3cf0ba2128ba8c4027359329f423d2327005f082
Reviewed-on: http://review.whamcloud.com/13062
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6023 build: fix libselinux support 30/13030/5
Dmitry Eremin [Thu, 11 Dec 2014 13:17:59 +0000 (16:17 +0300)]
LU-6023 build: fix libselinux support

Enabling correct libselinux-devel detection by searching for
the same header file in autoconf that is used in code.

Link mount_osd_ldiskfs.so with -lselinux.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I085e91464a263b6d1b1be13971e54dfc80a4e347
Reviewed-on: http://review.whamcloud.com/13030
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-4660 osd-ldiskfs: fix osd_bufs_get() error handling 44/9344/7
Andriy Skylysh [Tue, 16 Dec 2014 03:16:50 +0000 (20:16 -0700)]
LU-4660 osd-ldiskfs: fix osd_bufs_get() error handling

Unlock pages just locked during cleanup if page loading failed.

Clean up code style, add function comment blocks.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ie523b0cfea30bc55ecd58db0849b1b005a393fc7
Reviewed-on: http://review.whamcloud.com/9344
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6058 test: log to stderr 55/13155/2
John L. Hammond [Fri, 19 Dec 2014 18:09:51 +0000 (12:09 -0600)]
LU-6058 test: log to stderr

In test-framework.sh's log() function print the message to stderr
instead of stdout. This ensures that the message will not be not
captured by command substitution. Similarly print bash stack traces to
stderr from error().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If9ca4af1c8d66f9bb3767f4fc3c04fb6966de915
Reviewed-on: http://review.whamcloud.com/13155
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5916 lod: inherit default pool setting properly 46/12746/7
Niu Yawei [Mon, 17 Nov 2014 06:59:44 +0000 (01:59 -0500)]
LU-5916 lod: inherit default pool setting properly

When parent directory has no default striping but has only
default pool setting, the pool setting should be inherited
by subdir properly.

This patch fixed the problem by changing the
LOVEA_DELETE_VALUES() to check pool name as well, and it
removed the unused function lod_store_def_striping().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I7ce5251b6c601309aeb91a1b903bde02d0712e25
Reviewed-on: http://review.whamcloud.com/12746
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: Alex Zhuravlev <alexey.zhuravlev@intel.com>
9 years agoLU-5814 lov: flatten struct lov_stripe_md 81/12581/2
John L. Hammond [Wed, 5 Nov 2014 17:40:02 +0000 (11:40 -0600)]
LU-5814 lov: flatten struct lov_stripe_md

Flatten out the lsm_wire struct from the middle of struct
lov_stripe_md and remove the member name macros.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I53455d4f42860d4c7e5541f1f18b0c451a022c28
Reviewed-on: http://review.whamcloud.com/12581
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5971 llite: merge lclient.h into llite/vvp_internal.h 92/12592/6
John L. Hammond [Tue, 4 Nov 2014 22:03:36 +0000 (16:03 -0600)]
LU-5971 llite: merge lclient.h into llite/vvp_internal.h

Move the definition of struct cl_client_cache to
lustre/include/cl_object.h and move the rest of
lustre/include/lclient.h in to lustre/llite/vvp_internal.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib3ca8f1693c517a77c5bfd7c7cced9bfc440c747
Reviewed-on: http://review.whamcloud.com/12592
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4536 tests: disable sanity test_65ic for ZFS 14/13114/2
Andreas Dilger [Thu, 18 Dec 2014 00:42:04 +0000 (17:42 -0700)]
LU-4536 tests: disable sanity test_65ic for ZFS

Disable sanity.sh test_65ic due to frequent test timeouts on
review-zfs testing.  This will allow the rest of the tests to be
enforced, and will allow this problem to be debugged separately.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1ea93b5c2dfb0a3bbe0265a283ab7512044d6cd2
Reviewed-on: http://review.whamcloud.com/13114
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
9 years agoLU-5396 obdclass: make some functions static 20/12220/12
Frank Zago [Thu, 11 Dec 2014 16:49:04 +0000 (11:49 -0500)]
LU-5396 obdclass: make some functions static

Some functions and variables are only used in their C file, so reduce
their scope. This reduces the code size, and fixes sparse warnings
such as:

  warning: symbol 'proc_lnet_routes' was not declared.
      Should it be static?
  warning: symbol 'proc_lnet_routers' was not declared.
      Should it be static?

Some prototypes were removed from C files and added to the proper
header.

Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: I35a7ae4d9efd7098d93d3500f4854ef074fce179
Reviewed-on: http://review.whamcloud.com/12220
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-6028 ldlm: move LDLM_GID_ANY to lustre_dlm.h 74/13074/2
Jinshan Xiong [Mon, 15 Dec 2014 20:48:23 +0000 (12:48 -0800)]
LU-6028 ldlm: move LDLM_GID_ANY to lustre_dlm.h

lustre_idl.h only includes wire data; lustre_dlm.h is the
right place for LDLM_GID_ANY.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I832796e924116e80c079494f6928c037e7e4f2aa
Reviewed-on: http://review.whamcloud.com/13074
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>