xfs
[Top] [All Lists]

Re: [PATCH V2] refactor xfs_mountfs for clarity & stack savings

To: Donald Douwsma <donaldd@xxxxxxx>
Subject: Re: [PATCH V2] refactor xfs_mountfs for clarity & stack savings
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 01 Oct 2007 07:39:46 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <4700A68A.8070609@xxxxxxx>
References: <46D37A82.2080608@xxxxxxxxxxx> <20070828195221.GA7237@xxxxxxxxxxxxx> <46D48BDE.5000903@xxxxxxxxxxx> <4700A68A.8070609@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
Donald Douwsma wrote:
> Eric Sandeen wrote:
>> Refactoring xfs_mountfs() to call sub-functions for logical
>> chunks can help save a bit of stack, and can make it easier to
>> read this long function.
> 
> Finally got around to reviewing this one, sorry for the delay.
> 
> I think we've lost something in the refactoring.
> 
>> Index: linux-2.6-xfs/fs/xfs/xfs_mount.c
> ...
>> -    /*
>> -     * XFS uses the uuid from the superblock as the unique
>> -     * identifier for fsid.  We can not use the uuid from the volume
>> -     * since a single partition filesystem is identical to a single
>> -     * partition volume/filesystem.
>> -     */
>> -    if ((mfsi_flags & XFS_MFSI_SECOND) == 0 &&
>> -        (mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
>> -            if (xfs_uuid_mount(mp)) {
>> -                    error = XFS_ERROR(EINVAL);
>> -                    goto error1;
>> -            }
>> -            uuid_mounted=1;
> 
> The patch removes uuid_mounted=1, but doesn't put it back in anywhere.
> I think we need that bit for error handling :)

Hm, no idea how I lost that... maybe in bouncing from cvs to kernel.org
version.  Sorry, will look this evening & fix it up.

-Eric


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