[Cluster-devel] [PATCH 2/2] mkfs.gfs2: Open the target device with O_EXCL

Bob Peterson rpeterso at redhat.com
Tue Apr 5 17:09:39 UTC 2016


----- Original Message -----
> On 05/04/16 15:14, Bob Peterson wrote:
> > In fact, we used to have O_EXCL:
> >
> > https://git.fedorahosted.org/cgit/cluster.git/commit/gfs2/mkfs/main_mkfs.c?h=RHEL6&id=b0db0bad3e6a8996fcaecbb93bfe9f8de97b7508
> >
> > I remember Ryan doing this, but I'm not sure why or how it disappeared.
> > We need to chase down why O_EXCL was removed last time; whether it was just
> > an oversight/mistake or whether it caused problems elsewhere.
> 
> That check_mount() function opened the device to check whether it was
> mounted and then closed it again, leaving main() to open it again
> afterwards for writing. From the commit history it looks like the
> function was just removed because it was racey, nothing related to the
> use of O_EXCL specifically, so I don't think there's anything in the
> history to suggest that it's a bad idea.
> 
> Cheers,
> Andy
> 
Hi,

In that case: ACK

Regards,

Bob Peterson
Red Hat File Systems




More information about the Cluster-devel mailing list