Whamcloud - gitweb
LU-169 lov: add generation number to LOV EA
This patch shrinks lov_mds_md_v*::lmm_stripe_count to 16 bits and use
the remaining 16 bits to store a generation number for the layout.
This generation will be used in conjunction the layout lock to allow
clients to detect when the file layout has changed.
The layout generation starts at 0 and will be bumped each time the
file layout is altered.
For backward compatibility, the layout generation is set to 0 when the
layout is sent to a client that does not support
OBD_CONNECT_LAYOUTLOCK.
This patch also stores OBD_INCOMPAT_LMM_VER in the MDS last_rcvd file
to prevent older versions of Lustre that cannot deal with a 16-bit
lmm_stripe from mounting the filesystem and exporting layouts to older
clients without setting the layout to 0. This flag will be set in the
last_rcvd file only once we start modifying file layouts, but at least
the current version should not be confused by a 16-bit stripe count
and a non-zero generation.
Signed-off-by: Jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ic40083227057eba565287d1a10890875b8a96c13
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1866
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
30 files changed: