Make inode64 a remountable option
PATCH v2 1/1 Make inode64 a remountable option
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 <[email protected]>
--- fs/xfs/xfs_super.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
fs/xfs/xfs_super.c +17 -1
@@ -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 } };
@@ -1043,6 +1044,7 @@ xfs_fs_remount(while ((p =strsep (&options,"," )) !=NULL ) {int token; +int i =0 ;if (!*p)continue ;
@@ -1055,6 +1057,20 @@ xfs_fs_remount(case Opt_nobarrier: mp->m_flags &= ~XFS_MOUNT_BARRIER ;break ; +case Opt_inode64: + +for (i =0 ; i < mp->m_sb.agcount; i++) { +struct xfs_perag *pag; + + pag =xfs_perag_get (mp, index); + 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; +break ;default :/* * Logically we would return an error here to prevent
Signature · 6 lines
1.7.11.2 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Sorry, added a wrong element in the loop, sending a V3 now.
Quoted 64 lines · 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 <[email protected]>--- fs/xfs/xfs_super.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)fs/xfs/xfs_super.c +17
-1@@ -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 } };@@ -1043,6 +1044,7 @@ xfs_fs_remount(while ((p =strsep (&options,"," )) !=NULL ) {int token; +int i =0 ;if (!*p)continue ;@@ -1055,6 +1057,20 @@ xfs_fs_remount(case Opt_nobarrier: mp->m_flags &= ~XFS_MOUNT_BARRIER ;break ; +case Opt_inode64: + +for (i =0 ; i < mp->m_sb.agcount; i++) { +struct xfs_perag *pag; + + pag =xfs_perag_get (mp, index); + 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; +break ;default :/* * Logically we would return an error here to prevent Signature · 6 lines
1.7.11.2 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Signature · 6 lines
--Carlos _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs