aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-10-29 07:11:49 -0400
committerBen Myers <bpm@sgi.com>2013-10-30 14:39:31 -0400
commit2ca9877410594dd321621efc9e1cbcd1ca24d0f3 (patch)
tree002e968ea70087df002ecc70d0966868c49b0cd1 /fs/xfs/xfs_dir2.h
parent9d23fc8575de7012b8853bd6fefe10534665de2f (diff)
xfs: vectorise directory data operations part 2
Convert the rest of the directory data block encode/decode operations to vector format. This further reduces the size of the built binary: 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 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.h')
-rw-r--r--fs/xfs/xfs_dir2.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index c0a45923cce0..076010a1376a 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -56,16 +56,24 @@ struct xfs_dir_ops {
56 void (*data_put_ftype)(struct xfs_dir2_data_entry *dep, 56 void (*data_put_ftype)(struct xfs_dir2_data_entry *dep,
57 __uint8_t ftype); 57 __uint8_t ftype);
58 __be16 * (*data_entry_tag_p)(struct xfs_dir2_data_entry *dep); 58 __be16 * (*data_entry_tag_p)(struct xfs_dir2_data_entry *dep);
59 struct xfs_dir2_data_free *
60 (*data_bestfree_p)(struct xfs_dir2_data_hdr *hdr);
59 61
60 xfs_dir2_data_aoff_t (*data_dot_offset)(void); 62 xfs_dir2_data_aoff_t (*data_dot_offset)(void);
61 xfs_dir2_data_aoff_t (*data_dotdot_offset)(void); 63 xfs_dir2_data_aoff_t (*data_dotdot_offset)(void);
62 xfs_dir2_data_aoff_t (*data_first_offset)(void); 64 xfs_dir2_data_aoff_t (*data_first_offset)(void);
65 size_t (*data_entry_offset)(void);
66
63 struct xfs_dir2_data_entry * 67 struct xfs_dir2_data_entry *
64 (*data_dot_entry_p)(struct xfs_dir2_data_hdr *hdr); 68 (*data_dot_entry_p)(struct xfs_dir2_data_hdr *hdr);
65 struct xfs_dir2_data_entry * 69 struct xfs_dir2_data_entry *
66 (*data_dotdot_entry_p)(struct xfs_dir2_data_hdr *hdr); 70 (*data_dotdot_entry_p)(struct xfs_dir2_data_hdr *hdr);
67 struct xfs_dir2_data_entry * 71 struct xfs_dir2_data_entry *
68 (*data_first_entry_p)(struct xfs_dir2_data_hdr *hdr); 72 (*data_first_entry_p)(struct xfs_dir2_data_hdr *hdr);
73 struct xfs_dir2_data_entry *
74 (*data_entry_p)(struct xfs_dir2_data_hdr *hdr);
75 struct xfs_dir2_data_unused *
76 (*data_unused_p)(struct xfs_dir2_data_hdr *hdr);
69}; 77};
70 78
71extern const struct xfs_dir_ops xfs_dir2_ops; 79extern const struct xfs_dir_ops xfs_dir2_ops;
@@ -115,19 +123,21 @@ extern void xfs_dir2_data_freescan(struct xfs_inode *dp,
115 struct xfs_dir2_data_hdr *hdr, int *loghead); 123 struct xfs_dir2_data_hdr *hdr, int *loghead);
116extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_inode *dp, 124extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_inode *dp,
117 struct xfs_buf *bp, struct xfs_dir2_data_entry *dep); 125 struct xfs_buf *bp, struct xfs_dir2_data_entry *dep);
118extern void xfs_dir2_data_log_header(struct xfs_trans *tp, 126extern void xfs_dir2_data_log_header(struct xfs_trans *tp, struct xfs_inode *dp,
119 struct xfs_buf *bp); 127 struct xfs_buf *bp);
120extern void xfs_dir2_data_log_unused(struct xfs_trans *tp, struct xfs_buf *bp, 128extern void xfs_dir2_data_log_unused(struct xfs_trans *tp, struct xfs_buf *bp,
121 struct xfs_dir2_data_unused *dup); 129 struct xfs_dir2_data_unused *dup);
122extern void xfs_dir2_data_make_free(struct xfs_trans *tp, struct xfs_buf *bp, 130extern void xfs_dir2_data_make_free(struct xfs_trans *tp, struct xfs_inode *dp,
131 struct xfs_buf *bp, xfs_dir2_data_aoff_t offset,
132 xfs_dir2_data_aoff_t len, int *needlogp, int *needscanp);
133extern void xfs_dir2_data_use_free(struct xfs_trans *tp, struct xfs_inode *dp,
134 struct xfs_buf *bp, struct xfs_dir2_data_unused *dup,
123 xfs_dir2_data_aoff_t offset, xfs_dir2_data_aoff_t len, 135 xfs_dir2_data_aoff_t offset, xfs_dir2_data_aoff_t len,
124 int *needlogp, int *needscanp); 136 int *needlogp, int *needscanp);
125extern void xfs_dir2_data_use_free(struct xfs_trans *tp, struct xfs_buf *bp,
126 struct xfs_dir2_data_unused *dup, xfs_dir2_data_aoff_t offset,
127 xfs_dir2_data_aoff_t len, int *needlogp, int *needscanp);
128 137
129extern struct xfs_dir2_data_free *xfs_dir2_data_freefind( 138extern struct xfs_dir2_data_free *xfs_dir2_data_freefind(
130 struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_unused *dup); 139 struct xfs_dir2_data_hdr *hdr, struct xfs_dir2_data_free *bf,
140 struct xfs_dir2_data_unused *dup);
131 141
132extern const struct xfs_buf_ops xfs_dir3_block_buf_ops; 142extern const struct xfs_buf_ops xfs_dir3_block_buf_ops;
133extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops; 143extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops;