On Tue, Dec 02, 2014 at 01:52:52PM +0100, David Sterba wrote:
> On Mon, Dec 01, 2014 at 10:14:03PM -0500, Zygo Blaxell wrote:
> > > export BTRFS_SUBVOLUME_DELETE_CONFIRM=1
> > > 
> > > Ideas?
> > 
> > Never rely on aliasing or environment variables for defaults, and never
> > change default behavior if your releases are old enough that someone
> > has built scripts on top of them.  ;)
> 
> Exactly.
> 
> > If I had to pick the least evil, I'd go for interactive prompting by
> > default (do nothing if the interaction fails, e.g. no TTY) and add a
> > '-f'/'--force' flag to bypass the prompt.
> 
> This sounds acceptable.
> 
> > This is consistent with the
> > way lvm2 and mdadm work when presented with data-losing or otherwise
> > questionable commands and parameters.  It will break scripts, but btrfs
> > users should still be expecting that for a while as undesirable default
> > behaviors are identified.
> 
> How is this going to break scripts?

   Any script which relies on being able to delete subvolumes in
unattended operation will now require modification to use -f.

   Hugo.

-- 
Hugo Mills             | Unix: For controlling fungal diseases in crops
hugo@... carfax.org.uk |
http://carfax.org.uk/  |
PGP: 65E74AC0          |

Attachment: signature.asc
Description: Digital signature

Reply via email to