mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, linux-man@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: O_TMPFILE detection
Date: Tue, 11 Feb 2014 08:03:02 -0800	[thread overview]
Message-ID: <20140211160302.GA18936@infradead.org> (raw)

I've started implementing support for O_TMPFILE in xfs_io in preparation
for proper testcases and found something rather annoying:

Given that we implicitly pass O_DIRECTORY as part of the full O_TMPFILE
flag an open using O_TMPFILE will simply succeed on a kernel old enough
to not have O_TMPFILE support, and give you a file descriptor for the
directory passed in.  Of course this only works if you open the fd
read-only which isn't all that useful for real temporary files, but it
would be the natural choice for a feature test.

I guess we can't really fix this up any more, but does anyone have a
good idea how to document this properly in the man page?

             reply	other threads:[~2014-02-11 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 16:03 Christoph Hellwig [this message]
2014-02-11 17:54 ` 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=20140211160302.GA18936@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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

all inboxes | Powered by JetHome®