Re: [PATCH v4] compat: Fix read() of 2GB and more on Mac OS X
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- Aug 19, 2013, 16:37 UTC
- Message-ID
- <61B1EB04-497F-4398-8C52-CCE3A1A81B10@zib.de>
- In-Reply-To
- <CA+55aFzQhJqE4QDwJDKtkTtJpMNbz3_Aw5_Q3yTk5DnhLJyjCQ@mail.gmail.com>
On Aug 19, 2013, at 6:04 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
Show 12 quoted lines
> I hate your patch for other reasons, though: > >> The problem for read() is addressed in a similar way by introducing >> a wrapper function in compat that always reads less than 2GB. > > Why do you do that? We already _have_ wrapper functions for read(), > namely xread(). Exactly because you basically have to, in order to > handle signals on interruptible filesystems (which aren't POSIX > either, but at least sanely so) or from other random sources. And to > handle the "you can't do reads that big" issue. > > So why isn't the patch much more straightforward?
The first version was more straightforward [1]. But reviewers suggested that the compat wrappers would be the right way to do it and showed me that it has been done like this before [2].
I haven't submitted anything in a while, so I tried to be a kind person and followed the suggestions. I started to hate the patch a bit (maybe less than you), but I wasn't brave enough to reject the suggestions. This is why the patch became what it is.
I'm happy to rework it again towards your suggestion. I would also remove the compat wrapper for write(). But I got a bit tired. I'd appreciate if I received more indication whether a version without compat wrappers would be accepted.
Steffen
[1] http://article.gmane.org/gmane.comp.version-control.git/232455 [2] 6c642a8 compate/clipped-write.c: large write(2) fails on Mac OS X/XNU