Whamcloud - gitweb
LU-2445 utils: lfs migrate support
authorjcl <jacques-charles.lafoucriere@cea.fr>
Wed, 6 Mar 2013 21:40:42 +0000 (22:40 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 26 Mar 2013 04:43:18 +0000 (00:43 -0400)
commitead6f5b2b5d3e151b4f98404bb0d253ccb992d6a
treeed422cab5dda8f6b3151a03f7f45b28288168002
parent689a3a288ee6b06d13541c4b6cd99ea146c5ad22
LU-2445 utils: lfs migrate support

Add a new command migrate to lfs utility.
migrate takes sames args as setstripe and a --block option
It:
- create a volatile file based on new stripe information
- copy file data to this volatile file
- swap the 2 layouts
- if --block is set, take the grouplock to block other access
  during copy

So after migrate the file is restriped (mtime, atime are not
changed).
lfs_migrate is also updated to use the new call and
keeps the rsync mode as a fallback.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I96bafb0be9bc273295c4c900c65b4028864fcbaa
Reviewed-on: http://review.whamcloud.com/5620
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lustre/lustre_user.h
lustre/include/lustre/lustreapi.h
lustre/llite/file.c
lustre/lmv/lmv_obd.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/scripts/lfs_migrate
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/liblustreapi.c