aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-11-28 16:19:52 +0000
committerMark Brown <broonie@kernel.org>2017-11-28 16:19:52 +0000
commit69830d3909849dee33b9a2de88ece3d59c75a1b8 (patch)
tree67e22ac989e782ddc104f186dee54d1675e76923 /fs/xfs/libxfs/xfs_dir2.h
parentASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE (diff)
parentASoC: add snd_soc_disconnect_sync() (diff)
downloadlinux-dev-69830d3909849dee33b9a2de88ece3d59c75a1b8.tar.xz
linux-dev-69830d3909849dee33b9a2de88ece3d59c75a1b8.zip
Merge branch 'topic/disconnect' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.h')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.h17
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__ */