From: Giacomo Tesio <giacomo@tesio.it>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] create/create race
Date: Wed, 30 Nov 2016 16:28:06 +0100 [thread overview]
Message-ID: <CAHL7psHZLCDuBqTtzSQKnAf+AKySJLAE1_g02Dk=SSfvUUPdCA@mail.gmail.com> (raw)
In-Reply-To: <CAOw7k5isH0yJDGz1FDofGgi3BsSyqqqivhDz=yxpQ9Ud0E+Cqw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
2016-11-30 16:08 GMT+01:00 Charles Forsyth <charles.forsyth@gmail.com>:
>
> On 30 November 2016 at 15:02, Giacomo Tesio <giacomo@tesio.it> wrote:
>
>>
>> But reading that thread I can't actually see why the OEXCL path has been
>> taken instead of eliminating the race mapping the syscall to the 9p message.
>> I mean except backward compatibility.
>>
>
> I suppose you'll find out, but I'd expect that all but a handful of
> instances want the existing effect and are untroubled by any potential race.
> Given that OEXCL then seems to handle the handful, it seems a reasonable
> approach.
> The ocreate would just put the race in a different place, wouldn't it?
>
Well not exactly: I will use the new create syscall (without OEXCL support)
when I need such level of control and use ocreate with OEXCL when I do not
care about the race and want a "create or truncate" default behaviour.
But actually, I cannot see a use case where the create(2) default behaviour
can be *wanted*.
I just see many use case where it can be tollerated: the create can fail
anyway for other reasons so it does not add much complexity to the client...
But I'm probably missing something obvious: can you provide an example
where not having the truncate fallback in the syscall actually break the
program or introduce a bug. It's exactly what I'm looking for.
Giacomo
[-- Attachment #2: Type: text/html, Size: 2343 bytes --]
next prev parent reply other threads:[~2016-11-30 15:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 21:25 Giacomo Tesio
2016-11-30 11:04 ` Giacomo Tesio
2016-11-30 11:19 ` cinap_lenrek
2016-11-30 13:14 ` G. David Butler
2016-11-30 13:32 ` cinap_lenrek
2016-11-30 13:53 ` Charles Forsyth
2016-11-30 15:02 ` Giacomo Tesio
2016-11-30 15:08 ` Charles Forsyth
2016-11-30 15:28 ` Giacomo Tesio [this message]
2016-11-30 15:34 ` Charles Forsyth
2016-11-30 15:40 ` cinap_lenrek
2016-11-30 16:16 ` Giacomo Tesio
2016-11-30 21:51 ` Charles Forsyth
2016-11-30 21:53 ` Charles Forsyth
2016-11-30 23:15 ` Giacomo Tesio
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='CAHL7psHZLCDuBqTtzSQKnAf+AKySJLAE1_g02Dk=SSfvUUPdCA@mail.gmail.com' \
--to=giacomo@tesio.it \
--cc=9fans@9fans.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).