LU-1684 ldlm: move ldlm flags not sent through wire to upper 32bits

there is no empty bit for a LDLM_FL_* flag in lower 32bits, i.e. which needs
to be sent through wire. move locally used flags to upper 32bits to free some
bits.

Change-Id: Iddaff0a75b19d7311800d2ac6c3fef1012b9ffd2
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Xyratex-Bug-ID: MRP-541
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/3494
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
MRP-353 Resolve lock depend issues

This commit tryes to make Lusre compatible
with linux lockdep checks.

Don't disable lockdep during mount.
Set lockdep classes for cli->cl_sem, cfs_trace
to resolve warnings.

Change-Id: If92461649242c7077a0ee9f6a692443ebfa44f13
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-on: http://morpheus.xyus.xyratex.com:8443/83
Tested-by: Jenkins
Tested-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
MRP-139 link ea code cleanup

Reviewed-by: Nathan Rutman <Nathan_Rutman@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
MRP-139 1.8->2.x lustre migration tool

Convert on-disk data structures on MDS of Lustre FS 1.8 to Lustre FS
2.x ones in-place:
- assign true FIDs, stored in LMA EA;
- assign parent FIDs, stored in Link EA;
- assign children FIDs, stored in directory entries;
- create OI so that FIDs point to the proper inode numbers;
re-create Lustre 2.x metadata on MDS after backup/restore.

Reviewed-by: Nathan Rutman <Nathan_Rutman@xyratex.com>
Reviewed-by: alexey_lyashkov@xyratex.com

MRP-290 migration tool fixes

- OOM fix, lu_object cache is added to the shrinker list earlier at the time
  of the migrator work;
- if an error occurred, stop the work in other threads immediately;
- if a thread terminates, wake up other threads which may be sleeping;
- if not the last thread terminates, do not wake up the parent, because it may
  free the mdd_rebuild_info and next thread which will also try to wake it up
  may access freed memory;
- if some recovery items are still in the recovery queue and the cleanup (an
  error occurred), pay attention on their parent which may be fully processed
  and already not in the list - must be added to this list again to be freed;

Reviewed-by: alexey_lyashkov@xyratex.com
Reviewed-by: andrew_perepechko@xyratex.com
MRP-139 set LDISKFS_FEATURE_INCOMPAT_DIRDATA on upgrade

1.8 code supports the feature not since 1.8.0, so it was disabled
by default in upgrade cases. however, as we maintain the upgrade/downgrade
on 1 version only, it is already safe to enable it by default.

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
LU-1028 tests: regrab some grant after oos test

After out-of-space test, the client can see a state that avail_grant,
dirty_bytes and lost_grant are zero. In this case, page_mkwrite()
won't work because it can't allocate any grant and this affects fsx
test.

This problem is unlikely to be seen in real world. Therefore, we
wrote a small piece of data to each OSTs through each client mount
to reallocate grant.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I1d71af0a80491855cf6328a407dd417954c4e60e
Reviewed-on: http://review.whamcloud.com/3711
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>