aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2.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.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.h')
-rw-r--r--fs/xfs/xfs_dir2.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h
index 076010a1376a..9ba9db731990 100644
--- a/fs/xfs/xfs_dir2.h
+++ b/fs/xfs/xfs_dir2.h
@@ -74,11 +74,15 @@ struct xfs_dir_ops {
74 (*data_entry_p)(struct xfs_dir2_data_hdr *hdr); 74 (*data_entry_p)(struct xfs_dir2_data_hdr *hdr);
75 struct xfs_dir2_data_unused * 75 struct xfs_dir2_data_unused *
76 (*data_unused_p)(struct xfs_dir2_data_hdr *hdr); 76 (*data_unused_p)(struct xfs_dir2_data_hdr *hdr);
77
78 int (*leaf_hdr_size)(void);
79 int (*leaf_max_ents)(struct xfs_mount *mp);
80 struct xfs_dir2_leaf_entry *
81 (*leaf_ents_p)(struct xfs_dir2_leaf *lp);
77}; 82};
78 83
79extern const struct xfs_dir_ops xfs_dir2_ops; 84extern const struct xfs_dir_ops *
80extern const struct xfs_dir_ops xfs_dir2_ftype_ops; 85 xfs_dir_get_ops(struct xfs_mount *mp, struct xfs_inode *dp);
81extern const struct xfs_dir_ops xfs_dir3_ops;
82 86
83/* 87/*
84 * Generic directory interface routines 88 * Generic directory interface routines