[Libguestfs] [PATCH RFC][Resend] New API: btrfs_convert
Pino Tsao
caoj.fnst at cn.fujitsu.com
Mon Jun 8 12:09:52 UTC 2015
Hi
在 2015年06月05日 22:38, Pino Toscano 写道:
> Hi,
>
> In data venerdì 5 giugno 2015 13:47:12, Pino ha scritto:
>> 在 2015年06月05日 00:37, Pino Toscano 写道:
>>> In data giovedì 4 giugno 2015 11:56:41, Pino Tsao ha scritto:
>>>> Disable the test case temporarily for 2 reasons:
>>>> 1. Because the default test disk size is 500M, while btrfs
>>>> convert command think it is too small to convert it(actually,
>>>> just add 10M or 20M more is enough).
>>>
>>> If the base test disks that are available in tests/c-api/tests are
>>> not enough, just write the test (creating handle, scratch disks,
>>> partitions, etc) in shell or perl, just like the other ones available
>>> in tests/btrfs.
>>>
>>> This kind of API needs at least some basic coverage.
>>
>> Ok, I can do that. But actually, I think the following 2nd problem
>> matters more, I mean, even if I write the test, but it will still fail
>> ,because of the tiny problem of btrfs-convert
>>>
>>>> 2. Btrfs-progs has may have a tiny bug, when execute the command
>>>> in guestfish, it report some error, but convert the filesystem to
>>>> btrfs successfully.
>>>
>>> I don't understand, are you saying that `btrfs convert` will exit with
>>> failure but doing the actual changes? If so, is that a known/reported
>>> upstream bug?
>>>
>>
>> Yes, exactly, it exit with failure but actually got what we want:
>> convert fs from ext2/3/4 to btrfs successfully. While it can rollback
>> normally without any error. I did the test in guestfish using a img
>> file, and I also checked the result by examining img file outside the
>> guestfish, prove that the API worked.
>>
>> I searched in the btrfs mail list archive, did`t see it is a known bug.
>> because the btrfs convert command works well in my host. It just has
>> that problem in supermin appliance for me for now.
>
> Is the issue (btrfs convert doing the job but exiting with error)
> happening only within the appliance of libguestfs, or also when run
> in a normal installation?
>
> * if the failures happens only within libguestfs, then we need to
> figure out what's the issue, and what btrfs convert could require
> from the appliance
>
> * if it happens also when run in a normal installation, that's an
> upstream bug to fix
>
> In any case, it does not make sense to add an API which does not
> provide a reliable return value. Either it returns a failure and does
> nothing, or it returns success and does the requested changes.
>
For now, the issue only happens within the appliance of libguestfs. It
is ok in a normal installation.
Here is my questions now: Do we have approach to debug in kernel in
appliance? I am aware that I can fprintf messages in the daemon to
stderr, but it seems it isn`t enough for me now:(
--
Yours Sincerely,
Pino Tsao
More information about the Libguestfs
mailing list