xfs
[Top] [All Lists]

Re: [PATCH V3] Make inode64 a remountable option

To: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
Subject: Re: [PATCH V3] Make inode64 a remountable option
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 17 Aug 2012 13:33:46 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1345171178-10447-1-git-send-email-cmaiolino@xxxxxxxxxx>
References: <1345171178-10447-1-git-send-email-cmaiolino@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Aug 16, 2012 at 11:39:38PM -0300, Carlos Maiolino wrote:
> +             case Opt_inode64:
> +
> +                     for (i = 0; i < mp->m_sb.sb_agcount; i++) {
> +                             struct xfs_perag        *pag;
> +
> +                             pag = xfs_perag_get(mp, i);
> +                             pag->pagi_inodeok = 1;
> +                             pag->pagf_metadata = 0;
> +                             xfs_perag_put(pag);
> +                     }
> +                     mp->m_flags &= ~(XFS_MOUNT_32BITINODES |
> +                                      XFS_MOUNT_SMALL_INUMS);
> +                     mp->m_maxagi = i;

Can you factor this into a little helper?  I hate having lots of code
and especially loops inside of deep switch statements.

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