Whamcloud - gitweb
LU-3817 llite: Truncate to restore file 05/7505/7
authorJinshan Xiong <jinshan.xiong@intel.com>
Fri, 6 Sep 2013 23:26:25 +0000 (16:26 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Sep 2013 04:04:04 +0000 (04:04 +0000)
commitb87e99adf44b80308f341cbf143374034f627ab9
tree0b2c3bafc070ee44f85d016a6cd0f8053e6acad7
parenta70e10cdd43f2139cb9f95b96fbaa860ec0b2b7a
LU-3817 llite: Truncate to restore file

Truncate up is safe so it won't trigger restore.

Copy optimization for truncate down - only copy the part under
truncate length. If a file is truncated to zero usually it'll be
followed by write so I choose to restore the file and set correct
stripe information.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I5e64893bdeaeb7323566154e3469f3a0ce7797d4
Reviewed-on: http://review.whamcloud.com/7505
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/vvp_io.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_hsm_cdt_client.c
lustre/tests/sanity-hsm.sh
lustre/tests/sanity.sh
lustre/utils/lhsmtool_posix.c