On 09/30/17 18:37, Graham Cobb wrote:
> On 30/09/17 14:08, Holger Hoffstätte wrote:
>> A "root" subvolume is identified by a null parent UUID, so adding a new
>> subvolume filter and flag -P ("Parent") does the trick. 
> 
> I don't like the naming. The flag you are proposing is really nothing to
> do with whether a subvolume is a parent or not: it is about whether it
> is a snapshot or not (many subvolumes are both snapshots and also
> parents of other snapshots, and many non-snapshots are not the parent of
> any subvolumes).

You're completely right. I wrote that patch about a year ago because I
needed it for my own homegrown backup program and spent approx. 5 seconds
finding a free option letter; ultimately I ended up using the mentioned
shell hackery as alternative. Anyway, I was sure that at the time the
other letters sounded even worse/were taken, but that may just have been
in my head. ;-)

I just rechecked and -S is still available, so that's good.

> I have two suggestions:
> 
> 1) Use -S (meaning "not a snapshot", the inverse of -s). Along with this
> change. I would change the usage text to say something like:
> 
>  -s list subvolumes originally created as snapshots
>  -S list subvolumes originally created not as snapshots
> 
> Presumably specifying both -s and -S should be an error.

That sounds much better indeed and is a quick fix. While I agree
that the "-P <uuid>/none" filter would be useful too, it's also
a different feature and more work than I want to invest in this
right now. Maybe later "-S" can simply delegate to "-P none".

cheers
Holger
--
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

Reply via email to