History

Merge tag 'f2fs-for-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs

Pull f2fs updates from Jaegeuk Kim: "Another round of various bug fixes came in. Damien improved SMR drive support a bit, and Chao replaced BUG_ON() with reporting errors to user since we've not hit from users but did hit from crafted images. We've found a disk layout bug in large_nat_bits feature which supports very large NAT entries enabled at mkfs. If the feature is enabled, it will give a notice to run fsck to correct the on-disk layout. Enhancements: - reduce memory consumption for SMR drive - better discard handling for multiple partitions - tracepoints for f2fs_file_write_iter/f2fs_filemap_fault - allow to change CP_CHKSUM_OFFSET - detect wrong layout of large_nat_bitmap feature - enhance checking valid data indices Bug fixes: - Multiple partition support for SMR drive - deadlock problem in f2fs_balance_fs_bg - add boundary checks to fix abnormal behaviors on fuzzed images - inline_xattr space calculations - replace f2fs_bug_on with errors In addition, this series contains various memory boundary check and sanity check of on-disk consistency" * tag 'f2fs-for-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (40 commits) f2fs: fix to avoid accessing xattr across the boundary f2fs: fix to avoid potential race on sbi->unusable_block_count access/update f2fs: add tracepoint for f2fs_filemap_fault() f2fs: introduce DATA_GENERIC_ENHANCE f2fs: fix to handle error in f2fs_disable_checkpoint() f2fs: remove redundant check in f2fs_file_write_iter() f2fs: fix to be aware of readonly device in write_checkpoint() f2fs: fix to skip recovery on readonly device f2fs: fix to consider multiple device for readonly check f2fs: relocate chksum_offset for large_nat_bitmap feature f2fs: allow unfixed f2fs_checkpoint.checksum_offset f2fs: Replace spaces with tab f2fs: insert space before the open parenthesis '(' f2fs: allow address pointer number of dnode aligning to specified size f2fs: introduce f2fs_read_single_page() for cleanup f2fs: mark is_extension_exist() inline f2fs: fix to set FI_UPDATE_WRITE correctly f2fs: fix to avoid panic in f2fs_inplace_write_data() f2fs: fix to do sanity check on valid block count of segment f2fs: fix to do sanity check on valid node/block count ...

Linus Torvalds committed 7 years ago

Commit 0d285442 parents fa4bff1 2777e6518 files · +688 −302Browse files

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

Unified · Split

include/linux/f2fs_fs.h+8−3
@@ -164,6 +164,10 @@ struct f2fs_checkpoint { · 163 unmodified lines
164164 unsigned char sit_nat_version_bitmap[1];
165165 } __packed;
166166
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+
167171 /*
168172 * For orphan inode management
169173 */
@@ -198,11 +202,12 @@ struct f2fs_extent { · 28 unmodified lines
198202 get_extra_isize(inode))
199203 #define DEF_NIDS_PER_INODE 5 /* Node IDs in an Inode */
200204 #define ADDRS_PER_INODE(inode) addrs_per_inode(inode)
201−#define ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
205+#define DEF_ADDRS_PER_BLOCK 1018 /* Address Pointers in a Direct Block */
206+#define ADDRS_PER_BLOCK(inode) addrs_per_block(inode)
202207 #define NIDS_PER_BLOCK 1018 /* Node IDs in an Indirect Block */
203208
204209 #define ADDRS_PER_PAGE(page, inode) \
205− (IS_INODE(page) ? ADDRS_PER_INODE(inode) : ADDRS_PER_BLOCK)
210+ (IS_INODE(page) ? ADDRS_PER_INODE(inode) : ADDRS_PER_BLOCK(inode))
206211
207212 #define NODE_DIR1_BLOCK (DEF_ADDRS_PER_INODE + 1)
208213 #define NODE_DIR2_BLOCK (DEF_ADDRS_PER_INODE + 2)
@@ -267,7 +272,7 @@ struct f2fs_inode { · 58 unmodified lines
267272 } __packed;
268273
269274 struct direct_node {
270− __le32 addr[ADDRS_PER_BLOCK]; /* array of data block address */
275+ __le32 addr[DEF_ADDRS_PER_BLOCK]; /* array of data block address */
271276 } __packed;
272277
273278 struct indirect_node {

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