Skip to content

btrfs: Enumerate and export exclusive operations

Goldwyn Rodrigues linux-btrfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 1 replySuperseded

Changes in v3 from the cover letter

- Dropped patch to add additional balance information
- modified (simplified) progs patches accordingly

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: enumerate the type of exclusive operation in progressfs/btrfs/ctree.h fs/btrfs/dev-replace.c fs/btrfs/inode.c +2 more+50 -261 reply
2/2btrfs: export currently executing exclusive operation via sysfsfs/btrfs/ioctl.c fs/btrfs/sysfs.c+27 -00 replies

Reviews trailers per patch

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

PatchNikolay Borisov
1/2R-b
2/2R-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/2] btrfs: Enumerate and export exclusive operations

This patch series enumerates the exlcusive operation currently being perfomed by the current filesystem and exports it in the sys filesytem at /sys/fs/btrfs/<fsid>/exclusive_operation.

This would enable our tools to specify precisely which operation is running on why starting an exclusive operation failed. The series also adds a sysfs_notify() to alert userspace when the state changes, so userspace can perform select() on it to get notified of the change. This would enable us to enqueue a command which will wait for current exclusive operation to complete before issuing the next exclusive operation. This has been done synchronously as opposed to a background process, or else error collection (if any) will become a nightmare.

For backward compatibility, the tools continue working as before if the sys file is not present.

Changes since v1:
- Corrected call for btrfs_start_exop() in btrfs_ioctl_dev_replace()
- Use fsid_str[] instead of fsid[] to save on uuid_parse()

Changes since v2:
- Dropped patch to add additional balance information
- modified (simplified) progs patches accordingly