aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_priv.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-10-29 07:11:50 -0400
committerBen Myers <bpm@sgi.com>2013-10-30 14:39:43 -0400
commit4141956ae05e0685b14b30f92fdc8fb11b4a0cb2 (patch)
treea6043fa6f5aa87f6aa7d1a479768a175b54dd3b5 /fs/xfs/xfs_dir2_priv.h
parent2ca9877410594dd321621efc9e1cbcd1ca24d0f3 (diff)
xfs: vectorise directory leaf operations
Next step in the vectorisation process is the leaf block encode/decode operations. Most of the operations on leaves are handled by the data block vectors, so there are relatively few of them here. Because of all the shuffling of code and having to pass more state to some functions, this patch doesn't directly reduce the size of the binary. It does open up many more opportunities for factoring and optimisation, however. text data bss dec hex filename 794490 96802 1096 892388 d9de4 fs/xfs/xfs.o.orig 792986 96802 1096 890884 d9804 fs/xfs/xfs.o.p1 792350 96802 1096 890248 d9588 fs/xfs/xfs.o.p2 789293 96802 1096 887191 d8997 fs/xfs/xfs.o.p3 789005 96802 1096 886903 d8997 fs/xfs/xfs.o.p4 789061 96802 1096 886959 d88af fs/xfs/xfs.o.p5 Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_priv.h')
-rw-r--r--fs/xfs/xfs_dir2_priv.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2_priv.h b/fs/xfs/xfs_dir2_priv.h
index 9a69f206daf9..3e4b5ba7b41f 100644
--- a/fs/xfs/xfs_dir2_priv.h
+++ b/fs/xfs/xfs_dir2_priv.h
@@ -77,9 +77,9 @@ extern void xfs_dir3_leaf_compact_x1(struct xfs_dir3_icleaf_hdr *leafhdr,
77 int *lowstalep, int *highstalep, int *lowlogp, int *highlogp); 77 int *lowstalep, int *highstalep, int *lowlogp, int *highlogp);
78extern int xfs_dir3_leaf_get_buf(struct xfs_da_args *args, xfs_dir2_db_t bno, 78extern int xfs_dir3_leaf_get_buf(struct xfs_da_args *args, xfs_dir2_db_t bno,
79 struct xfs_buf **bpp, __uint16_t magic); 79 struct xfs_buf **bpp, __uint16_t magic);
80extern void xfs_dir3_leaf_log_ents(struct xfs_trans *tp, struct xfs_buf *bp, 80extern void xfs_dir3_leaf_log_ents(struct xfs_trans *tp, struct xfs_inode *dp,
81 int first, int last); 81 struct xfs_buf *bp, int first, int last);
82extern void xfs_dir3_leaf_log_header(struct xfs_trans *tp, 82extern void xfs_dir3_leaf_log_header(struct xfs_trans *tp, struct xfs_inode *dp,
83 struct xfs_buf *bp); 83 struct xfs_buf *bp);
84extern int xfs_dir2_leaf_lookup(struct xfs_da_args *args); 84extern int xfs_dir2_leaf_lookup(struct xfs_da_args *args);
85extern int xfs_dir2_leaf_removename(struct xfs_da_args *args); 85extern int xfs_dir2_leaf_removename(struct xfs_da_args *args);
@@ -98,17 +98,18 @@ extern void xfs_dir3_leaf_hdr_from_disk(struct xfs_dir3_icleaf_hdr *to,
98 struct xfs_dir2_leaf *from); 98 struct xfs_dir2_leaf *from);
99extern void xfs_dir3_leaf_hdr_to_disk(struct xfs_dir2_leaf *to, 99extern void xfs_dir3_leaf_hdr_to_disk(struct xfs_dir2_leaf *to,
100 struct xfs_dir3_icleaf_hdr *from); 100 struct xfs_dir3_icleaf_hdr *from);
101extern bool xfs_dir3_leaf_check_int(struct xfs_mount *mp, 101extern bool xfs_dir3_leaf_check_int(struct xfs_mount *mp, struct xfs_inode *dp,
102 struct xfs_dir3_icleaf_hdr *hdr, struct xfs_dir2_leaf *leaf); 102 struct xfs_dir3_icleaf_hdr *hdr, struct xfs_dir2_leaf *leaf);
103 103
104/* xfs_dir2_node.c */ 104/* xfs_dir2_node.c */
105extern int xfs_dir2_leaf_to_node(struct xfs_da_args *args, 105extern int xfs_dir2_leaf_to_node(struct xfs_da_args *args,
106 struct xfs_buf *lbp); 106 struct xfs_buf *lbp);
107extern xfs_dahash_t xfs_dir2_leafn_lasthash(struct xfs_buf *bp, int *count); 107extern xfs_dahash_t xfs_dir2_leafn_lasthash(struct xfs_inode *dp,
108 struct xfs_buf *bp, int *count);
108extern int xfs_dir2_leafn_lookup_int(struct xfs_buf *bp, 109extern int xfs_dir2_leafn_lookup_int(struct xfs_buf *bp,
109 struct xfs_da_args *args, int *indexp, 110 struct xfs_da_args *args, int *indexp,
110 struct xfs_da_state *state); 111 struct xfs_da_state *state);
111extern int xfs_dir2_leafn_order(struct xfs_buf *leaf1_bp, 112extern int xfs_dir2_leafn_order(struct xfs_inode *dp, struct xfs_buf *leaf1_bp,
112 struct xfs_buf *leaf2_bp); 113 struct xfs_buf *leaf2_bp);
113extern int xfs_dir2_leafn_split(struct xfs_da_state *state, 114extern int xfs_dir2_leafn_split(struct xfs_da_state *state,
114 struct xfs_da_state_blk *oldblk, struct xfs_da_state_blk *newblk); 115 struct xfs_da_state_blk *oldblk, struct xfs_da_state_blk *newblk);