public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] Make inode64 a remountable option
Date: Thu, 16 Aug 2012 16:23:21 -0400	[thread overview]
Message-ID: <502D56B9.9080606@redhat.com> (raw)
In-Reply-To: <1345142110-6412-1-git-send-email-cmaiolino@redhat.com>

On 08/16/2012 02:35 PM, Carlos Maiolino wrote:
> Actually, there is no reason about why a user must umount and mount a XFS
> filesystem to enable 'inode64' option. So, this patch makes this a remountable
> option.
> 
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>

I just gave it a whirl. It works and the code looks sane to me, so:

Reviewed-by: Brian Foster <bfoster@redhat.com>

I do have a question though... do we care about the remount from inode64
to non-inode64 case?

Brian

> ---
>  fs/xfs/xfs_super.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index bdaf4cb..4dad567 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -120,12 +120,13 @@ mempool_t *xfs_ioend_pool;
>   * in the future, too.
>   */
>  enum {
> -	Opt_barrier, Opt_nobarrier, Opt_err
> +	Opt_barrier, Opt_nobarrier, Opt_inode64, Opt_err
>  };
>  
>  static const match_table_t tokens = {
>  	{Opt_barrier, "barrier"},
>  	{Opt_nobarrier, "nobarrier"},
> +	{Opt_inode64, "inode64"},
>  	{Opt_err, NULL}
>  };
>  
> @@ -1038,11 +1039,15 @@ xfs_fs_remount(
>  {
>  	struct xfs_mount	*mp = XFS_M(sb);
>  	substring_t		args[MAX_OPT_ARGS];
> +	xfs_sb_t		*sbp = &(mp->m_sb);
> +	xfs_perag_t		*pag;
>  	char			*p;
>  	int			error;
>  
>  	while ((p = strsep(&options, ",")) != NULL) {
>  		int token;
> +		int agcount = sbp->sb_agcount;
> +		int index = 0;
>  
>  		if (!*p)
>  			continue;
> @@ -1055,6 +1060,17 @@ xfs_fs_remount(
>  		case Opt_nobarrier:
>  			mp->m_flags &= ~XFS_MOUNT_BARRIER;
>  			break;
> +		case Opt_inode64:
> +
> +			for (index = 0; index < agcount; index++) {
> +				pag = xfs_perag_get(mp, index);
> +				pag->pagi_inodeok = 1;
> +				xfs_perag_put(pag);
> +			}
> +			mp->m_flags &= ~XFS_MOUNT_32BITINODES;
> +			mp->m_flags &= ~XFS_MOUNT_SMALL_INUMS;
> +			mp->m_maxagi = index;
> +			break;
>  		default:
>  			/*
>  			 * Logically we would return an error here to prevent
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-08-16 20:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 18:35 [PATCH] Make inode64 a remountable option Carlos Maiolino
2012-08-16 20:23 ` Brian Foster [this message]
2012-08-17  1:20   ` Carlos Maiolino
2012-08-17  1:42     ` Dave Chinner
2012-08-16 22:40 ` Dave Chinner
2012-08-17  0:46   ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502D56B9.9080606@redhat.com \
    --to=bfoster@redhat.com \
    --cc=cmaiolino@redhat.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox