xfs: move xfs_ino_geometry to xfs_mount.h
PATCH 1/1 xfs: move xfs_ino_geometry to xfs_mount.h
From: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to xfs_mount.h.
--- fs/xfs/libxfs/xfs_format.h | 41 ----------------------------------------- fs/xfs/xfs_mount.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 41 deletions(-)
fs/xfs/libxfs/xfs_format.h +0 -41
@@ -1694,45 +1694,4 @@ struct xfs_acl {#define SGI_ACL_FILE_SIZE (sizeof(SGI_ACL_FILE)-1)#define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) -struct xfs_ino_geometry { -/* Maximum inode count in this filesystem. */ -uint64_t maxicount; - -/* Actual inode cluster buffer size, in bytes. */ -unsigned int inode_cluster_size; - -/* -* Desired inode cluster buffer size, in bytes. This value is not -* rounded up to at least one filesystem block, which is necessary for -* the sole purpose of validating sb_spino_align. Runtime code must -* only ever use inode_cluster_size. -*/ -unsigned int inode_cluster_size_raw; - -/* Inode cluster sizes, adjusted to be at least 1 fsb. */ -unsigned int inodes_per_cluster; -unsigned int blocks_per_cluster; - -/* Inode cluster alignment. */ -unsigned int cluster_align; -unsigned int cluster_align_inodes; -unsigned int inoalign_mask;/* mask sb_inoalignmt if used */ - -unsigned int inobt_mxr[2 ];/* max inobt btree records */ -unsigned int inobt_mnr[2 ];/* min inobt btree records */ -unsigned int inobt_maxlevels;/* max inobt btree levels. */ - -/* Size of inode allocations under normal operation. */ -unsigned int ialloc_inos; -unsigned int ialloc_blks; - -/* Minimum inode blocks for a sparse allocation. */ -unsigned int ialloc_min_blks; - -/* stripe unit inode alignment */ -unsigned int ialloc_align; - -unsigned int agino_log;/* #bits for agino in inum */ -}; -#endif /* __XFS_FORMAT_H__ */
fs/xfs/xfs_mount.h +42 -0
48 lines not on this page · raw message
Quoted 4 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to
xfs_mount.h.
That means we have to duplicate it in userspace - xfs_mount.h is not shared. I'd suggest that libxfs/xfs_shared.h would be a better place for it.
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
Quoted 9 lines · Dave Chinner
Quoted 4 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to
xfs_mount.h.That means we have to duplicate it in userspace -
xfs_mount.his not shared. I'd suggest thatlibxfs/xfs_shared.hwould be a better place for it.
Well that will make the patch wayyy bigger since now every file has to include xfs_shared.h (right now 26 of them do not)...
--D
Quoted 6 lines
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]
PATCH v2 1/1 xfs: move xfs_ino_geometry to xfs_shared.h
In reply to Darrick J. WongFrom: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to xfs_shared.h.
---
v2: move it to xfs_shared.h, which now every file has to include
--- fs/xfs/libxfs/xfs_dir2.c | 1 + fs/xfs/libxfs/xfs_dir2_block.c | 1 + fs/xfs/libxfs/xfs_dir2_data.c | 1 + fs/xfs/libxfs/xfs_dir2_leaf.c | 1 + fs/xfs/libxfs/xfs_dir2_node.c | 1 + fs/xfs/libxfs/xfs_dir2_sf.c | 1 + fs/xfs/libxfs/xfs_format.h | 41 --------------------------------------- fs/xfs/libxfs/xfs_iext_tree.c | 1 + fs/xfs/libxfs/xfs_inode_fork.c | 1 + fs/xfs/libxfs/xfs_shared.h | 42 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_acl.c | 1 + fs/xfs/xfs_attr_list.c | 1 + fs/xfs/xfs_buf.c | 1 + fs/xfs/xfs_buf_item.c | 1 + fs/xfs/xfs_dir2_readdir.c | 1 + fs/xfs/xfs_discard.c | 1 + fs/xfs/xfs_dquot_item.c | 1 + fs/xfs/xfs_error.c | 1 + fs/xfs/xfs_export.c | 1 + fs/xfs/xfs_filestream.c | 1 + fs/xfs/xfs_icache.c | 1 + fs/xfs/xfs_inode_item.c | 1 + fs/xfs/xfs_ioctl32.c | 1 + fs/xfs/xfs_message.c | 1 + fs/xfs/xfs_pnfs.c | 1 + fs/xfs/xfs_qm_bhv.c | 1 + fs/xfs/xfs_quotaops.c | 1 + fs/xfs/xfs_trans_ail.c | 1 + fs/xfs/xfs_xattr.c | 1 + 29 files changed, 69 insertions(+), 41 deletions(-)
fs/xfs/libxfs/xfs_dir2.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_dir2_block.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_dir2_data.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_dir2_leaf.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_dir2_node.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_dir2_sf.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_format.h +0 -41
45 lines not on this page · raw message
fs/xfs/libxfs/xfs_iext_tree.c +1 -0
@@ -7,6 +7,7 @@#include <linux/kernel.h> #include <linux/slab.h> #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_bit.h" #include "xfs_log_format.h"
fs/xfs/libxfs/xfs_inode_fork.c +1 -0
@@ -7,6 +7,7 @@#include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/libxfs/xfs_shared.h +42 -0
46 lines not on this page · raw message
fs/xfs/xfs_acl.c +1 -0
@@ -4,6 +4,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_attr_list.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_buf.c +1 -0
@@ -22,6 +22,7 @@#include <linux/backing-dev.h> #include <linux/freezer.h> +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_buf_item.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_dir2_readdir.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_discard.c +1 -0
@@ -4,6 +4,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_dquot_item.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_error.c +1 -0
@@ -4,6 +4,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_fs.h" #include "xfs_log_format.h"
fs/xfs/xfs_export.c +1 -0
@@ -4,6 +4,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_filestream.c +1 -0
@@ -5,6 +5,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_icache.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_inode_item.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_ioctl32.c +1 -0
@@ -11,6 +11,7 @@#include <linux/fsmap.h> #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_message.c +1 -0
@@ -6,6 +6,7 @@#include "xfs.h" #include "xfs_fs.h" #include "xfs_error.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_pnfs.c +1 -0
@@ -4,6 +4,7 @@*/ #include <linux/iomap.h> #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_qm_bhv.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_quotaops.c +1 -0
@@ -4,6 +4,7 @@* All Rights Reserved. */ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_trans_ail.c +1 -0
@@ -6,6 +6,7 @@*/ #include "xfs.h" #include "xfs_fs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
fs/xfs/xfs_xattr.c +1 -0
@@ -5,6 +5,7 @@*/ #include "xfs.h" +#include "xfs_shared.h" #include "xfs_format.h" #include "xfs_log_format.h" #include "xfs_trans_resv.h"
Re: [PATCH v2] xfs: move xfs_ino_geometry to xfs_shared.h
Quoted 31 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to
xfs_shared.h.Signed-off-by Darrick J. Wong <[email protected]>---
v2: move it toxfs_shared.h, which now every file has to include--- fs/xfs/libxfs/xfs_dir2.c | 1 + fs/xfs/libxfs/xfs_dir2_block.c | 1 + fs/xfs/libxfs/xfs_dir2_data.c | 1 + fs/xfs/libxfs/xfs_dir2_leaf.c | 1 + fs/xfs/libxfs/xfs_dir2_node.c | 1 + fs/xfs/libxfs/xfs_dir2_sf.c | 1 + fs/xfs/libxfs/xfs_format.h | 41 --------------------------------------- fs/xfs/libxfs/xfs_iext_tree.c | 1 + fs/xfs/libxfs/xfs_inode_fork.c | 1 + fs/xfs/libxfs/xfs_shared.h | 42 ++++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_acl.c | 1 + fs/xfs/xfs_attr_list.c | 1 + fs/xfs/xfs_buf.c | 1 + fs/xfs/xfs_buf_item.c | 1 + fs/xfs/xfs_dir2_readdir.c | 1 + fs/xfs/xfs_discard.c | 1 + fs/xfs/xfs_dquot_item.c | 1 + fs/xfs/xfs_error.c | 1 + fs/xfs/xfs_export.c | 1 + fs/xfs/xfs_filestream.c | 1 + fs/xfs/xfs_icache.c | 1 + fs/xfs/xfs_inode_item.c | 1 +
Quoted 8 lines
fs/xfs/xfs_ioctl32.c | 1 + fs/xfs/xfs_message.c | 1 + fs/xfs/xfs_pnfs.c | 1 + fs/xfs/xfs_qm_bhv.c | 1 + fs/xfs/xfs_quotaops.c | 1 + fs/xfs/xfs_trans_ail.c | 1 + fs/xfs/xfs_xattr.c | 1 + 29 files changed, 69 insertions(+), 41 deletions(-)
Bigger patch, but I think it's the right way to do this.
Signature · 2 lines
Dave Chinner [email protected]
Re: [PATCH v2] xfs: move xfs_ino_geometry to xfs_shared.h
In reply to Darrick J. WongQuoted 6 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
The inode geometry structure isn't related to ondisk format; it's support for the mount structure. Move it to
xfs_shared.h.Signed-off-by Darrick J. Wong <[email protected]>
Looks good,