mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	dhowells@redhat.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, hch@infradead.org,
	viro@zeniv.linux.org.uk, adilger@sun.com,
	alan@lxorguk.ukuu.org.uk, akpm@linux-foundation.org,
	mtk.manpages@gmail.com
Subject: Re: [RFC PATCH] vfs: new open(2) flag to open filesystem node
Date: Sun, 5 Jul 2009 17:40:25 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0907051735030.3210@localhost.localdomain> (raw)
In-Reply-To: <a36005b50907051235h17f559c6w1937998c7eec0b0@mail.gmail.com>



On Sun, 5 Jul 2009, Ulrich Drepper wrote:
> 
> I am still not sure whether this shouldn't rather be an implementation
> of POSIX's O_SEARCH or whether it is already an O_SEARCH
> implementation.

Umm. That makes no sense at all.

O_SEARCH is only meaningful for directories. For anything else, it's not 
at all POSIX - it's expressly defined to be "undefined".

So clearly, O_SEARCH is absolutely the _wrong_ thing to do. Claiming that 
"it is POSIX" is pure and utter garbage, because it is _not_ POSIX in any 
relevant way. Sure, POSIX allows us to have flying monkeys out of our 
butts when you specify O_SEARCH, but where's the advantage? Undefined 
behavior is undefined behavior. 

It would be clearly and unambiguously _better_ to have another O_xyz flag, 
that people can then do

	#ifdef O_xyz
		.. get some well-defined Linux extension behavior ..
	#endif

in their source code, rather than overlead an undefined case with random 
crap.

			Linus

  reply	other threads:[~2009-07-06  0:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  9:56 Miklos Szeredi
2009-06-30 20:25 ` David Howells
2009-07-01  4:59   ` Miklos Szeredi
2009-07-05 19:35     ` Ulrich Drepper
2009-07-06  0:40       ` Linus Torvalds [this message]
2009-07-06  5:50         ` Ulrich Drepper
2009-07-06 12:29           ` Miklos Szeredi
2009-07-06 15:59           ` Linus Torvalds

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=alpine.LFD.2.01.0907051735030.3210@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=adilger@sun.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dhowells@redhat.com \
    --cc=drepper@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=mtk.manpages@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

Powered by JetHome