Re: [PATCH] Btrfs-progs: btrfs subvolume delete could delete subvolumes
From: cwillu <hidden>
Date: 2012-09-24 14:36:48
From: cwillu <hidden>
Date: 2012-09-24 14:36:48
On Mon, Sep 24, 2012 at 6:02 AM, David Sterba [off-list ref] wrote:
On Mon, Sep 24, 2012 at 10:59:34AM +0800, Anand Jain wrote:quoted
quoted
Yes, this is useful, thanks. I'm thinking if it's ok to stop on first error, ie. when the subvolume does not exist or is a directory.I am fine with either ways. I shall just keep it as it is as of now.Yes, I'm ok with that. The usecase I had in mind was something like btrfs subvol del * but I should know the dir I'm in and what I'm doing there, errors are to be expected.
For what it's worth, rmdir's behaviour is to continue after errors (i.e., "mkdir 1; mkdir 3; rmdir 1 2 3" deletes 1 and 3, and exits with a non-zero exit code); unless there's a good reason to do otherwise, matching that behaviour is probably best.