Whamcloud - gitweb
LU-3834 mdt: handle swap_layouts failures during restore 31/7631/14
authorBruno Faccini <bruno.faccini@intel.com>
Tue, 10 Dec 2013 09:55:59 +0000 (10:55 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 Jan 2014 17:33:52 +0000 (17:33 +0000)
commitb14cd24f1270e4240f2ac05df4fd6692d07bc942
treee23823dd160332d00649256f18ee1d28f1d1bac5
parent342c14842fa996181e5d5764701585b1b2f6d6cb
LU-3834 mdt: handle swap_layouts failures during restore

Actually nothing occur after swap_layouts failures during restore,
this can lead to file being left in incoherent state and thus be
unavailable because HS_RELEASED is clear but LOV_PATTERN_F_RELEASED
is still set.
This patch will allow original layout to be recovered by the use of
SWAP_LAYOUTS_MDS_HSM flag. Additionaly this requires HSM xattr of
the data FID to be set.
Also adds layout-swap failure injection and related test.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Id0e9a005362e4a3854b33f6ce1888197d20e7dbf
Reviewed-on: http://review.whamcloud.com/7631
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd_support.h
lustre/mdd/mdd_object.c
lustre/mdt/mdt_coordinator.c
lustre/tests/sanity-hsm.sh