LU-1301 mgs: env and mgs_device to pass around

a trivial part of orion changes:
 - introduce mgs_device (old mgs_obd)
 - pass lu_env around

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I53d55c9f0a91c16c9eb65ab41d9660c3699bac45
Reviewed-on: http://review.whamcloud.com/3668
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1711 mount: obd_mount to start osd

... instead of mounting underlying ldiskfs directly.
so, now OSD can be any depending on osd= mount option.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iab1ca6ca9f84ba6c708e05cd85c4de0a51d34de6
Reviewed-on: http://review.whamcloud.com/3650
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1711 mount: lu_site is provided by OSD

previously it was created by MDT, which is started after MGS.
so we relocate lu_site in OSD and now it's created before
any service like MDS/MGS.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I43312218c293df509064cc6a854074e652a6e691
Reviewed-on: http://review.whamcloud.com/3651
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1711 mount: use OSD API to export statfs data

so that server mount points (like /mnt/ostXXX) show
valid data on any backend (ldiskfs, zfs)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6ad0546d7630769083e8aea69547a6bb3256784f
Reviewed-on: http://review.whamcloud.com/3652
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1869 build: gcc/ar utility can vary

- ar utility can vary depeding on build platform.
- do not call gcc directly, use $(CC)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia60752b40531886d805a095c9f571e565bcd0e88
Reviewed-on: http://review.whamcloud.com/3917
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1644 recovery: to not check client version for mne swap

data->ocd_version in obd_connect_data can be overwritten by server
so that it'll be wrong if client is reconnected after server recovery.
Wrong clienv version caused wrong exp_need_mne_swab was set and then
has interop issue between 2.2 clients and 2.3 server.

In this patch, the following fixes are made:
1. do not check the client version on the MGS;
2. reset client version on each import connect;
3. client side fix will be removed after lustre 3.2

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ia2899d1b8385fd4799ca6fe260fc4c84444247cb
Reviewed-on: http://review.whamcloud.com/3897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1301 mgs: introduce mgs_thread_info

use it to save stack

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibefb8a7adf5ac9c6b12212d27d890467c889e5d9
Reviewed-on: http://review.whamcloud.com/3669
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1301 mgs: improve error handling

taken as is from orion

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib26c5f519f686a77fa1057af214a4823d0c16359
Reviewed-on: http://review.whamcloud.com/3670
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1301 mgs: remove compatibility code

which is inteded to support 1.6-originated profiles

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I64a74e1f139fb3d94e7d272febc31f0306d01bab
Reviewed-on: http://review.whamcloud.com/3671
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>