diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-18 06:37:44 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-27 00:38:25 +0200 |
commit | a5c46e5e8912d232b959faf511cd9a17cc829f0a (patch) | |
tree | cfb855ef552faf04cf53f76c93d500d217ea3ac3 /fs/xfs/libxfs/xfs_dir2.h | |
parent | xfs: scrub directory/attribute btrees (diff) | |
download | linux-a5c46e5e8912d232b959faf511cd9a17cc829f0a.tar.xz linux-a5c46e5e8912d232b959faf511cd9a17cc829f0a.zip |
xfs: scrub directory metadata
Scrub the hash tree and all the entries in a directory.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h index 21c8f8bf94d5..1a8f2cf977ca 100644 --- a/fs/xfs/libxfs/xfs_dir2.h +++ b/fs/xfs/libxfs/xfs_dir2.h @@ -324,4 +324,21 @@ xfs_dir2_leaf_tail_p(struct xfs_da_geometry *geo, struct xfs_dir2_leaf *lp) sizeof(struct xfs_dir2_leaf_tail)); } +/* + * The Linux API doesn't pass down the total size of the buffer + * we read into down to the filesystem. With the filldir concept + * it's not needed for correct information, but the XFS dir2 leaf + * code wants an estimate of the buffer size to calculate it's + * readahead window and size the buffers used for mapping to + * physical blocks. + * + * Try to give it an estimate that's good enough, maybe at some + * point we can change the ->readdir prototype to include the + * buffer size. For now we use the current glibc buffer size. + * musl libc hardcodes 2k and dietlibc uses PAGE_SIZE. + */ +#define XFS_READDIR_BUFSIZE (32768) + +unsigned char xfs_dir3_get_dtype(struct xfs_mount *mp, uint8_t filetype); + #endif /* __XFS_DIR2_H__ */ |