Whamcloud - gitweb
LU-3864 mdt: return st_blocks=1 for released files 76/7776/3
authorBruno Faccini <bruno.faccini@intel.com>
Sun, 29 Sep 2013 06:58:44 +0000 (08:58 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 1 Oct 2013 04:22:16 +0000 (04:22 +0000)
commit93829a847a3c18b1132845bf114acf31f20a6360
treec5ab36db02ee182abc9427292aadf4b179898b69
parentbb816c498612de8358cfd8008921ab9efac636b7
LU-3864 mdt: return st_blocks=1 for released files

Before this patch it has been decided to return st_blocks=0 for
released files. Unfortunatelly this caused tools like tar then
to consider the file as fully sparse and to archive it as is
without attempting to access/restore its content.
As this leads to potential corruption, it has been decided that
the less ugly and intrusive way to bypass this was to return 1
block considering this is consumed by file's metadatas.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I85df56a60bf3585b42999fc1b80d1f075435dbc3
Reviewed-on: http://review.whamcloud.com/7776
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
lustre/mdt/mdt_handler.c
lustre/tests/sanity-hsm.sh