Skip to content

btrfs: dev-replace: replace_task related cleanup

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest4 patches 1 replyIn review

Changes in v3 from the cover letter

- More cleanup patches for dev-replace
Most newer ones are minor, e.g. changing the message and its timing. But the error handling inside btrfs_dev_replace_finishing() is important for later replace_task cleanup.

- Directly modify replace_task when the replace is suspended We do not need any extra lock, since the only reader is accessing replace_task without lock anyway.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4btrfs: dev-replace: fix the incorrect error messagefs/btrfs/dev-replace.c+1 -10 replies
2/4btrfs: dev-replace: concentrate all messages into btrfs_dev_replace_finishing()fs/btrfs/dev-replace.c+8 -120 replies
3/4btrfs: dev-replace: fix the error handling in btrfs_dev_replace_finishing()fs/btrfs/dev-replace.c+21 -181 reply
4/4btrfs: dev-replace: properly cleanup replace_taskfs/btrfs/dev-replace.c+14 -40 replies

Reviews trailers per patch

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

PatchJohannes Thumshirn
1/4
2/4
3/4
4/4R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/4] btrfs: dev-replace: replace_task related cleanup

[CHANGELOG]
v3:
- More cleanup patches for dev-replace
Most newer ones are minor, e.g. changing the message and its timing. But the error handling inside btrfs_dev_replace_finishing() is important for later replace_task cleanup.

- Directly modify replace_task when the replace is suspended We do not need any extra lock, since the only reader is accessing replace_task without lock anyway.

We have 4 errors paths that do not properly reset replace_task to NULL after the replace is cancelled/finished/suspended.

This is reported by Sashiko.

And since we're here, also do extra cleanup related to dev-replace error message and its timing.

Qu Wenruo (4):
btrfs: dev-replace: fix the incorrect error message
btrfs: dev-replace: concentrate all messages into
btrfs_dev_replace_finishing()
btrfs: dev-replace: fix the error handling in
btrfs_dev_replace_finishing()
btrfs: dev-replace: properly cleanup replace_task

 fs/btrfs/dev-replace.c | 79 +++++++++++++++++++++++-------------------
 1 file changed, 44 insertions(+), 35 deletions(-)
Signature · 1 line
2.55.0