From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 10/16] xfs: convert dir/attr btree threshold to xfs_da_geometry
Date: Wed, 28 May 2014 16:04:37 +1000 [thread overview]
Message-ID: <1401257083-13433-11-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1401257083-13433-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
---
fs/xfs/xfs_attr_leaf.c | 2 +-
fs/xfs/xfs_dir2.c | 2 --
fs/xfs/xfs_dir2_node.c | 2 +-
fs/xfs/xfs_mount.h | 2 --
4 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 2c0fdc8..5be77b3 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -1949,7 +1949,7 @@ xfs_attr3_leaf_remove(
tmp = ichdr.usedbytes + xfs_attr3_leaf_hdr_size(leaf) +
ichdr.count * sizeof(xfs_attr_leaf_entry_t);
- return tmp < mp->m_attr_magicpct; /* leaf is < 37% full */
+ return tmp < args->geo->magicpct; /* leaf is < 37% full */
}
/*
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index 99df2a2..4eabe51 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -146,9 +146,7 @@ xfs_da_mount(
/* 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_dir_magicpct = mp->m_dir_geo->magicpct;
mp->m_attr_node_ents = mp->m_attr_geo->node_ents;
- mp->m_attr_magicpct = mp->m_attr_geo->magicpct;
return 0;
}
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c
index ef34c19..de5b2996 100644
--- a/fs/xfs/xfs_dir2_node.c
+++ b/fs/xfs/xfs_dir2_node.c
@@ -1312,7 +1312,7 @@ xfs_dir2_leafn_remove(
*/
*rval = (dp->d_ops->leaf_hdr_size +
(uint)sizeof(ents[0]) * (leafhdr.count - leafhdr.stale)) <
- mp->m_dir_magicpct;
+ args->geo->magicpct;
return 0;
}
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 4e3f6ce..78ae7e4 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -148,8 +148,6 @@ typedef struct xfs_mount {
int m_dalign; /* stripe unit */
int m_swidth; /* stripe width */
int m_sinoalign; /* stripe unit inode alignment */
- int m_attr_magicpct;/* 37% of the blocksize */
- int m_dir_magicpct; /* 37% of the dir blocksize */
__uint8_t m_sectbb_log; /* sectlog - BBSHIFT */
const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */
const struct xfs_dir_ops *m_dir_inode_ops; /* vector of dir inode ops */
--
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-28 6:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 6:04 [PATCH 00/16 V3] xfs: introduce struct xfs_da_geometry Dave Chinner
2014-05-28 6:04 ` [PATCH 01/16] xfs: introduce directory geometry structure Dave Chinner
2014-05-30 19:05 ` Brian Foster
2014-05-28 6:04 ` [PATCH 02/16] xfs: move directory block translatiosn to xfs_dir2_priv.h Dave Chinner
2014-05-28 6:04 ` [PATCH 03/16] xfs: kill XFS_DIR2...FIRSTDB macros Dave Chinner
2014-05-28 6:04 ` [PATCH 04/16] xfs: convert dir byte/off conversion to xfs_da_geometry Dave Chinner
2014-05-28 6:04 ` [PATCH 05/16] xfs: convert directory dablk " Dave Chinner
2014-05-28 6:04 ` [PATCH 06/16] xfs: convert directory db " Dave Chinner
2014-05-28 6:04 ` [PATCH 07/16] xfs: convert directory segment limits " Dave Chinner
2014-05-28 6:04 ` [PATCH 08/16] xfs: convert m_dirblkfsbs " Dave Chinner
2014-05-28 6:04 ` [PATCH 09/16] xfs: convert m_dirblksize " Dave Chinner
2014-05-28 6:04 ` Dave Chinner [this message]
2014-05-28 6:04 ` [PATCH 11/16] xfs: move node entry counts " Dave Chinner
2014-05-28 6:04 ` [PATCH 12/16] xfs: reduce direct usage of mp->m_dir_geo Dave Chinner
2014-05-30 19:05 ` Brian Foster
2014-05-28 6:04 ` [PATCH 13/16] xfs: remove mp->m_dir_geo from directory logging Dave Chinner
2014-05-28 6:04 ` [PATCH 14/16] xfs: use xfs_da_geometry for block size in attr code Dave Chinner
2014-05-28 6:04 ` [PATCH 15/16] xfs: pass xfs_da_args to xfs_attr_leaf_newentsize Dave Chinner
2014-05-28 6:04 ` [PATCH 16/16] xfs: repalce attr LBSIZE with xfs_da_geometry Dave Chinner
2014-05-30 19:05 ` [PATCH 00/16 V3] xfs: introduce struct xfs_da_geometry Brian Foster
2014-05-30 23:37 ` Dave Chinner
2014-05-30 23:39 ` [PATCH 17/16] xfs: remove redundant geometry information from xfs_da_state Dave Chinner
2014-06-02 14:03 ` Brian Foster
2014-06-05 1:26 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2014-05-23 0:03 [PATCH 00/16 V2] xfs: introduce struct xfs_da_geometry Dave Chinner
2014-05-23 0:03 ` [PATCH 10/16] xfs: convert dir/attr btree threshold to xfs_da_geometry Dave Chinner
2014-05-27 15:59 ` Brian Foster
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=1401257083-13433-11-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