When the rtgroups feature is enabled, format rtbitmap blocks with the
appropriate block headers. libxfs takes care of the actual writing for
us, so all we have to do is ensure that the bitmap is the correct size.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
bool nortalign;
bool nrext64;
bool exchrange; /* XFS_SB_FEAT_INCOMPAT_EXCHRANGE */
+ bool rtgroups; /* XFS_SB_FEAT_INCOMPAT_RTGROUPS */
};
struct cli_params {
struct cli_params *cli)
{
struct libxfs_init *xi = cli->xi;
+ unsigned int rbmblocksize = cfg->blocksize;
if (!xi->rt.dev) {
if (cli->rtsize) {
_("cannot have an rt subvolume with zero extents\n"));
usage();
}
+ if (cfg->sb_feat.rtgroups)
+ rbmblocksize -= sizeof(struct xfs_rtbuf_blkinfo);
cfg->rtbmblocks = (xfs_extlen_t)howmany(cfg->rtextents,
- NBBY * cfg->blocksize);
+ NBBY * rbmblocksize);
}
static bool