* [PATCH V4] Make inode64 a remountable option
@ 2012-08-17 21:19 Carlos Maiolino
2012-08-20 23:05 ` Dave Chinner
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Carlos Maiolino @ 2012-08-17 21:19 UTC (permalink / raw)
To: xfs; +Cc: Carlos Maiolino
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>
---
fs/xfs/xfs_super.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index bdaf4cb..f1f2968 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}
};
@@ -1030,6 +1031,30 @@ xfs_restore_resvblks(struct xfs_mount *mp)
xfs_reserve_blocks(mp, &resblks, NULL);
}
+STATIC void
+xfs_set_inode64(struct xfs_mount *mp)
+{
+ int i = 0;
+
+ 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);
+ }
+
+ /* There is no need for lock protection on m_flags,
+ * the rw_semaphore of the VFS superblock is locked
+ * during mount/umount/remount operations, so this is
+ * enough to avoid concurency on the m_flags field
+ */
+ mp->m_flags &= ~(XFS_MOUNT_32BITINODES |
+ XFS_MOUNT_SMALL_INUMS);
+ mp->m_maxagi = i;
+}
+
STATIC int
xfs_fs_remount(
struct super_block *sb,
@@ -1055,6 +1080,9 @@ xfs_fs_remount(
case Opt_nobarrier:
mp->m_flags &= ~XFS_MOUNT_BARRIER;
break;
+ case Opt_inode64:
+ xfs_set_inode64(mp);
+ break;
default:
/*
* Logically we would return an error here to prevent
--
1.7.11.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V4] Make inode64 a remountable option
2012-08-17 21:19 [PATCH V4] Make inode64 a remountable option Carlos Maiolino
@ 2012-08-20 23:05 ` Dave Chinner
2012-08-20 23:16 ` Carlos Maiolino
2012-09-26 20:18 ` Mark Tinguely
2012-09-26 21:24 ` Ben Myers
2 siblings, 1 reply; 5+ messages in thread
From: Dave Chinner @ 2012-08-20 23:05 UTC (permalink / raw)
To: Carlos Maiolino; +Cc: xfs
On Fri, Aug 17, 2012 at 06:19:38PM -0300, 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>
Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Next up - make inode64 the default mount option....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V4] Make inode64 a remountable option
2012-08-20 23:05 ` Dave Chinner
@ 2012-08-20 23:16 ` Carlos Maiolino
0 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2012-08-20 23:16 UTC (permalink / raw)
To: xfs
> Looks good.
>
> Reviewed-by: Dave Chinner <dchinner@redhat.com>
>
> Next up - make inode64 the default mount option....
>
On my todo list
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
--
--Carlos
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V4] Make inode64 a remountable option
2012-08-17 21:19 [PATCH V4] Make inode64 a remountable option Carlos Maiolino
2012-08-20 23:05 ` Dave Chinner
@ 2012-09-26 20:18 ` Mark Tinguely
2012-09-26 21:24 ` Ben Myers
2 siblings, 0 replies; 5+ messages in thread
From: Mark Tinguely @ 2012-09-26 20:18 UTC (permalink / raw)
To: Carlos Maiolino; +Cc: xfs
On 08/17/12 16:19, 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>
> ---
Looks good.
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V4] Make inode64 a remountable option
2012-08-17 21:19 [PATCH V4] Make inode64 a remountable option Carlos Maiolino
2012-08-20 23:05 ` Dave Chinner
2012-09-26 20:18 ` Mark Tinguely
@ 2012-09-26 21:24 ` Ben Myers
2 siblings, 0 replies; 5+ messages in thread
From: Ben Myers @ 2012-09-26 21:24 UTC (permalink / raw)
To: Carlos Maiolino; +Cc: xfs
On Fri, Aug 17, 2012 at 06:19:38PM -0300, 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>
committed to git://oss.sgi.com/xfs/xfs.git, master and for-next branches.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-26 21:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 21:19 [PATCH V4] Make inode64 a remountable option Carlos Maiolino
2012-08-20 23:05 ` Dave Chinner
2012-08-20 23:16 ` Carlos Maiolino
2012-09-26 20:18 ` Mark Tinguely
2012-09-26 21:24 ` Ben Myers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.