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
Hello everyone! I'm playing with guestunmount and got the following issues: 1) guestunmount never returns 3 (not mounted) - i guess it's a bug at guestunmount.c:223 2) I don't know whether it's a bug in guestunmount or fusermount, but on my machine while executing like "entry for {} not found" 3)
fusermount -u {} gives me "Invalid argument" as well, while umount {} handles this error successfully and returns "not mounted". (strace logs attached)
I have a custom centos7-based distro, but I don't think it matters. I'd like someone to compare results with mine, and, possibly, give me some explanations about why it's going like this and how to distinguish non-mounted mountpoints from busy ones (I guess I'll have to parse umount {} output). Thanks in advance! -- Your sincerely, Maxim Perevedentsev
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.
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
2) I don't know whether it's a bug in guestunmount or fusermount, but on my machine while executing 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.
3)
fusermount -u {} gives me "Invalid argument" as well, while umount {} handles this error successfully and returns "not mounted". (strace logs attached)
Well, umount still returns 1, so In any case, both fail due to the mount point not being actually mounted; the difference is that umount takes the EINVAL from umount2 (which calls the umount Linux syscall) as an indication the directory is not a mount point, while fusermount just reports the failure as it is.
I'd like someone to compare results with mine, and, possibly, give me some explanations about why it's going like this and how to distinguish non-mounted mountpoints from busy ones (I guess I'll have to parse umount {} output).
Unfortunately it does not seem to be possible to do that, just by checking the return values of the tools. I guess you might want to ask fuse and util-linux people to improve the return values, although that might break user code... Another alternative may be writing C code doing the umount, but that would imply rewrite part of the logic... -- Pino Toscano
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.
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
2) I don't know whether it's a bug in guestunmount or fusermount, but on my machine while executing 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. If fusermount always outputs "Invalid argument" in response to non-existent mount, than parsing at guestunmount.c:200 should be fixed accordingly. -- Your sincerely, Maxim Perevedentsev
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.
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
2) I don't know whether it's a bug in guestunmount or fusermount, but on my machine while executing 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
On 11/24/2015 01:09 PM, Pino Toscano wrote:
On Tuesday 24 November 2015 12:57:17 Maxim Perevedentsev wrote:
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. Thank you! I did not expect the user I'm working as to be so important :-(
-- Your sincerely, Maxim Perevedentsev
participants (2)
-
Maxim Perevedentsev -
Pino Toscano