On 10/20/2015 08:58 PM, Richard W.M. Jones wrote:
On Tue, Oct 20, 2015 at 08:56:25PM +0300, 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?
Well it's a new API, so we can just tell people they need new
btrfs-progs if they want to use the new API.
It would be a problem if we were changing an old API, but that's not
the case here.
Rich.
OK. I have another question:
The call for ext works on mounted and unmounted fs.
for ntfs on read-only-mounted and unmounted.
for btrfs on mounted (ro and rw).
for xfs on mounted (ro and rw) (xfs does not support
shrinking, so guestfs_xfs_info).
Should we require the user to care about fs mount status / do
mounts/unmounts ourselves (how to choose mountpoint?) / refuse to work
if fs is not ro-mounted?
I would vote for 1st option: include mount check into functions and
politely report incompatible mount status to user.
--
Your sincerely,
Maxim Perevedentsev