From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 2/2] mkfs.gfs2: Open the target device with O_EXCL
Date: Tue, 5 Apr 2016 15:37:28 +0100 [thread overview]
Message-ID: <5703CDA8.2090705@redhat.com> (raw)
In-Reply-To: <2126126528.47807026.1459865667265.JavaMail.zimbra@redhat.com>
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
next prev parent reply other threads:[~2016-04-05 14:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-05 14:03 [Cluster-devel] [PATCH 1/2] gfs2_edit: Don't hijack bh->b_data in read_master_dir Andrew Price
2016-04-05 14:03 ` [Cluster-devel] [PATCH 2/2] mkfs.gfs2: Open the target device with O_EXCL Andrew Price
2016-04-05 14:14 ` Bob Peterson
2016-04-05 14:37 ` Andrew Price [this message]
2016-04-05 17:09 ` Bob Peterson
2016-04-05 17:11 ` [Cluster-devel] [PATCH 1/2] gfs2_edit: Don't hijack bh->b_data in read_master_dir Bob Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5703CDA8.2090705@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.