Whamcloud - gitweb
LU-8998 pfl: enhance PFID EA for PFL
This is a misc patch that contains some adjustments to
store more stripe information in the OST-object's PFID
EA (XATTR_NAME_FID), including:
1) For regular file, store the stripe count and stripe
size information in its OST-object's PFID EA. These
information are necessary for the LFSCK to recover
the MDT-object layout EA from orphan OST-object(s).
2) In addition, for PFL file, store the FPL component
ID and extent information in its OST-object's PFID
EA also. These information are also necessary for
the LFSCK to recover the MDT-object PFL layout EA
from orphan OST-object(s).
3) For ldiskfs backend, there may be not enough space
in inode body (256 bytes by default) to hold the
enlarged PFID EA. To avoid performance trouble if
store the enlarged PFID EA in separated block, we
make some hack (for the device with 256 bytes or
smaller inode) inside osd-ldiskfs via merging the
PFID EA into the LMA EA (XATTR_NAME_LMA) to save
EA entry space, then allows both the original LMA
EA and the PFID EA to be filled in the inode body
without performance trouble. For that, introduce
two compat flags: LMAC_STRIPE and LMAC_PFL.
4) It is client duty to transfer the stripe and PFL
information to the OST via the write, setattr and
punch RPC. Then OST will store these information
in the PFID EA.
5) On the other hand, to recover the lost or crashed
MDT-object's layout EA from orphan OST-object(s),
the LFSCK on the OST needs to return the orphan's
stripe and PFL (if have) information to the MDT.
Originally, we only returned the MDT-object's FID
(and owner) information. Now, we need to return
related layout information also. For such purpose,
new structure 'lu_orphan_rec_v2' replaces the old
'lu_orphan_rec', and the idx_info::ii_recsize is
used to indicates whether new 'lu_orphan_rec_v2'
or old ''lu_orphan_rec' is used.
Reviewed-on: https://review.whamcloud.com/24882
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I5a69dbe91b1f83eeb394ce54453352d84a285193
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
32 files changed: