[Libguestfs] guestunmount issues

Pino Toscano ptoscano at redhat.com
Tue Nov 24 10:09:25 UTC 2015


On Tuesday 24 November 2015 12:57:17 Maxim Perevedentsev wrote:
> On 11/23/2015 07:59 PM, Pino Toscano wrote:
> > Hi,
> >
> > On Monday 23 November 2015 18:29:50 Maxim Perevedentsev wrote:
> >> 1) guestunmount never returns 3 (not mounted) - i guess it's a bug at
> >> guestunmount.c:223
> > Indeed, thanks for the notice -- just send a patch for it.
> >
> >> 2) I don't know whether it's a bug in guestunmount or fusermount, but on
> >> my machine while executing
> >>   > guestmount
> >>   > guestunmount
> >>   > guestunmount
> >> on second "guestunmount" I get
> >> "guestunmount: failed to unmount {...}: fusermount: failed to unmount
> >> {...}: Invalid argument"
> >> while, according to guestunmount.c, guestunmount should return something
> >> like
> >> "entry for {} not found"
> > Most probably it has to do with the (3) below: fusermount just reports
> > the EINVAL got from umount while trying to unmount an not-mounted
> > directory.
> I was mistaken. This should have been:
> 
> on second "guestunmount" I get
> "guestunmount: failed to unmount {...}: fusermount: failed to unmount
> {...}: Invalid argument"
> while, according to guestunmount.c, **fusermount**  should return something
> like
> "entry for {} not found"
> 
> It looks like the code path where guestunmount returns 3 is unreachable.
> That's why I asked someone to check fusermount error text on his machine.

Which is what I get on such situations, and why I produced the patch you
see on the mailing list.

> If fusermount always outputs "Invalid argument" in response to non-existent mount,
> than parsing at guestunmount.c:200 should be fixed accordingly.

Actually you might be right, but only because you are using root for any
operation and I did need to look for that, in both fuse and your logs,
as you did not mention that.

I'll adjust the patch, but please do mention all the details when asking
other people to look after possible issues in the code.

Thanks,
-- 
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/20151124/e51ffc66/attachment.sig>


More information about the Libguestfs mailing list