LU-2430 mdd: add lfs mv to migrate inode.

Add lfs mv to migrate the individual inode from one MDT to
another MDT, and this function will only migrate inode layout
on MDT but not touch data object on OST.

lfs mv -M 1 /mnt/lustre/test1 #move test1 to MDT1.

The directory will be migrated from top to the bottom, i.e.
migrating parent first, then migrating the child.

Add migrate into sanity 17n to check on-disk format.

Add sanity 230(c,d,e,f) sanityn 80 to for migration.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ib4456a1db8909bd96260c67fff48922081948dcd
Reviewed-on: http://review.whamcloud.com/6662
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4371 gss: Generalize testing of GSSAPI code

Rename sanity-gss.sh to sanity-krb5.sh and make sanity-gss.sh a
mechanism-agnostic test suite for just the GSSAPI code itself using
the gssnull security flavor, which in turn uses the null GSSAPI
mechanism.

Test-Parameters: testlist=sanity-gss
Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: I149ce66c4b044e20b9e8e1b93058ec4f62aba881
Reviewed-on: http://review.whamcloud.com/8525
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-2430 mdt: Add global rename lock.

Add global rename lock to protect migration process.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I363ab58150350e5bc558fcd655c5e7e7b653af10
Reviewed-on: http://review.whamcloud.com/8826
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3527 nodemap: add NID range management

The nodemap module defines a nodemap as a set of NID ranges
and a policy that is applied to them. This adds the range
management functions to nodemap. The definition of a range
is kept in the range_node structure.

The range_node structures are kept in a global rb_tree for
ease and speed of managing the range_nodes (each range_node
can be a member of eexactly one nodemap). The range_node
contains a pointer back to the nodemap of which it is a
member. The range_node also keeps the (inclusive) start and
end of the NID range is represents.

Additionally, each nodemap contains a linked list of the
pointers to the range_node in encompasses, for use in
management of the nodemap (deleting, checking ranges, etc)
to prevent walking the range_node tree.

Commands have been added to lctl to control the range management
and other nodemap policy features (squash ids, admin, trusted)
that will control its behavior with regards to ID mapping.

Unit tests have been added to sanity-sec.sh to check the
range management and policy controls.

Signed-off-by: Joshua Walgenbach <jjw@iu.edu>
Change-Id: I2b93f15de8f07a2bcef16fde27fb03a41a2063bc
Reviewed-on: http://review.whamcloud.com/8057
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil>
LU-3527 nodemap: idmap management functions

This adds support for uid/gid mapping management to the nodemap
module. This mapping is added as four rbtrees in the nodemap
structure for forward and reverse mapping of UIDs and GIDs.
Postorder traversal for rbtrees have been added for cleanup
upon nodemap removal.

lctl commands have been added for adding, removing, and testing
maps.

Unit tests have been added to test the maps in all the relevant
modes (allow root access, trust client ids).

Signed-off-by: Joshua Walgenbach <jjw@iu.edu>
Change-Id: I9a8672f2883185a35d3553e5c2e91ae1d2cb094d
Reviewed-on: http://review.whamcloud.com/8125
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil>