[Libguestfs] [PATCH 3/3] sysprep: fix btrfs subvolume processing in fs-uuids

Richard W.M. Jones rjones at redhat.com
Fri Jul 8 12:17:10 UTC 2016


On Fri, Jul 08, 2016 at 01:58:07PM +0300, Maxim Perevedentsev wrote:
> On 07/07/2016 06:59 PM, Richard W.M. Jones wrote:
> >
> >However I'm not convinced that this means my statement before about
> >set_uuid should take a Mountable instead of a Device is wrong.  It
> >could still be changed to take a Mountable, and either we'd have to
> >document that setting UUID on a btrfs subvolume makes no sense, or we
> >could have set_uuid refuse to work on a subvolume (only on the "main"
> >btrfs subvolume, if there is such a thing).
> >
> >Anyway, ACK.
> >
> >Rich.
> >
> As I understand, one can now only set uuid on a mountable, which is
> - unmounted (especially for btrfs)
> - not a btrfs subvolume
> So you will get code like
> 
> if (mountable->type != MOUTABLE_DEVICE) {
>     reply_with_error();
>     return -1;
> }
> do_something(mountable->device).
> 
> The only thing we get is a more correct error.
> But likely there are many places where one can pass the result of
> list_filesystems.
> Probably it makes sense to change all of them to correctly process
> subvolumes,
> but the patch might be extremely large.
> 
> Implicitly using btrfs device instead of subvolume is even worse, IMO.
> 
> Do I miss something?

Something to solve one day.  The current patch is fine.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list