xfs
[Top] [All Lists]

Re: [PATCH 25/30 V2] libxfs: fix root inode handling inconsistencies

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 25/30 V2] libxfs: fix root inode handling inconsistencies
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 1 Nov 2013 09:04:38 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20131031150024.GP22359@xxxxxxxxxxxxx>
References: <1383107481-28937-1-git-send-email-david@xxxxxxxxxxxxx> <1383107481-28937-26-git-send-email-david@xxxxxxxxxxxxx> <20131030102318.GA31519@xxxxxxxxxxxxx> <20131030215940.GH6188@dastard> <20131031041343.GK6188@dastard> <20131031150024.GP22359@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 31, 2013 at 08:00:24AM -0700, Christoph Hellwig wrote:
> On Thu, Oct 31, 2013 at 03:13:43PM +1100, Dave Chinner wrote:
> > -   if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) {
> > -           if (mp->m_rootip)
> > -                   libxfs_iput(mp->m_rootip, 0);
> > +   /* set up the realtime inodes if they exist */
> > +   error = rtmount_inodes(mp);
> > +   if (error)
> >             return NULL;
> > -   }
> >  
> >     /*
> >      * mkfs calls mount before the AGF/AGI structures are written.
> >      */
> > -   if ((flags & LIBXFS_MOUNT_ROOTINOS) && sbp->sb_rootino != NULLFSINO &&
> > +   if (sbp->sb_rootino != NULLFSINO &&
> >         xfs_sb_version_haslazysbcount(&mp->m_sb)) {
> 
> Oh, I hadn't noticed that LIBXFS_MOUNT_ROOTINOS does more than reading
> the root inode.  Seems like mkfs might need the rt inodes if a file with
> the rt flag is specified in the proto file.

mkfs always allocates the rt inodes directly after the root
directory is created.

> I can't see how xfs_copy could need either the rt inodes nor the perag
> data.

Right, it doesn't need them, but it doesn't hurt at all to
initialise them because all the ag headers are about to be read to
find all the used space, anyway.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>