Skip to content

btrfs: fix some data races during fsync and cleanups

[email protected] linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6btrfs: add and use helpers for reading and writing last_log_commitfs/btrfs/btrfs_inode.h fs/btrfs/ctree.h fs/btrfs/disk-io.c +1 more+20 -60 replies
2/6btrfs: add and use helpers for reading and writing log_transidfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/transaction.h +1 more+22 -40 replies
3/6btrfs: add and use helpers for reading and writing fs_info->generationfs/btrfs/file.c fs/btrfs/fs.h fs/btrfs/inode.c +3 more+22 -62 replies
4/6btrfs: add and use helpers for reading and writing last_trans_committedfs/btrfs/disk-io.c fs/btrfs/file.c fs/btrfs/fs.h +5 more+30 -140 replies
5/6btrfs: remove pointless barrier from btrfs_sync_file()fs/btrfs/file.c+0 -10 replies
6/6btrfs: update comment for struct btrfs_inode::lockfs/btrfs/btrfs_inode.h+18 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] btrfs: fix some data races during fsync and cleanups

From: Filipe Manana <[email protected]>

The following remove some data races affecting mostly fsync. In general these are mostly harmless from a functional perspective, though there are a few cases that could cause some unexpected results but should be very rare to hit. There's also a couple cleanups here.
More details on the changelogs.

Filipe Manana (6):
btrfs: add and use helpers for reading and writing last_log_commit
btrfs: add and use helpers for reading and writing log_transid
btrfs: add and use helpers for reading and writing fs_info->generation
btrfs: add and use helpers for reading and writing last_trans_committed
btrfs: remove pointless barrier from btrfs_sync_file()
btrfs: update comment for struct btrfs_inode::lock

 fs/btrfs/btrfs_inode.h  | 34 +++++++++++++++++++---------------
 fs/btrfs/ctree.h        | 34 +++++++++++++++++++++++++++++++++-
 fs/btrfs/disk-io.c      | 17 +++++++++--------
 fs/btrfs/file.c         |  5 ++---
 fs/btrfs/fs.h           | 30 ++++++++++++++++++++++++++++++
 fs/btrfs/inode.c        |  4 ++--
 fs/btrfs/ioctl.c        |  4 ++--
 fs/btrfs/scrub.c        |  2 +-
 fs/btrfs/super.c        |  7 ++++---
 fs/btrfs/sysfs.c        |  2 +-
 fs/btrfs/transaction.c  |  8 ++++----
 fs/btrfs/transaction.h  |  2 +-
 fs/btrfs/tree-checker.c |  2 +-
 fs/btrfs/tree-log.c     |  6 +++---
 14 files changed, 112 insertions(+), 45 deletions(-)
Signature · 1 line
2.40.1