diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-10-29 22:11:48 +1100 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-10-30 13:39:14 -0500 |
commit | 9d23fc8575de7012b8853bd6fefe10534665de2f (patch) | |
tree | 6dab547e4e967349aaa48bca5d64e0055a32508d /fs/xfs/xfs_dir2_readdir.c | |
parent | 4740175e75f70ab71f76ae98ab00f7db731a48f7 (diff) |
xfs: vectorise directory data operations
Following from the initial patches to vectorise the shortform
directory encode/decode operations, convert half the data block
operations to use the vector. The rest will be done in a second
patch.
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
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_readdir.c')
-rw-r--r-- | fs/xfs/xfs_dir2_readdir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c index 2d2c8fb0554..b99aa7d48e9 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c @@ -119,9 +119,9 @@ xfs_dir2_sf_getdents( * mp->m_dirdatablk. */ dot_offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk, - xfs_dir3_data_dot_offset(mp)); + dp->d_ops->data_dot_offset()); dotdot_offset = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk, - xfs_dir3_data_dotdot_offset(mp)); + dp->d_ops->data_dotdot_offset()); /* * Put . entry unless we're starting past it. @@ -237,7 +237,7 @@ xfs_dir2_block_getdents( /* * Bump pointer for the next iteration. */ - ptr += xfs_dir3_data_entsize(mp, dep->namelen); + ptr += dp->d_ops->data_entsize(dep->namelen); /* * The entry is before the desired starting point, skip it. */ @@ -248,7 +248,7 @@ xfs_dir2_block_getdents( (char *)dep - (char *)hdr); ctx->pos = cook & 0x7fffffff; - filetype = xfs_dir3_dirent_get_ftype(mp, dep); + filetype = dp->d_ops->data_get_ftype(dep); /* * If it didn't fit, set the final offset to here & return. */ @@ -601,7 +601,7 @@ xfs_dir2_leaf_getdents( } dep = (xfs_dir2_data_entry_t *)ptr; length = - xfs_dir3_data_entsize(mp, dep->namelen); + dp->d_ops->data_entsize(dep->namelen); ptr += length; } /* @@ -632,8 +632,8 @@ xfs_dir2_leaf_getdents( } dep = (xfs_dir2_data_entry_t *)ptr; - length = xfs_dir3_data_entsize(mp, dep->namelen); - filetype = xfs_dir3_dirent_get_ftype(mp, dep); + length = dp->d_ops->data_entsize(dep->namelen); + filetype = dp->d_ops->data_get_ftype(dep); ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff; if (!dir_emit(ctx, (char *)dep->name, dep->namelen, |