Lazy umount emulation

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

 



Hello

In http://review.gluster.com/8649 I attempt to emulate lazy umount on
systems that lacks this Linux-only feature. I do this by spawning a
thread that periodically attempt to umount and then rmdir the mount
point.

That works nicely for some scenario (it lets NetBSD pass
tests/basic/pump.t), but fail in others (tests/basic/quota.t) where a
process calls lazy umount and exits before it unmount actually happens.
In that case, the umount thread is terminated with the process and I am
screwed.

I see two solutions:

1) ask glusterd to do it. 
I could reuse glusterd_handle_umount() and add a rmdir option in the
dict, but there may be a security problem:  glusterd_handle_umount()
checks that the requested path is within mountbroker-root, and it may be
a bad idea to accept umount/rmdir for random paths

2) spawn an independant process.
I could write a external program in contrib that does the job, on lazy
umount request, just fork and execute it. Since the external program
runs with the privilege of whoever calls it, there is no security issue.

I imagine something like this:
umount-lazy -p path -d dev [-r]
(dev is the dev_t of the mount point, useful to detect umount was done,
-r is for rmdir)

What is the preferred way?


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@xxxxxxxxxx
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux