diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-10-29 07:11:49 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-10-30 14:39:31 -0400 |
commit | 2ca9877410594dd321621efc9e1cbcd1ca24d0f3 (patch) | |
tree | 002e968ea70087df002ecc70d0966868c49b0cd1 /fs/xfs/xfs_dir2.h | |
parent | 9d23fc8575de7012b8853bd6fefe10534665de2f (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.h | 22 |
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 | ||
71 | extern const struct xfs_dir_ops xfs_dir2_ops; | 79 | extern 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); |
116 | extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_inode *dp, | 124 | extern 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); |
118 | extern void xfs_dir2_data_log_header(struct xfs_trans *tp, | 126 | extern void xfs_dir2_data_log_header(struct xfs_trans *tp, struct xfs_inode *dp, |
119 | struct xfs_buf *bp); | 127 | struct xfs_buf *bp); |
120 | extern void xfs_dir2_data_log_unused(struct xfs_trans *tp, struct xfs_buf *bp, | 128 | extern 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); |
122 | extern void xfs_dir2_data_make_free(struct xfs_trans *tp, struct xfs_buf *bp, | 130 | extern 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); | ||
133 | extern 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); |
125 | extern 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 | ||
129 | extern struct xfs_dir2_data_free *xfs_dir2_data_freefind( | 138 | extern 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 | ||
132 | extern const struct xfs_buf_ops xfs_dir3_block_buf_ops; | 142 | extern const struct xfs_buf_ops xfs_dir3_block_buf_ops; |
133 | extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops; | 143 | extern const struct xfs_buf_ops xfs_dir3_leafn_buf_ops; |