LU-1581 utils: extract ldiskfs specifics from mkfs_lustre.c

into mount_utils_ldiskfs.c

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib63258604f9f38b37bb232bc48a33ff867ec1ef0
Reviewed-on: http://review.whamcloud.com/3216
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: move common funcs to mount_utils.c

like functions to manipulate loop devices, etc

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I96c6347fbda130b81e7da267547af8a3a1c8b567
Reviewed-on: http://review.whamcloud.com/3217
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: more common helpers

check_mtab_entry() and update_mtab_entry() this time

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Idcb4d75c4fe202d41f468085f792519b1c431666
Reviewed-on: http://review.whamcloud.com/3218
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: osd_prepare_lustre

wrapper to prepare backed, load modules, etc

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9f841889cdb950aa9a6650369d73fdc1f0a57f55
Reviewed-on: http://review.whamcloud.com/3219
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: introduce osd_is_lustre() wrapper

the purpose of that is to verify whether underlying device
can be used for lustre and identify backend filesystem

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie95cf8b88811be12feb4af67e15ff26ecae9a447
Reviewed-on: http://review.whamcloud.com/3220
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1339 libcfs: add crc32 pclmulqdq implementation

Using hardware provided PCLMULQDQ instruction to accelerate the CRC32
disposal. This instruction present from Intel Westmere and
AMD Bulldozer CPUs.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyartex.com>
Xyratex-bug-id: MRP-314
Change-Id: Id6c88629f77cc5d389db49b7ee6e7111294c4a14
Reviewed-on: http://review.whamcloud.com/2586
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: osd_read_ldd() wrapper

used to fetch mountdata from backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I785c43ff95ae3e8faecf9231495529e0d2da8246
Reviewed-on: http://review.whamcloud.com/3221
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: osd_make_lustre() wrapper

a wrapper to prepare backend (basically mkfs for given type)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I5ba5c7b5905de524bd0089671c753c3a5c44a9ec
Reviewed-on: http://review.whamcloud.com/3222
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-445 lnet: Make previous change backwards compatible

With the previous patch as is, a 2.3 system running against
a 2.2 or 2.1 system will have an invalid timestamp for doing
bandwidth calculations.

This patch checks the value of the timestamp field to
determine if it is a valid value (>= 2.3) or is too small
to be a timestamp (< 2.3). If it is a valid timestamp, it
will be used. If not, the local timestamp will be used.

Signed-off-by: Doug Oucharek <doug@whamcloud.com>
Change-Id: If655144de72d3e46ab32acfcfc35ed79f58d00b2
Reviewed-on: http://review.whamcloud.com/3192
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: osd_write_ldd() wrapper

used to write mountdata to backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8cb0275372f00f12f54461ce9afb243283aff4f3
Reviewed-on: http://review.whamcloud.com/3223
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: support for multiple underlying devices

will be used by zfs backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I90c3630d993811d702f81c838aae7344775cc115
Reviewed-on: http://review.whamcloud.com/3224
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: unknown fstype

scream and exit if specific fstype is not recognized

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib5e897bdfe9609be81d74a41fd65ec57b6cf5d37
Reviewed-on: http://review.whamcloud.com/3225
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1581 utils: introduce osd_init() wrapper

to load and initialize libraries/modules for different backends

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iae4ac1bbf87093731686f9362d7f6a71cc704030
Reviewed-on: http://review.whamcloud.com/3226
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>