diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-07-31 15:19:09 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-08-04 05:09:26 +0300 |
commit | 704956ecf5bcdc14d14650f39f2b545b34c96265 (patch) | |
tree | 7d1671f472ed05961a350510d09c4b2273e6a789 /fs/f2fs/super.c | |
parent | 4f31d26b0c17f2aae6a6afeb823a87e20671ab4b (diff) | |
download | linux-704956ecf5bcdc14d14650f39f2b545b34c96265.tar.xz |
f2fs: support inode checksum
This patch adds to support inode checksum in f2fs.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: fix verification flow]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 4c28576c5b30..fc757c8861b7 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1993,6 +1993,11 @@ try_onemore: sb->s_fs_info = sbi; sbi->raw_super = raw_super; + /* precompute checksum seed for metadata */ + if (f2fs_sb_has_inode_chksum(sb)) + sbi->s_chksum_seed = f2fs_chksum(sbi, ~0, raw_super->uuid, + sizeof(raw_super->uuid)); + /* * The BLKZONED feature indicates that the drive was formatted with * zone alignment optimization. This is optional for host-aware |