LU-1304 mdd: changes related to acl

ACL/i_mode consistency in maintained within MDD,
so that ACLs functionality do not depend on
OSD indirectly. required for ZFS backend.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8f20e21734097ee2d962cc487265d6e1d9b3b805
Reviewed-on: http://review.whamcloud.com/3866
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
LU-1304 mdd: do not use ma internally

this is the first step to prepare mdd for LOD
and removing LOV management from MDD

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I65a6f6bc867ff3107eb6fb927da60ace304754af
Reviewed-on: http://review.whamcloud.com/4032
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1688 test: fix the problem in test_58 of recovery_small

in test_58 of recovery_small, the 'df' command could trigger
the eviction caused by the above 'drop_bl_callback', then
the fail of 'df' could be not thought as the fail of th test,

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I226a3d4772d033182ded28caacbecdc44c7af8c4
Reviewed-on: http://review.whamcloud.com/3506
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jay J Lan <jay.j.lan@nasa.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1946 mount: Print more helpful message on EBUSY

If the mount function returns EBUSY, there is a chance that the
backend filesystem is mounted through the Posix layer. Specifically,
when using a ZFS backend EBUSY will be returned in this use case. As an
aid the to end user, this patch prints a message intended to help the
user diagnose and fix the issue.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I7bacbb74c1e76efbbea60f76049a9356d601d246
Reviewed-on: http://review.whamcloud.com/3997
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1883 osd: Fix niobuf_local offset usage

osd-ldiskfs fills file offsets into niobuf_local::offset fields in
osd_map_remote_to_local(), while osd_write_prep() treats the values as
page offsets.  Random memory corruptions may occur as a result of this
offset usage inconsistency.  This patch fixes the issue and introduces
the Orion lnb_file_offset and lnb_page_offset names.

Change-Id: I76c555ddbe7f41271be4bebecbc41ce036747258
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4051
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1301 mgs: lu device for mgs

initial infrastructure to get lu-device for mgs:
device itself, support for objects, init/fini
old lvfs llog is still used to access on-disk data

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I46b2ba4bafa0f15970745ca024cd3239b9b63ec5
Reviewed-on: http://review.whamcloud.com/3674
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1301 mgs: osd api based setup

Add new mgs_fs_setup() and mgs_fs_cleanup() routines to
initialize local objects using OSD API.  The corresponding old
mgs_fs_setup() and mgs_fs_cleanup() routines are still called
so that lvfs-based functions still work during the transition.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib4bb83e6f8b3e5146363197b9793a810a9242b19
Reviewed-on: http://review.whamcloud.com/3675
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1301 mgs: mgs_nids.c to use OSD API

and not lvfs

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I04e9370561989f0ec13f5cf18ddbac8cfc59b51a
Reviewed-on: http://review.whamcloud.com/3676
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1301 mgs: OSD based class_dentry_readdir()

class_dentry_readdir() now uses OSD API to list the logs.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I376fb8d53ffb6d0aaee27ed981a8243def4d85df
Reviewed-on: http://review.whamcloud.com/3677
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1301 helpers: quiet class_parse_nid()

class_parse_nid_quiet() is a version of class_parse_nid()
which doesn't complain on an invalid nid.
i.e. used in obd_mount.c where nid can be followed by
another (non-nid) mount option.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8938a50e56007bd626b207e4a69a2a76c572632d
Reviewed-on: http://review.whamcloud.com/3678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1302 llog: modify llog_write/llog_add to support OSD

- add transaction and declarations in API to work over OSD
- change logic in llog catalog to open plain llogs during
  declarations
- keep lop_obd_add to work via chain of obds, e.g. MDS-LOV-OSC.
  It will be not needed with LOD/OSP anymore

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ifba546fcb5fe8434fd4aa21a21b831737df73729
Reviewed-on: http://review.whamcloud.com/3923
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1303 osp: land precreate code

OSP precreate code, this functionality is similar to OSP precreate

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I090cfddc26eead17e82cc75c448225b08d0debe7
Reviewed-on: http://review.whamcloud.com/3983
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1303 osp: osp object operations

add object operations to OSP

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I9e460efe2cbfed984cb57e5e77992127b9084556
Reviewed-on: http://review.whamcloud.com/4030
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1999 tests: check LW client eviction in logs

A lightweight client can reconnect rather quickly after a server
restart (they are allowed to reconnect during recovery), which
confuses wait_client_evicted().
A more reliable check is to search for eviction message in the log.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Idb5fda48c7d73c465c8d69c18f2040d5fa08e3ba
Reviewed-on: http://review.whamcloud.com/4069
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
LU-1304 mdt: get attributes with explicit calls

to mdd, so that mdd doesn't need to care of attribute packs

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I0c2c636e4751f599c5a580526c87ff068a5409a5
Reviewed-on: http://review.whamcloud.com/3782
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1753 test: use large resend count for 118i in sanity

in sanity.sh, the subtest 118i will fail if the resend count
of OSC is small for 'SLOW=no' case (it's 4, default is 10).

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I3c49628ed259e7adbff4a100d482e693502bf99d
Reviewed-on: http://review.whamcloud.com/4071
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>