Skip to content

btrfs: fix a bug with truncation and writeback and cleanups

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7btrfs: truncate ordered extent when skipping writeback past i_sizefs/btrfs/extent_io.c fs/btrfs/ordered-data.c+22 -41 reply
2/7btrfs: use variable for end offset in extent_writepage_io()fs/btrfs/extent_io.c+5 -51 reply
3/7btrfs: split assertion into two in extent_writepage_io()fs/btrfs/extent_io.c+3 -11 reply
4/7btrfs: add unlikely to unexpected error case in extent_writepages()fs/btrfs/extent_io.c+1 -11 reply
5/7btrfs: consistently round up or down i_size in btrfs_truncate()fs/btrfs/inode.c+4 -41 reply
6/7btrfs: avoid multiple i_size rounding in btrfs_truncate()fs/btrfs/inode.c+8 -101 reply
7/7btrfs: avoid repeated computations in btrfs_mark_ordered_io_finished()fs/btrfs/ordered-data.c+8 -101 reply

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchQu Wenruo
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] btrfs: fix a bug with truncation and writeback and cleanups

From: Filipe Manana <[email protected]>

The first patch fixes a bug where we can up persisting a file extent item that crosses the i_size boundary, making btrfs check complain because it won't find checksum items beyond the i_size boundary. Details in the change log. The rest are several cleanups in related code that popped up while debugging the issue.

Filipe Manana (7):
btrfs: truncate ordered extent when skipping writeback past i_size
btrfs: use variable for end offset in extent_writepage_io()
btrfs: split assertion into two in extent_writepage_io()
btrfs: add unlikely to unexpected error case in extent_writepages()
btrfs: consistently round up or down i_size in btrfs_truncate()
btrfs: avoid multiple i_size rounding in btrfs_truncate()
btrfs: avoid repeated computations in btrfs_mark_ordered_io_finished()

 fs/btrfs/extent_io.c    | 33 ++++++++++++++++++++++++++-------
 fs/btrfs/inode.c        | 18 ++++++++----------
 fs/btrfs/ordered-data.c | 23 +++++++++++------------
 3 files changed, 45 insertions(+), 29 deletions(-)
Signature · 1 line
2.47.2