History

f2fs: allow unfixed f2fs_checkpoint.checksum_offset

Previously, f2fs_checkpoint.checksum_offset points fixed position of f2fs_checkpoint structure: "#define CP_CHKSUM_OFFSET 4092" It is unnecessary, and it breaks the consecutiveness of nat and sit bitmap stored across checkpoint park block and payload blocks. This patch allows f2fs to handle unfixed .checksum_offset. In addition, for the case checksum value is stored in the middle of checkpoint park, calculating checksum value with superposition method like we did for inode_checksum.

Chao Yu committed 7 years ago

Commit d7eb8f11 parent 3a912b72 files · +25 −6Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/f2fs_fs.h+4−0
@@ -164,6 +164,10 @@ struct f2fs_checkpoint { · 163 unmodified lines
164 unsigned char sit_nat_version_bitmap[1];164 unsigned char sit_nat_version_bitmap[1];
165} __packed;165} __packed;
166 166
167#define CP_CHKSUM_OFFSET 4092 /* default chksum offset in checkpoint */
168#define CP_MIN_CHKSUM_OFFSET \
169 (offsetof(struct f2fs_checkpoint, sit_nat_version_bitmap))
170
167/*171/*
168 * For orphan inode management172 * For orphan inode management
169 */173 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t