Re: [PATCH] btrfs: reject refs=0 subvolume without DEAD in SUBVOL_SYNC_WAIT
From: Cheng Yongkang
Date: Sun Nov 01 2026 - 01:29:26 EST
Hi Qu,
Thanks for pointing out the failed-delete path. v2 is here:
https://lore.kernel.org/linux-btrfs/20261101062539.1744605-1-teel4res@xxxxxxxxx/
Before waiting for a deleted subvolume, it now returns -EROFS if the
filesystem is read-only. The check runs on every iteration, so it also
covers a filesystem that becomes read-only during the wait. On a
writable filesystem, a zero-reference root without DEAD returns
-EUCLEAN, with unlikely(). Subvolumes that were not deleted or do not
exist still return -EEXIST and -ENOENT.
Thanks,
Cheng Yongkang