From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 11/16] xfs: move node entry counts to xfs_da_geometry
Date: Fri, 23 May 2014 10:03:47 +1000 [thread overview]
Message-ID: <1400803432-20048-12-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1400803432-20048-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
fs/xfs/xfs_attr.c | 8 ++++----
fs/xfs/xfs_da_btree.c | 4 ++--
fs/xfs/xfs_dir2.c | 3 ---
fs/xfs/xfs_dir2_node.c | 10 +++++-----
fs/xfs/xfs_mount.h | 2 --
5 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index c547498..8bb9ae6 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -899,7 +899,7 @@ restart:
state->args = args;
state->mp = mp;
state->blocksize = state->mp->m_sb.sb_blocksize;
- state->node_ents = state->mp->m_attr_node_ents;
+ state->node_ents = args->geo->node_ents;
/*
* Search to see if name already exists, and get back a pointer
@@ -1078,7 +1078,7 @@ restart:
state->args = args;
state->mp = mp;
state->blocksize = state->mp->m_sb.sb_blocksize;
- state->node_ents = state->mp->m_attr_node_ents;
+ state->node_ents = args->geo->node_ents;
state->inleaf = 0;
error = xfs_da3_node_lookup_int(state, &retval);
if (error)
@@ -1170,7 +1170,7 @@ xfs_attr_node_removename(xfs_da_args_t *args)
state->args = args;
state->mp = dp->i_mount;
state->blocksize = state->mp->m_sb.sb_blocksize;
- state->node_ents = state->mp->m_attr_node_ents;
+ state->node_ents = args->geo->node_ents;
/*
* Search to see if name exists, and get back a pointer to it.
@@ -1433,7 +1433,7 @@ xfs_attr_node_get(xfs_da_args_t *args)
state->args = args;
state->mp = args->dp->i_mount;
state->blocksize = state->mp->m_sb.sb_blocksize;
- state->node_ents = state->mp->m_attr_node_ents;
+ state->node_ents = args->geo->node_ents;
/*
* Search to see if name exists, and get back a pointer to it.
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c
index b9b007d..f935370 100644
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -167,8 +167,8 @@ xfs_da3_node_verify(
* we don't know if the node is for and attribute or directory tree,
* so only fail if the count is outside both bounds
*/
- if (ichdr.count > mp->m_dir_node_ents &&
- ichdr.count > mp->m_attr_node_ents)
+ if (ichdr.count > mp->m_dir_geo->node_ents &&
+ ichdr.count > mp->m_attr_geo->node_ents)
return false;
/* XXX: hash order check? */
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index 0230342..90d426d 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -144,9 +144,6 @@ xfs_da_mount(
else
mp->m_dirnameops = &xfs_default_nameops;
- /* XXX: these are to be removed as code is converted to use geo */
- mp->m_dir_node_ents = mp->m_dir_geo->node_ents;
- mp->m_attr_node_ents = mp->m_attr_geo->node_ents;
return 0;
}
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index de5b2996..eff6b8d 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -1596,8 +1596,8 @@ xfs_dir2_node_addname(
state = xfs_da_state_alloc();
state->args = args;
state->mp = args->dp->i_mount;
- state->blocksize = state->args->geo->blksize;
- state->node_ents = state->mp->m_dir_node_ents;
+ state->blocksize = args->geo->blksize;
+ state->node_ents = args->geo->node_ents;
/*
* Look up the name. We're not supposed to find it, but
* this gives us the insertion point.
@@ -2043,7 +2043,7 @@ xfs_dir2_node_lookup(
state->args = args;
state->mp = args->dp->i_mount;
state->blocksize = args->geo->blksize;
- state->node_ents = state->mp->m_dir_node_ents;
+ state->node_ents = args->geo->node_ents;
/*
* Fill in the path to the entry in the cursor.
*/
@@ -2098,7 +2098,7 @@ xfs_dir2_node_removename(
state->args = args;
state->mp = args->dp->i_mount;
state->blocksize = args->geo->blksize;
- state->node_ents = state->mp->m_dir_node_ents;
+ state->node_ents = args->geo->node_ents;
/* Look up the entry we're deleting, set up the cursor. */
error = xfs_da3_node_lookup_int(state, &rval);
@@ -2168,7 +2168,7 @@ xfs_dir2_node_replace(
state->args = args;
state->mp = args->dp->i_mount;
state->blocksize = args->geo->blksize;
- state->node_ents = state->mp->m_dir_node_ents;
+ state->node_ents = args->geo->node_ents;
inum = args->inumber;
/*
* Lookup the entry to change in the btree.
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 3b690c36..6d7e5d7 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -134,8 +134,6 @@ typedef struct xfs_mount {
int m_fixedfsid[2]; /* unchanged for life of FS */
uint m_dmevmask; /* DMI events for this FS */
__uint64_t m_flags; /* global mount flags */
- uint m_dir_node_ents; /* #entries in a dir danode */
- uint m_attr_node_ents; /* #entries in attr danode */
int m_ialloc_inos; /* inodes in inode allocation */
int m_ialloc_blks; /* blocks in inode allocation */
int m_inoalign_mask;/* mask sb_inoalignmt if used */
--
1.9.0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-05-23 0:08 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 0:03 [PATCH 00/16 V2] xfs: introduce struct xfs_da_geometry Dave Chinner
2014-05-23 0:03 ` [PATCH 01/16] xfs: introduce directory geometry structure Dave Chinner
2014-05-23 19:04 ` Brian Foster
2014-05-26 4:28 ` Dave Chinner
2014-05-26 13:29 ` Brian Foster
2014-05-26 21:39 ` Dave Chinner
2014-05-23 0:03 ` [PATCH 02/16] xfs: move directory block translatiosn to xfs_da_btree.h Dave Chinner
2014-05-23 19:05 ` Brian Foster
2014-05-27 10:46 ` Christoph Hellwig
2014-05-27 23:06 ` Dave Chinner
2014-05-28 5:28 ` Christoph Hellwig
2014-05-28 5:39 ` Dave Chinner
2014-05-23 0:03 ` [PATCH 03/16] xfs: kill XFS_DIR2...FIRSTDB macros Dave Chinner
2014-05-23 19:05 ` Brian Foster
2014-05-27 10:47 ` Christoph Hellwig
2014-05-23 0:03 ` [PATCH 04/16] xfs: convert dir byte/off conversion to xfs_da_geometry Dave Chinner
2014-05-23 19:05 ` Brian Foster
2014-05-23 0:03 ` [PATCH 05/16] xfs: convert directory dablk " Dave Chinner
2014-05-23 19:06 ` Brian Foster
2014-05-26 4:48 ` Dave Chinner
2014-05-23 0:03 ` [PATCH 06/16] xfs: convert directory db " Dave Chinner
2014-05-23 19:07 ` Brian Foster
2014-05-23 0:03 ` [PATCH 07/16] xfs: convert directory segment limits " Dave Chinner
2014-05-23 20:43 ` Brian Foster
2014-05-23 0:03 ` [PATCH 08/16] xfs: convert m_dirblkfsbs " Dave Chinner
2014-05-23 20:43 ` Brian Foster
2014-05-23 0:03 ` [PATCH 09/16] xfs: convert m_dirblksize " Dave Chinner
2014-05-27 15:59 ` Brian Foster
2014-05-23 0:03 ` [PATCH 10/16] xfs: convert dir/attr btree threshold " Dave Chinner
2014-05-27 15:59 ` Brian Foster
2014-05-23 0:03 ` Dave Chinner [this message]
2014-05-27 15:59 ` [PATCH 11/16] xfs: move node entry counts " Brian Foster
2014-05-27 23:47 ` Dave Chinner
2014-05-23 0:03 ` [PATCH 12/16] xfs: reduce direct usage of mp->m_dir_geo Dave Chinner
2014-05-27 15:59 ` Brian Foster
2014-05-27 23:53 ` Dave Chinner
2014-05-23 0:03 ` [PATCH 13/16] xfs: remove mp->m_dir_geo from directory logging Dave Chinner
2014-05-27 16:00 ` Brian Foster
2014-05-23 0:03 ` [PATCH 14/16] xfs: use xfs_da_geometry for block size in attr code Dave Chinner
2014-05-27 16:01 ` Brian Foster
2014-05-23 0:03 ` [PATCH 15/16] xfs: pass xfs_da_args to xfs_attr_leaf_newentsize Dave Chinner
2014-05-27 16:01 ` Brian Foster
2014-05-23 0:03 ` [PATCH 16/16] xfs: repalce attr LBSIZE with xfs_da_geometry Dave Chinner
2014-05-27 16:01 ` Brian Foster
-- strict thread matches above, loose matches on Subject: below --
2014-05-28 6:04 [PATCH 00/16 V3] xfs: introduce struct xfs_da_geometry Dave Chinner
2014-05-28 6:04 ` [PATCH 11/16] xfs: move node entry counts to xfs_da_geometry Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400803432-20048-12-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox