[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] guestunmount issues



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

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]