diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-07-31 20:19:09 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-10-04 15:25:13 +0200 |
| commit | f3ba92bf0591b6b3f500a5117137d26e30084379 (patch) | |
| tree | bb53b640457b4689a2bc78ab8b6dc8584770b809 /fs/f2fs/super.c | |
| parent | 7c9ac4038b0263c83c38aac172fb87ae84828ea7 (diff) | |
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 8d3e9988e..5e7a91aec 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1997,6 +1997,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 |
