LU-5779 test: wait for CT registration in sanity-hsm test_70

In sanity-hsm test_70 wait for the copytool to register before
shutting it down (via SIGINT) so that the desired events may be
emitted.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ibc3fa26c119cebd10566b9ac3b4d1a754da1aaf2
Reviewed-on: http://review.whamcloud.com/12367
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 libcfs: remove LUSTRE_{,SRV_}LNET_PID

Remove LUSTRE_LNET_PID (12354) and LUSTRE_SRV_LNET_PID (12345) from
the libcfs headers and replace their uses with a new macro
LNET_PID_LUSTRE (also 12345) in lnet/types.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib92e1eaa8237c998d04ee0110907dac2dbffdc5e
Reviewed-on: http://review.whamcloud.com/11985
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 libcfs: add libcfs/byteorder.h

Move the byte swapping macros out of libcfs/posix/libcfs.h and into a
new header libcfs/byteorder.h which includes asm/byteorder.h for
kernel code or defines the equivalent macros for userspace code.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I298e4d1dd224ffbb395e0df531b382a8c9e2082f
Reviewed-on: http://review.whamcloud.com/11986
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 mgc: remove libmgc.c

Remove the liblustre specific file lustre/mgc/libmgc.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4412c9d27108f4230fb351f24d6a05b2cb98fa19
Reviewed-on: http://review.whamcloud.com/11772
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: Nathan Rutman <nathan.rutman@seagate.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5352 dt: correct if condition in dt_index_read()

In dt_index_read() return -EPROTO if rdpg->rp_count is zero or is not
divisible by LU_PAGE_SIZE.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib4f884bf0759b81978336d68fea45cf7a5d8a70f
Reviewed-on: http://review.whamcloud.com/11121
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5054 llite: enforce pool name length limit

The pool related codes have some inconsistency about the length
of pool name. Creating and setting a pool name of lenght 16
to a directory will succeed. However, creating a file under
that directory will fail.

This patch disables any pool name which is longer or equal to
16. And it changes LOV_MAXPOOLNAME from 16 to 15 which might
cause some invalid LLOG records of OST pools with 16 byte names.
It is not a problem since invalid LLOG records are just ignored.
And OST pools with 16 byte names won't work well anyway on the
old versions. There will be problem of inconsistency if part of
the servers have this patch and part of the servers don't. But
it would be safe to assume that this is not a normal
configuration.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I3672fb5414662120c3e6b8641002a6b76994cc77
Reviewed-on: http://review.whamcloud.com/10306
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4075 osd: handle getxattr for trusted.version

In the ldiskfs osd_xattr_get() remove an assertion on the size of the
supplied buffer and add normal handling.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie4d3b4ab6dd1e8328404d1f8e5b403130b62e64a
Reviewed-on: http://review.whamcloud.com/11649
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 lustre: remove linux/obd_support.h

Remove the unnecessary header lustre/include/linux/obd_support.h. In
lustre/include/obd_support.h assume a kernel build.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I3bead5495b7f4a08183653f2e1eb06d429543091
Reviewed-on: http://review.whamcloud.com/11931
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 osc: remove obsolete llog handling

In osc_disconnect() LLOG_SIZE_REPL_CTXT was never setup so remove the
code to sync and put the content. In osc_precleanup() remove the no-op
call to obd_llog_finish().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I41ce7effbd017862aa216d4a09c15694ec11d597
Reviewed-on: http://review.whamcloud.com/11774
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2675 llog: remove obd_llog_init() and obd_llod_finish()

Since the OBD methods obd_llog_init() and obd_llod_finish() are only
called from MDC we remove them and just call mdc_llog_init() and
mdc_llog_finish() directly. Also simplify the prototypes the latter
functions according to their uses.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I56f906eacedaa4e2f90742fb129b4d578751a524
Reviewed-on: http://review.whamcloud.com/11781
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>