aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2.h
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-10-29 07:11:47 -0400
committerBen Myers <bpm@sgi.com>2013-10-30 14:38:59 -0400
commit4740175e75f70ab71f76ae98ab00f7db731a48f7 (patch)
tree716ca450f8fc545b6dd14d8052a81d6d440a7f16 /fs/xfs/xfs_dir2.h
parent32c5483a8a13a43264809144210ec114dd70b611 (diff)
xfs: vectorise remaining shortform dir2 ops
Following from the initial patch to introduce the directory operations vector, convert the rest of the shortform directory operations to use vectored ops rather than superblock feature checks. 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 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.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index 1909d9faff71..0e94b3e662af 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -39,6 +39,17 @@ struct xfs_dir_ops {
39 struct xfs_dir2_sf_entry * 39 struct xfs_dir2_sf_entry *
40 (*sf_nextentry)(struct xfs_dir2_sf_hdr *hdr, 40 (*sf_nextentry)(struct xfs_dir2_sf_hdr *hdr,
41 struct xfs_dir2_sf_entry *sfep); 41 struct xfs_dir2_sf_entry *sfep);
42 __uint8_t (*sf_get_ftype)(struct xfs_dir2_sf_entry *sfep);
43 void (*sf_put_ftype)(struct xfs_dir2_sf_entry *sfep,
44 __uint8_t ftype);
45 xfs_ino_t (*sf_get_ino)(struct xfs_dir2_sf_hdr *hdr,
46 struct xfs_dir2_sf_entry *sfep);
47 void (*sf_put_ino)(struct xfs_dir2_sf_hdr *hdr,
48 struct xfs_dir2_sf_entry *sfep,
49 xfs_ino_t ino);
50 xfs_ino_t (*sf_get_parent_ino)(struct xfs_dir2_sf_hdr *hdr);
51 void (*sf_put_parent_ino)(struct xfs_dir2_sf_hdr *hdr,
52 xfs_ino_t ino);
42}; 53};
43 54
44extern const struct xfs_dir_ops xfs_dir2_ops; 55extern const struct xfs_dir_ops xfs_dir2_ops;
@@ -79,15 +90,6 @@ extern int xfs_dir2_sf_to_block(struct xfs_da_args *args);
79/* 90/*
80 * Interface routines used by userspace utilities 91 * Interface routines used by userspace utilities
81 */ 92 */
82extern xfs_ino_t xfs_dir2_sf_get_parent_ino(struct xfs_dir2_sf_hdr *sfp);
83extern void xfs_dir2_sf_put_parent_ino(struct xfs_dir2_sf_hdr *sfp,
84 xfs_ino_t ino);
85extern xfs_ino_t xfs_dir3_sfe_get_ino(struct xfs_mount *mp,
86 struct xfs_dir2_sf_hdr *sfp, struct xfs_dir2_sf_entry *sfep);
87extern void xfs_dir3_sfe_put_ino(struct xfs_mount *mp,
88 struct xfs_dir2_sf_hdr *hdr, struct xfs_dir2_sf_entry *sfep,
89 xfs_ino_t ino);
90
91extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *r); 93extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
92extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *r); 94extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
93extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db, 95extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,