summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2017-04-25 16:28:48 -0700
committerDennis Cagle <dcagle@codeaurora.org>2017-08-21 10:43:51 -0700
commite4f60027026c438d21b1db83d69e0dd2d92c6e56 (patch)
tree243660c55f8d70a39d3855f017b59169148ff08c
parenta49bb61510b938152025049730fa922c5da950a1 (diff)
f2fs: sanity check segment count
F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Change-Id: I64d9be6dcc4ab5d8a45359c69d6163ed0209e8fe Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Git-commit: b9dd46188edc2f0d1f37328637860bb65a771124 Signed-off-by: Dennis Cagle <dcagle@codeaurora.org>
-rw-r--r--include/linux/f2fs_fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index 3d6e6ce44c5c..005d5c3e200e 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -290,6 +290,12 @@ struct f2fs_nat_block {
#define F2FS_MAX_SEGMENT ((16 * 1024 * 1024) / 2)
/*
+ * F2FS uses 4 bytes to represent block address. As a result, supported size of
+ * disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
+ */
+#define F2FS_MAX_SEGMENT ((16 * 1024 * 1024) / 2)
+
+/*
* Note that f2fs_sit_entry->vblocks has the following bit-field information.
* [15:10] : allocation type such as CURSEG_XXXX_TYPE
* [9:0] : valid block count