If we're using an external log device and the caller doesn't give us a
lsunit, use the block device geometry (if present) to set it.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
}
/*
- * check that log sunit is modulo fsblksize or default it to dsunit.
+ * check that log sunit is modulo fsblksize; default it to dsunit for
+ * an internal log; or the log device stripe unit if it's external.
*/
if (lsunit) {
/* convert from 512 byte blocks to fs blocks */
cfg->loginternal && cfg->dsunit) {
/* lsunit and dsunit now in fs blocks */
cfg->lsunit = cfg->dsunit;
+ } else if (cfg->sb_feat.log_version == 2 &&
+ !cfg->loginternal) {
+ /* use the external log device properties */
+ cfg->lsunit = DTOBT(ft->log.sunit, cfg->blocklog);
}
if (cfg->sb_feat.log_version == 2 &&