On Mon, Dec 1, 2014 at 7:16 PM, Roman Mamedov <r...@romanrm.net> wrote: > > A more sensible idea could be adding a global-level '-i' switch, same as in > 'rm', so that you or distros could then alias 'btrfs' to 'btrfs -i' (ask > confirmation on any irreversible action).
Well the difference being that there doesn't seem to be any other irreversible action from my scan of man btrfs -- am I missing anything? This is the only thing that actually leads to loss of data. When btrfs has so many features (esp snapshots) to prevent user accidentally deleting data (I liked especially http://www.youtube.com/v/9H7e6BcI5Fo?start=209) I think there has to be *some* modicum of support for warning against deleting a subvolume (and it seems others agree too). But I see what you mean in the bugzilla comment about not wanting your existing backup snapshot scripts to fail because they don't have a -f. At the same time, aliasing via -i on top level btrfs binary may not be so practical here because this is the only command which will actually use it (again, correct if wrong). Perhaps exporting some envvar in the default shell's rc file (or whichever file will be read only if the shell is interactive) would work? Like in ~/.bashrc: export BTRFS_SUBVOLUME_DELETE_CONFIRM=1 Ideas? -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा -- 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