xfs
[Top] [All Lists]

Re: [PATCH 5/6] xfs: disable noattr2/attr2 mount options for CRC enabled

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/6] xfs: disable noattr2/attr2 mount options for CRC enabled filesystems
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Mon, 03 Jun 2013 15:02:19 -0400
Cc: xfs@xxxxxxxxxxx, bpm@xxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370237332-24757-6-git-send-email-david@xxxxxxxxxxxxx>
References: <1370237332-24757-1-git-send-email-david@xxxxxxxxxxxxx> <1370237332-24757-6-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6
On 06/03/2013 01:28 AM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> attr2 format is always enabled for v5 superblock filesystems, so the
> mount options to enable or disable it need to be cause mount errors.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  Documentation/filesystems/xfs.txt |    3 +++
>  fs/xfs/xfs_super.c                |   11 +++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/Documentation/filesystems/xfs.txt 
> b/Documentation/filesystems/xfs.txt
> index 3e4b3dd..83577f0 100644
> --- a/Documentation/filesystems/xfs.txt
> +++ b/Documentation/filesystems/xfs.txt
> @@ -33,6 +33,9 @@ When mounting an XFS filesystem, the following options are 
> accepted.
>       removing extended attributes) the on-disk superblock feature
>       bit field will be updated to reflect this format being in use.
>  
> +     CRC enabled filesystems always use the attr2 format, and so
> +     will reject the noattr2 mount option if it is set.
> +
>    barrier
>       Enables the use of block layer write barriers for writes into
>       the journal and unwritten extent conversion.  This allows for
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index ea341ce..f62abb2 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1373,6 +1373,17 @@ xfs_finish_flags(
>       }
>  
>       /*
> +      * CRC enabled filesystems always use attr2 format for attributes.
> +      */
> +     if (xfs_sb_version_hascrc(&mp->m_sb) &&
> +         (mp->m_flags & XFS_MOUNT_NOATTR2)) {
> +             xfs_warn(mp,
> +"Cannot mount a V5 filesystems as %s. %s is always enabled for v5 
> filesystems.",
                      filesystem

(or alternatively remove the 'a').

... and V5 and v5 is inconsistent, fwiw. :P Nits, nonetheless...

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

> +                     MNTOPT_NOATTR2, MNTOPT_ATTR2);
> +             return XFS_ERROR(EINVAL);
> +     }
> +
> +     /*
>        * mkfs'ed attr2 will turn on attr2 mount unless explicitly
>        * told by noattr2 to turn it off
>        */
> 

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