From: "George Spelvin" <linux@horizon.com>
To: arjan@infradead.org
Cc: linux@horizon.com, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org
Subject: Re: [GIT PULL] ocfs2 changes for 2.6.32
Date: 21 Sep 2009 23:28:02 -0400 [thread overview]
Message-ID: <20090922032802.1827.qmail@science.horizon.com> (raw)
> or make it one level simpler?
> Have a "wait for all started copies" call only.... saves a ton of book
> keeping, and is likely what people will use it for in the end anyway.
Aieeee! No, no, a thousand times, no!
We do NOT need another blocking primitive that can't play well with others.
That would be a HORRIBLE design mistake.
The whole benefit of Linus' scheme is that it returns a file descriptor.
Any waiting should be done by the standard event-wait system call, poll().
It should return POLLIN when there's an interesting event (such as copy
completion), and should remain valid until explicitly close()d.
There's nothing wrong with a convenience function that waits for all
started copies, but I don't see a reason to design a new kernel interface
for the purpose.
A few more points:
- If the file descriptor returned by copyfile() is guaranteed not to be 0
(even if that is available), perhaps it should be guaranteed to be >= 3.
- We might as well make the returned file descriptor O_CLOEXEC by default.
You can always change it back if you want to.
next reply other threads:[~2009-09-22 3:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 3:28 George Spelvin [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-09-22 0:51 [GIT PULL] ocfs2 changes for 2.6.32 George Spelvin
2009-09-11 20:04 Joel Becker
2009-09-14 21:32 ` Linus Torvalds
2009-09-14 22:14 ` Joel Becker
2009-09-14 23:27 ` Linus Torvalds
2009-09-15 0:04 ` Joel Becker
2009-09-15 0:31 ` Linus Torvalds
2009-09-15 0:54 ` Joel Becker
2009-09-15 2:01 ` Linus Torvalds
2009-09-15 4:05 ` Arjan van de Ven
2009-09-15 4:35 ` Joel Becker
2009-09-15 4:06 ` Joel Becker
2009-09-15 16:30 ` Linus Torvalds
2009-09-15 21:45 ` Joel Becker
2009-09-16 4:20 ` Linus Torvalds
2009-09-16 4:40 ` Joel Becker
2009-09-17 16:29 ` Linus Torvalds
2009-09-17 16:38 ` Arjan van de Ven
2009-09-17 20:16 ` Linus Torvalds
2009-09-17 18:40 ` Roland Dreier
2009-09-17 20:17 ` Linus Torvalds
2009-09-17 20:34 ` Joel Becker
2009-09-18 0:29 ` Linus Torvalds
2009-09-17 20:42 ` Roland Dreier
2009-09-17 20:55 ` Linus Torvalds
2009-09-15 6:44 ` Miklos Szeredi
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=20090922032802.1827.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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