Skip to content

Btrfs: fix partly checksummed file races

Omar Sandoval linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Btrfs: fix clone vs chattr NODATASUM racefs/btrfs/ioctl.c+7 -52 replies
2/2Btrfs: fix dedupe vs chattr NODATASUM racefs/btrfs/ioctl.c+7 -61 reply

Reviews trailers per patch

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

PatchNikolay BorisovDavid Sterba
1/2R-b R-b
2/2R-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/2] Btrfs: fix partly checksummed file races

From: Omar Sandoval <[email protected]>

Clone and dedupe both have checks to make sure that we're not mixing checksummed and not checksummed extents in a single file. However, both checks are racy; we need to have the inodes locked or else the flags can change after we check. The clone check has always been wrong. The dedupe check was previously correct but is broken in kdave/for-next.

Based on kdave/for-next. Note that there's a Fixes: tag in there referencing a commit in the for-next branch, so that would have to be updated if the commit gets rebased. These patches are also available at
https://github.com/osandov/linux/tree/btrfs-nodatasum-race.

Thanks!

Omar Sandoval (2):
Btrfs: fix clone vs chattr NODATASUM race
Btrfs: fix dedupe vs chattr NODATASUM race

 fs/btrfs/ioctl.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.0