On 2017年09月26日 13:44, Misono, Tomohiro wrote:
Fix subvol del --commit-after to work properly:
  - SYNC ioctl will be issued even when last delete is failed
  - SYNC ioctl will be issued on each file system only once in the end

To achieve this, each deleted subvol's (parent's) fsid is checked each
time. If the fsid is seen for the first time, its fd will be kept in order
to issue SYNC ioctl in the end.

There already exists get_fsid() in cmds-property.c and seen_fsid which
keeps fsid in hush function in cmds-filesystem.c. First three patches
make them to common functions and last one is the main part.

Much more elegant than my expectation.
Clean and short fix.

Only small suggestion to use fd list other than using the last valid fd (for patch 3), and a possible patch split (for patch 4).

Looks good overall.
You can add my reviewed-by tag after splitting cleanup patch.

Good job.

Thanks,
Qu

Tomohiro Misono (4):
   btrfs-progs: move get_fsid() to util.c
   btrfs-progs: move seen_fsid to util.c
   btrfs-progs: change seen_fsid to hold fd and DIR*
   btrfs-progs: subvol: fix subvol del --commit-after

  cmds-filesystem.c |  88 +++------------------------------------------
  cmds-property.c   |  30 ----------------
  cmds-subvolume.c  |  77 ++++++++++++++++++++++++++++-----------
  utils.c           | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
  utils.h           |  15 ++++++++
  5 files changed, 181 insertions(+), 134 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to