LU-2059 tests: skip local config tests only on ZFS

Only skip conf-sanity.sh (5d, 19b, 21b, 27a) and insanity.sh (2, 4)
when the backing OST filesystem type is ZFS, not for ldiskfs.  The
support for locally-cached config llogs is not implemented for ZFS
yet, so ZFS OSTs cannot be started without the MGS yet.

The ZFS local config support is in progress and these tests will be
re-enabled as part of the landing.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8c49483401a7132ce09b93aa5d93610c4d500c1e
Reviewed-on: http://review.whamcloud.com/4234
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1981 doc: reorganize osd API documentation

Move osd-api.txt to lustre/doc and reorganize the document.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I76fe29e36a325c0687c84389b9ed98fbbeb3b85c
Reviewed-on: http://review.whamcloud.com/4236
Tested-by: Hudson
Reviewed-by: Ian Colle <Ian.Colle@intel.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2140 test: add fake nid with proper nettype

The fake nid should be added with proper nettype.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I490f80328d8210e8eca9ccd8484fa4d7717c7429
Reviewed-on: http://review.whamcloud.com/4247
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2144 utils: reset 'optind' to avoid segmentation fault

Sometimes lfsck_{start,stop} commands may be called several
times under the same lctl shell. Under such case, the function
getopt_long() called inside the lfsck_start/lfsck_stop may be
confused, and cause segmentation fault. So reset the external
variable 'optind' by force to avoid the segmentation fault.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I35b635eac44854ae4b17ae00bed778320dbe9d9e
Reviewed-on: http://review.whamcloud.com/4248
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-2142 scrub: reset completed scrub position if retrigger

If former OI scrub has been completed, and the user wants to run
the OI scrub again, then reset the OI scrub to make it to rescan
the device from the beginning.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I5b8e9ee51ccbf95ed131b963389c4ecfb92b9035
Reviewed-on: http://review.whamcloud.com/4250
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-823 compat: Don't use cfs_ functions on kernel structures

It is not really correct to use the generic "cfs_" prefixed
locking functions on the Linux kernel's data structures.  Revert
back to using the Linux locking function.

Change-Id: I64619c4b4f4963634b3d1e43c1b1519598e65e8d
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4176
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
LU-2037 tests: Wait for devices to initialize on test setup

Fix an issue where we do not wait for a device to
initialize before getting the label. This label then does
not correspond to an actual device.
A check is now done on the label names to see
if you are getting back the 'ffff' which signifies that the
device has not finished initializing yet. In this case
we will wait and retry in 1,3,5,10 seconds or until
the command succeeds.

Xyratex-bug-id: MRP-546
Reviewed-by: Iurii Golovach <Iurii_Golovach@xyratex.com>
Reviewed-by: Kyrylo Shatskyy <Kyrylo_Shatskyy@xyratex.com>
Signed-off-by: Michael McKay <michael_mckay@xyratex.com>
Change-Id: I01e045227a4b3b6e007dcc9685238a5425cdffe8
Reviewed-on: http://review.whamcloud.com/4111
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>