Skip to content

Fix various races in online resizing

Theodore Ts'o linux-ext4 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ext4: fix potential race between online resizing and write operationsfs/ext4/balloc.c fs/ext4/ext4.h fs/ext4/resize.c +1 more+97 -250 replies
2/3ext4: fix potential race between s_group_info online resizing and accessfs/ext4/ext4.h fs/ext4/mballoc.c+39 -210 replies
3/3ext4: fix potential race between s_flex_groups online resizing and accessfs/ext4/ext4.h fs/ext4/ialloc.c fs/ext4/mballoc.c +2 more+76 -371 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchBalbir Singh
1/3
2/3R-b
3/3

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 -v2 0/3] Fix various races in online resizing

I added __rcu decorations to s_group_desc, s_group_info and s_flex_group, and this turned up quite a few places where we were missing an rcu_dereference. A number of them weren't strictly necessary, but suppress warnings from the sparse code analysis tool --- and sparse did find some places where the missing rcu_deference could have led to some very hard to find bugs!

I folded the "introduce macro sbi_array_rcu_deref() to access rcu protected fields" patch into the first patch, since we now need to use the array in many more places.

Suraj Jitindar Singh (2):
ext4: fix potential race between s_group_info online resizing and
access
ext4: fix potential race between s_flex_groups online resizing and
access

Theodore Ts'o (1):
ext4: fix potential race between online resizing and write operations

 fs/ext4/balloc.c  |  14 +++++--
 fs/ext4/ext4.h    |  30 ++++++++++---
 fs/ext4/ialloc.c  |  23 ++++++----
 fs/ext4/mballoc.c |  61 ++++++++++++++++++---------
 fs/ext4/resize.c  |  62 +++++++++++++++++++++------
 fs/ext4/super.c   | 105 ++++++++++++++++++++++++++++++++--------------
 6 files changed, 212 insertions(+), 83 deletions(-)
Signature · 1 line
2.24.1