On 2020/2/10 下午3:55, Qu Wenruo wrote: >>> >>> That looks like a valid workaround. >>> >>> Although the immediate number 5 looks no that generic for all test >>> environments. >>> >>> I really hope to find a stable way to wait for all subvolume drops other >>> than rely on some hard coded numbers. >> >> what about btrfs filesystem sync? > > The only cleaner related work of that ioctl is waking up > transaction_kthread, which will also wake up cleaner_kthread. > > It triggers clean up, but not wait for it. > > And my first run of such added fi sync failed too, so not good enough I > guess. Although 'fi sync' does nothing better than vanilla sync, Nikolay also mentioned about 'subv sync', which does the trick! Nikolay rocks! That would be the proper way to solve the problem. And it's time to update the man page of `btrfs-filesystme`. Thanks, Qu > > Thanks, > Qu > > >> >> >> <snip> >>