[Ocfs2-tools-devel] [PATCH] ocfs2_controld: Handle additional mounts racing umount(2).

Mark Fasheh mfasheh at suse.com
Fri Aug 22 17:41:58 PDT 2008


On Fri, Aug 22, 2008 at 04:43:05PM -0700, Joel Becker wrote:
> ocfs2_controld only allows one MOUNT/UNMOUNT operation at a time.
> Racing operations will receive EBUSY.
> 
> Well, if the kernel is unmounting while an additional mount is in
> progress, the daemon won't clean up after a failed additional mount.
> 
> mount /dev/sdb1 /ocfs2
> mount /dev/sdb1 /ocfs3
> 				umount /ocfs2
> 				# Gets there first, umount(2) happens.
> 				# ->put_super(7) calls ocfs2_hb_ctl,
> 				# which gets -EBUSY from
> 				# o2cb_group_leave().  The filesystem is
> 				# no longer mounted in the kernel.
> 
> The solution is to clear the ms_additional flag when we notice this
> race.  The daemon, seeing it is about to send EBUSY to the unmount,
> clears ms_additional on the mount of /ocfs3.  Then, when that mount
> fails, it knows to exit the group.
> 
> Signed-off-by: Joel Becker <joel.becker at oracle.com>
Signed-off-by: Mark Fasheh <mfasheh at suse.com>

--
Mark Fasheh



More information about the Ocfs2-tools-devel mailing list