staging: lustre: llite: Truncate to restore file
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 12 Apr 2016 20:14:10 +0000 (16:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2016 22:13:13 +0000 (15:13 -0700)
commit1b1594da71c4286ce52009073ef0d7b6edc80ec5
treed7ae88a631f223ec551282cf9096a211c4554f6b
parentcc3b77589617b32c4fe610d9d6302a159f1fde13
staging: lustre: 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>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3817
Reviewed-on: http://review.whamcloud.com/7505
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>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/vvp_io.c
This page took 0.024965 seconds and 5 git commands to generate.