Allow RT growfs when rtstart is set in the geomety, and adjust the
queried size for it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
progname, fname);
exit(1);
}
- if (rflag && !xi.rt.dev) {
+ if (rflag && (!xi.rt.dev && !geo.rtstart)) {
fprintf(stderr,
_("%s: failed to access realtime device for %s\n"),
progname, fname);
xfs_report_geom(&geo, datadev, logdev, rtdev);
+ if (geo.rtstart) {
+ xfs_daddr_t rtstart = geo.rtstart * (geo.blocksize / BBSIZE);
+
+ xi.rt.size = xi.data.size - rtstart;
+ xi.data.size = rtstart;
+ }
+
ddsize = xi.data.size;
dlsize = (xi.log.size ? xi.log.size :
geo.logblocks * (geo.blocksize / BBSIZE) );