lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 25 Oct 2019 13:00:33 +0100
From:   Graham Cobb <g.btrfs@...b.uk.net>
To:     Marcos Paulo de Souza <marcos.souza.org@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     clm@...com, josef@...icpanda.com, dsterba@...e.com,
        linux-btrfs@...r.kernel.org, mpdesouza@...e.com
Subject: Re: [PATCH 5/5] btrfs: ioctl: Call btrfs_vol_uevent on subvolume
 deletion

On 24/10/2019 03:36, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@...e.com>
> 
> Since the function btrfs_ioctl_snap_destroy is used for deleting both
> subvolumes and snapshots it was needed call btrfs_is_snapshot,
> which checks a giver btrfs_root and returns true if it's a snapshot.
> The current code is interested in subvolumes only.

To me, as a user, a snapshot *is* a subvolume. I don't even know what
"is a snapshot" means. Does it mean "was created using the btrfs
subvolume snapshot command"? Does it matter whether the snapshot has
been modified? Whether the originally snapshot subvolume still exists?
Or what?

I note that the man page for "btrfs subvolume" says "A snapshot is a
subvolume like any other, with given initial content.". And I certainly
have some subvolumes which are being used as normal parts of the
filesystem, which were originally created as snapshots (for various
reasons, including reverting changes and going back to an earlier
snapshot, or an easy way to make sure that large common files are
actually sharing blocks).

I would expect this event would be generated for any subvolume deletion.
If it is useful to distinguish subvolumes originally created as
snapshots in some way then export another flag (named to make it clear
what it really indicates, such as BTRFS_VOL_FROM_SNAPSHOT). I don't know
your particular purpose, but my guess is that a more useful flag might
actually be BTRFS_VOL_FROM_READONLY_SNAPSHOT.

Graham

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ