Whamcloud - gitweb
LU-3864 lov: return minimal FIEMAP for released files 84/7584/12
authorBruno Faccini <bruno.faccini@intel.com>
Sun, 29 Sep 2013 07:27:32 +0000 (09:27 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 Oct 2013 20:16:12 +0000 (20:16 +0000)
commitab19dad1d77ca25856815aadf2cf10d3cf20d4a3
treebcb226810011648e88715dc5737cbb0a805c9ec0
parentef2d36d905720ef8f632299f9806a9bfaa372b86
LU-3864 lov: return minimal FIEMAP for released files

Since st_blocks = NULL is returned for released files, FIEMAP
should at least return a minimal mapping to make users aware
that file contains data but it is not immediately available.
This will make coreutils and tools such tar happy and have
them presume file is sparse.

Also, add a new test_228 in sanity-hsm to verify it works
for "[cp,tar] --sparse" commands.

Also fix a LBUG ("lov_fiemap()) ASSERTION( fm_local ) failed")
likely to occur when no-object/ENOMEM conditions and also now
when released.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Idc59f755d407fd34e7095898c68b4aceb5bf9c28
Reviewed-on: http://review.whamcloud.com/7584
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
lustre/lov/lov_obd.c
lustre/tests/sanity-hsm.sh