[Libguestfs] [PATCHv4 0/2] Introduce vfs_minimum_size API to get minimum filesystem size.

Pino Toscano ptoscano at redhat.com
Wed Oct 21 12:51:32 UTC 2015


On Tuesday 20 October 2015 20:56:25 Maxim Perevedentsev wrote:
> I have an issue with btrfs:
> 
> There's an API
>  > btrfs inspect-internal min-dev-size /sysroot/
> 
> But this API is available only in btrfs-progs >= 4.2.
> Before this, there's no reliable way to get minimum size (I could parse 
> "btrfs filesystem show", but it is veeery inaccurate).
> 
> Can we require btrfs-progs v4.2? Or how should I work-around this issue?

The usual way in cases like this is to detect whether the needed tools
are available, or the needed versions of them, and if not report an
error (or just ENOTSUP).  See for example the btrfs code for setting the
UUID in a btrfs filesystem (daemon/btrfs.c:btrfs_set_uuid).

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20151021/65442438/attachment.sig>


More information about the Libguestfs mailing list