[PATCH 15/37] libxfs: fix root inode handling inconsistencies
Christoph Hellwig
hch at infradead.org
Wed Nov 6 04:23:34 CST 2013
On Wed, Nov 06, 2013 at 12:07:01PM +1100, Dave Chinner wrote:
> mp = libxfs_mount(&xmount, sbp, x.ddev, x.logdev, x.rtdev,
> - LIBXFS_MOUNT_ROOTINOS | LIBXFS_MOUNT_DEBUGGER);
> + LIBXFS_MOUNT_DEBUGGER);
> if (!mp) {
> - mp = libxfs_mount(&xmount, sbp, x.ddev, x.logdev, x.rtdev,
> - LIBXFS_MOUNT_DEBUGGER);
> - if (!mp) {
> - fprintf(stderr, _("%s: device %s unusable (not an XFS "
> - "filesystem?)\n"), progname, fsdevice);
> - exit(1);
> - }
> + fprintf(stderr,
> + _("%s: device %s unusable (not an XFS filesystem?)\n"),
> + progname, fsdevice);
> + exit(1);
> }
> blkbb = 1 << mp->m_blkbb_log;
>
> + /*
> + * xfs_check needs corrected incore superblock values
> + */
> + if (sbp->sb_rootino != NULLFSINO &&
> + xfs_sb_version_haslazysbcount(&mp->m_sb)) {
> + int error = xfs_initialize_perag_data(mp, sbp->sb_agcount);
> + if (error) {
> + fprintf(stderr, _("%s: cannot init perag data (%d)\n"),
> + progname, error);
> + exit(EXIT_FAILURE);
The old code above just goes ahead without the perage data due to the
retry without LIBXFS_MOUNT_ROOTINOS. I think we should keep that
behaviour as we want to be able to run xfs_db under as many
circumstances as possible.
Otherwise looks good,
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list