summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-09-01 03:10:28 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-09-01 03:10:27 -0700
commit7683c6a1441475a3ba07c02de33f4487231ec14a (patch)
tree73151d8af190addbe037420256e2710b7b9a392f
parentd62c95453b5a1b10ef425d4d49d7efe84d6ac4e1 (diff)
parente4f60027026c438d21b1db83d69e0dd2d92c6e56 (diff)
Merge "f2fs: sanity check segment count"
-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