* [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM
@ 2013-10-02 21:00 Mark Tinguely
2013-10-03 14:37 ` Carlos Maiolino
0 siblings, 1 reply; 4+ messages in thread
From: Mark Tinguely @ 2013-10-02 21:00 UTC (permalink / raw)
To: xfs
[-- Attachment #1: v2-xfs-add-the-inode-directory-type-support-to-XFS_IOC_FSGEOM.patch --]
[-- Type: text/plain, Size: 2056 bytes --]
Add the inode type directory type support to XFS_IOC_FSGEOM
so that xfs_repair/xfs_info knows if the superblock v4 filesystem
enabled the feature.
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
---
v2 remove the extra 0 in the XFS_FSOP_GEOM_FLAGS_xxx entries.
fs/xfs/xfs_fs.h | 32 ++++++++++++++++----------------
fs/xfs/xfs_fs.h | 4 ++--
fs/xfs/xfs_fsops.c | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
Index: b/fs/xfs/xfs_fs.h
===================================================================
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -233,11 +233,11 @@ typedef struct xfs_fsop_resblks {
#define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */
#define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */
#define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework */
-#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
+#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
#define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */
#define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters */
#define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */
-
+#define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */
/*
* Minimum and maximum sizes need for growth checks.
Index: b/fs/xfs/xfs_fsops.c
===================================================================
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -101,7 +101,9 @@ xfs_fs_geometry(
(xfs_sb_version_hasprojid32bit(&mp->m_sb) ?
XFS_FSOP_GEOM_FLAGS_PROJID32 : 0) |
(xfs_sb_version_hascrc(&mp->m_sb) ?
- XFS_FSOP_GEOM_FLAGS_V5SB : 0);
+ XFS_FSOP_GEOM_FLAGS_V5SB : 0) |
+ (xfs_sb_version_hasftype(&mp->m_sb) ?
+ XFS_FSOP_GEOM_FLAGS_FTYPE : 0);
geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
mp->m_sb.sb_logsectsize : BBSIZE;
geo->rtsectsize = mp->m_sb.sb_blocksize;
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM
2013-10-02 21:00 [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM Mark Tinguely
@ 2013-10-03 14:37 ` Carlos Maiolino
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Maiolino @ 2013-10-03 14:37 UTC (permalink / raw)
To: Mark Tinguely; +Cc: xfs
Looks good,
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
On Wed, Oct 02, 2013 at 04:00:06PM -0500, Mark Tinguely wrote:
> Add the inode type directory type support to XFS_IOC_FSGEOM
> so that xfs_repair/xfs_info knows if the superblock v4 filesystem
> enabled the feature.
>
> Signed-off-by: Mark Tinguely <tinguely@sgi.com>
> ---
> v2 remove the extra 0 in the XFS_FSOP_GEOM_FLAGS_xxx entries.
>
> fs/xfs/xfs_fs.h | 32 ++++++++++++++++----------------
> fs/xfs/xfs_fs.h | 4 ++--
> fs/xfs/xfs_fsops.c | 4 +++-
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> Index: b/fs/xfs/xfs_fs.h
> ===================================================================
> --- a/fs/xfs/xfs_fs.h
> +++ b/fs/xfs/xfs_fs.h
> @@ -233,11 +233,11 @@ typedef struct xfs_fsop_resblks {
> #define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */
> #define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */
> #define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework */
> -#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
> +#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
> #define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */
> #define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters */
> #define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */
> -
> +#define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */
>
> /*
> * Minimum and maximum sizes need for growth checks.
> Index: b/fs/xfs/xfs_fsops.c
> ===================================================================
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -101,7 +101,9 @@ xfs_fs_geometry(
> (xfs_sb_version_hasprojid32bit(&mp->m_sb) ?
> XFS_FSOP_GEOM_FLAGS_PROJID32 : 0) |
> (xfs_sb_version_hascrc(&mp->m_sb) ?
> - XFS_FSOP_GEOM_FLAGS_V5SB : 0);
> + XFS_FSOP_GEOM_FLAGS_V5SB : 0) |
> + (xfs_sb_version_hasftype(&mp->m_sb) ?
> + XFS_FSOP_GEOM_FLAGS_FTYPE : 0);
> geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
> mp->m_sb.sb_logsectsize : BBSIZE;
> geo->rtsectsize = mp->m_sb.sb_blocksize;
>
>
> _______________________________________________
> 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] 4+ messages in thread
[parent not found: <20130917144721.917667018@sgi.com>]
* [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM
[not found] <20130917144721.917667018@sgi.com>
@ 2013-09-17 14:47 ` Mark Tinguely
2013-09-18 21:54 ` Dave Chinner
0 siblings, 1 reply; 4+ messages in thread
From: Mark Tinguely @ 2013-09-17 14:47 UTC (permalink / raw)
To: xfs
[-- Attachment #1: xfs-add-ftype-geo.patch --]
[-- Type: text/plain, Size: 3356 bytes --]
Signed-off-by: Mark Tinguely <tinguely@sgi.com>
---
fs/xfs/xfs_fs.h | 32 ++++++++++++++++----------------
fs/xfs/xfs_fsops.c | 4 +++-
2 files changed, 19 insertions(+), 17 deletions(-)
Index: b/fs/xfs/xfs_fs.h
===================================================================
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -222,22 +222,22 @@ typedef struct xfs_fsop_resblks {
#define XFS_FSOP_GEOM_VERSION 0
-#define XFS_FSOP_GEOM_FLAGS_ATTR 0x0001 /* attributes in use */
-#define XFS_FSOP_GEOM_FLAGS_NLINK 0x0002 /* 32-bit nlink values */
-#define XFS_FSOP_GEOM_FLAGS_QUOTA 0x0004 /* quotas enabled */
-#define XFS_FSOP_GEOM_FLAGS_IALIGN 0x0008 /* inode alignment */
-#define XFS_FSOP_GEOM_FLAGS_DALIGN 0x0010 /* large data alignment */
-#define XFS_FSOP_GEOM_FLAGS_SHARED 0x0020 /* read-only shared */
-#define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x0040 /* special extent flag */
-#define XFS_FSOP_GEOM_FLAGS_DIRV2 0x0080 /* directory version 2 */
-#define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */
-#define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */
-#define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework */
-#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
-#define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */
-#define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters */
-#define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */
-
+#define XFS_FSOP_GEOM_FLAGS_ATTR 0x00001 /* attributes in use */
+#define XFS_FSOP_GEOM_FLAGS_NLINK 0x00002 /* 32-bit nlink values */
+#define XFS_FSOP_GEOM_FLAGS_QUOTA 0x00004 /* quotas enabled */
+#define XFS_FSOP_GEOM_FLAGS_IALIGN 0x00008 /* inode alignment */
+#define XFS_FSOP_GEOM_FLAGS_DALIGN 0x00010 /* large data alignment */
+#define XFS_FSOP_GEOM_FLAGS_SHARED 0x00020 /* read-only shared */
+#define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x00040 /* special extent flag */
+#define XFS_FSOP_GEOM_FLAGS_DIRV2 0x00080 /* directory version 2 */
+#define XFS_FSOP_GEOM_FLAGS_LOGV2 0x00100 /* log format version 2 */
+#define XFS_FSOP_GEOM_FLAGS_SECTOR 0x00200 /* sector sizes >1BB */
+#define XFS_FSOP_GEOM_FLAGS_ATTR2 0x00400 /* inline attributes rework */
+#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x00800 /* 32-bit project IDs */
+#define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x01000 /* ASCII only CI names */
+#define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x04000 /* lazy superblock counters */
+#define XFS_FSOP_GEOM_FLAGS_V5SB 0x08000 /* version 5 superblock */
+#define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */
/*
* Minimum and maximum sizes need for growth checks.
Index: b/fs/xfs/xfs_fsops.c
===================================================================
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -101,7 +101,9 @@ xfs_fs_geometry(
(xfs_sb_version_hasprojid32bit(&mp->m_sb) ?
XFS_FSOP_GEOM_FLAGS_PROJID32 : 0) |
(xfs_sb_version_hascrc(&mp->m_sb) ?
- XFS_FSOP_GEOM_FLAGS_V5SB : 0);
+ XFS_FSOP_GEOM_FLAGS_V5SB : 0) |
+ (xfs_sb_version_hasftype(&mp->m_sb) ?
+ XFS_FSOP_GEOM_FLAGS_FTYPE : 0);
geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
mp->m_sb.sb_logsectsize : BBSIZE;
geo->rtsectsize = mp->m_sb.sb_blocksize;
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM
2013-09-17 14:47 ` Mark Tinguely
@ 2013-09-18 21:54 ` Dave Chinner
0 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2013-09-18 21:54 UTC (permalink / raw)
To: Mark Tinguely; +Cc: xfs
On Tue, Sep 17, 2013 at 09:47:22AM -0500, Mark Tinguely wrote:
> Signed-off-by: Mark Tinguely <tinguely@sgi.com>
> ---
> fs/xfs/xfs_fs.h | 32 ++++++++++++++++----------------
> fs/xfs/xfs_fsops.c | 4 +++-
> 2 files changed, 19 insertions(+), 17 deletions(-)
>
> Index: b/fs/xfs/xfs_fs.h
> ===================================================================
> --- a/fs/xfs/xfs_fs.h
> +++ b/fs/xfs/xfs_fs.h
> @@ -222,22 +222,22 @@ typedef struct xfs_fsop_resblks {
>
> #define XFS_FSOP_GEOM_VERSION 0
>
> -#define XFS_FSOP_GEOM_FLAGS_ATTR 0x0001 /* attributes in use */
> -#define XFS_FSOP_GEOM_FLAGS_NLINK 0x0002 /* 32-bit nlink values */
> -#define XFS_FSOP_GEOM_FLAGS_QUOTA 0x0004 /* quotas enabled */
> -#define XFS_FSOP_GEOM_FLAGS_IALIGN 0x0008 /* inode alignment */
> -#define XFS_FSOP_GEOM_FLAGS_DALIGN 0x0010 /* large data alignment */
> -#define XFS_FSOP_GEOM_FLAGS_SHARED 0x0020 /* read-only shared */
> -#define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x0040 /* special extent flag */
> -#define XFS_FSOP_GEOM_FLAGS_DIRV2 0x0080 /* directory version 2 */
> -#define XFS_FSOP_GEOM_FLAGS_LOGV2 0x0100 /* log format version 2 */
> -#define XFS_FSOP_GEOM_FLAGS_SECTOR 0x0200 /* sector sizes >1BB */
> -#define XFS_FSOP_GEOM_FLAGS_ATTR2 0x0400 /* inline attributes rework */
> -#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x0800 /* 32-bit project IDs */
> -#define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x1000 /* ASCII only CI names */
> -#define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x4000 /* lazy superblock counters */
> -#define XFS_FSOP_GEOM_FLAGS_V5SB 0x8000 /* version 5 superblock */
> -
> +#define XFS_FSOP_GEOM_FLAGS_ATTR 0x00001 /* attributes in use */
> +#define XFS_FSOP_GEOM_FLAGS_NLINK 0x00002 /* 32-bit nlink values */
> +#define XFS_FSOP_GEOM_FLAGS_QUOTA 0x00004 /* quotas enabled */
> +#define XFS_FSOP_GEOM_FLAGS_IALIGN 0x00008 /* inode alignment */
> +#define XFS_FSOP_GEOM_FLAGS_DALIGN 0x00010 /* large data alignment */
> +#define XFS_FSOP_GEOM_FLAGS_SHARED 0x00020 /* read-only shared */
> +#define XFS_FSOP_GEOM_FLAGS_EXTFLG 0x00040 /* special extent flag */
> +#define XFS_FSOP_GEOM_FLAGS_DIRV2 0x00080 /* directory version 2 */
> +#define XFS_FSOP_GEOM_FLAGS_LOGV2 0x00100 /* log format version 2 */
> +#define XFS_FSOP_GEOM_FLAGS_SECTOR 0x00200 /* sector sizes >1BB */
> +#define XFS_FSOP_GEOM_FLAGS_ATTR2 0x00400 /* inline attributes rework */
> +#define XFS_FSOP_GEOM_FLAGS_PROJID32 0x00800 /* 32-bit project IDs */
> +#define XFS_FSOP_GEOM_FLAGS_DIRV2CI 0x01000 /* ASCII only CI names */
> +#define XFS_FSOP_GEOM_FLAGS_LAZYSB 0x04000 /* lazy superblock counters */
> +#define XFS_FSOP_GEOM_FLAGS_V5SB 0x08000 /* version 5 superblock */
> +#define XFS_FSOP_GEOM_FLAGS_FTYPE 0x10000 /* inode directory types */
There is no need to do this. Can you drop these hunks as this simply
adds more work to synchronise with userspace.
> Index: b/fs/xfs/xfs_fsops.c
> ===================================================================
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -101,7 +101,9 @@ xfs_fs_geometry(
> (xfs_sb_version_hasprojid32bit(&mp->m_sb) ?
> XFS_FSOP_GEOM_FLAGS_PROJID32 : 0) |
> (xfs_sb_version_hascrc(&mp->m_sb) ?
> - XFS_FSOP_GEOM_FLAGS_V5SB : 0);
> + XFS_FSOP_GEOM_FLAGS_V5SB : 0) |
> + (xfs_sb_version_hasftype(&mp->m_sb) ?
> + XFS_FSOP_GEOM_FLAGS_FTYPE : 0);
> geo->logsectsize = xfs_sb_version_hassector(&mp->m_sb) ?
> mp->m_sb.sb_logsectsize : BBSIZE;
> geo->rtsectsize = mp->m_sb.sb_blocksize;
That looks good - can you post the patches to userspace that use
this so we can test it properly?
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] 4+ messages in thread
end of thread, other threads:[~2013-10-03 14:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 21:00 [PATCH] xfs: add the inode directory type support to XFS_IOC_FSGEOM Mark Tinguely
2013-10-03 14:37 ` Carlos Maiolino
[not found] <20130917144721.917667018@sgi.com>
2013-09-17 14:47 ` Mark Tinguely
2013-09-18 21:54 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox