summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-10-12 09:08:48 (GMT)
committerJaegeuk Kim <jaegeuk@kernel.org>2015-10-12 21:03:43 (GMT)
commitea1a29a0bdfffd56ca98335c0655308e8d7d0e22 (patch)
tree15cff3be22c03ada0cb3e5936b73ed1451645176 /fs/f2fs/node.h
parent2db2388fcf0d880bd7160264274ed873baec4f0d (diff)
downloadlinux-ea1a29a0bdfffd56ca98335c0655308e8d7d0e22.tar.xz
f2fs: export ra_nid_pages to sysfs
After finishing building free nid cache, we will try to readahead asynchronously 4 more pages for the next reloading, the count of readahead nid pages is fixed. In some case, like SMR drive, read less sectors with fixed count each time we trigger RA may be low efficient, since we will face high seeking overhead, so we'd better let user to configure this parameter from sysfs in specific workload. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index 7427e95..e4fffd2 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -14,9 +14,11 @@
/* node block offset on the NAT area dedicated to the given start node id */
#define NAT_BLOCK_OFFSET(start_nid) (start_nid / NAT_ENTRY_PER_BLOCK)
-/* # of pages to perform readahead before building free nids */
+/* # of pages to perform synchronous readahead before building free nids */
#define FREE_NID_PAGES 4
+#define DEF_RA_NID_PAGES 4 /* # of nid pages to be readaheaded */
+
/* maximum readahead size for node during getting data blocks */
#define MAX_RA_NODE 128