Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 21:28 -0400, Chris Mason wrote: > This is what btrfs already does for O_DIRECT plus compressed, or > other > cases where people don't want their applications to break on top of > new > features that aren't quite compatible with it. I do not know how much of direct IO we can

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Jeff Moyer
Chris Mason writes: >> I do think we should at least document what file systems appear to be >> doing. Here's a man page patch for open (generated with extra context >> for easier reading). Let me know what you think. > > We shouldn't be ignoring it, but instead call it similar to O_DSYNC plus

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Chris Mason
On Tue, Aug 25, 2015 at 10:00:58AM -0400, Jeff Moyer wrote: > Dave Chinner writes: > > > On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: > >> Brian Norris writes: > >> > >> > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > >> >> Now, some user-space fails when

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Jeff Moyer
Dave Chinner writes: > On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: >> Brian Norris writes: >> >> > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: >> >> Now, some user-space fails when direct I/O is not supported. >> > >> > I think the whole argument rested on

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 21:28 -0400, Chris Mason wrote: This is what btrfs already does for O_DIRECT plus compressed, or other cases where people don't want their applications to break on top of new features that aren't quite compatible with it. I do not know how much of direct IO we can do in

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Jeff Moyer
Chris Mason c...@fb.com writes: I do think we should at least document what file systems appear to be doing. Here's a man page patch for open (generated with extra context for easier reading). Let me know what you think. We shouldn't be ignoring it, but instead call it similar to O_DSYNC

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Jeff Moyer
Dave Chinner da...@fromorbit.com writes: On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: Brian Norris computersforpe...@gmail.com writes: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now, some user-space fails when direct I/O is not supported. I think

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-25 Thread Chris Mason
On Tue, Aug 25, 2015 at 10:00:58AM -0400, Jeff Moyer wrote: Dave Chinner da...@fromorbit.com writes: On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: Brian Norris computersforpe...@gmail.com writes: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now,

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Chris Mason
On Tue, Aug 25, 2015 at 09:46:11AM +1000, Dave Chinner wrote: > On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: > > Brian Norris writes: > > > > > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > > >> Now, some user-space fails when direct I/O is not supported. > >

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dave Chinner
On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: > Brian Norris writes: > > > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > >> Now, some user-space fails when direct I/O is not supported. > > > > I think the whole argument rested on what it means when "some user

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Jeff Moyer
Brian Norris writes: > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: >> Now, some user-space fails when direct I/O is not supported. > > I think the whole argument rested on what it means when "some user space > fails"; apparently that "user space" is just a test suite (which

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Brian Norris
On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > Now, some user-space fails when direct I/O is not supported. I think the whole argument rested on what it means when "some user space fails"; apparently that "user space" is just a test suite (which can/should be fixed). > We

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Richard Weinberger
Am 24.08.2015 um 11:34 schrieb Artem Bityutskiy: > On Mon, 2015-08-24 at 01:03 -0700, Christoph Hellwig wrote: >> On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: >>> Back when we were writing UBIFS, we did not need direct IO, so we >>> did >>> not implement it. But yes, probably

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 01:03 -0700, Christoph Hellwig wrote: > On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: > > Back when we were writing UBIFS, we did not need direct IO, so we > > did > > not implement it. But yes, probably someone who cares could just > > try > >

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 03:17:10PM +0800, Dongsheng Yang wrote: > >Richard, you mention this was suggested by Dave, could you please pint > >to the discussion, if possible? > > http://lists.infradead.org/pipermail/linux-mtd/2015-August/060702.html > > That's in a discussion I want to introduce

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 04:03 PM, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: Back when we were writing UBIFS, we did not need direct IO, so we did not implement it. But yes, probably someone who cares could just try implementing this feature. So I think

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: > Back when we were writing UBIFS, we did not need direct IO, so we did > not implement it. But yes, probably someone who cares could just try > implementing this feature. So I think the answer here is to implement a real version

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 00:53 -0700, Christoph Hellwig wrote: > On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > > 1. we are the only FS erroring out on O_DIRECT > > 2. other file-systems not supporting direct IO just fake it > > There are lots of file systems not supporting

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: > 1. we are the only FS erroring out on O_DIRECT > 2. other file-systems not supporting direct IO just fake it There are lots of file systems not supporting O_DIRECT, but ubifs might be the most common one. Given that O_DIRECT

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 03:17 PM, Dongsheng Yang wrote: On 08/24/2015 03:18 PM, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the "common practice" here, and follow it.

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 03:18 PM, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the "common practice" here, and follow it. This requires a small research. What would be the

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: > On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: > > > Basically, we need to see what is the "common practice" here, and > > > follow it. This requires a small research. What would be the most > > > popular Linux FS which

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 13:49 -0700, Brian Norris wrote: > Pardon the innocent bystander's comment, but: > > On Thu, Aug 20, 2015 at 01:40:02PM +0200, Richard Weinberger wrote: > > Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: > > > On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: > > >

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Brian Norris
On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now, some user-space fails when direct I/O is not supported. I think the whole argument rested on what it means when some user space fails; apparently that user space is just a test suite (which can/should be fixed). We can

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Jeff Moyer
Brian Norris computersforpe...@gmail.com writes: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now, some user-space fails when direct I/O is not supported. I think the whole argument rested on what it means when some user space fails; apparently that user space is just a

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: 1. we are the only FS erroring out on O_DIRECT 2. other file-systems not supporting direct IO just fake it There are lots of file systems not supporting O_DIRECT, but ubifs might be the most common one. Given that O_DIRECT

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 03:17:10PM +0800, Dongsheng Yang wrote: Richard, you mention this was suggested by Dave, could you please pint to the discussion, if possible? http://lists.infradead.org/pipermail/linux-mtd/2015-August/060702.html That's in a discussion I want to introduce ubifs

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 04:03 PM, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: Back when we were writing UBIFS, we did not need direct IO, so we did not implement it. But yes, probably someone who cares could just try implementing this feature. So I think

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the common practice here, and follow it. This requires a small research. What would be the most popular Linux FS which does not

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 03:18 PM, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the common practice here, and follow it. This requires a small research. What would be the

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: Back when we were writing UBIFS, we did not need direct IO, so we did not implement it. But yes, probably someone who cares could just try implementing this feature. So I think the answer here is to implement a real version

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 00:53 -0700, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: 1. we are the only FS erroring out on O_DIRECT 2. other file-systems not supporting direct IO just fake it There are lots of file systems not supporting O_DIRECT,

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 13:49 -0700, Brian Norris wrote: Pardon the innocent bystander's comment, but: On Thu, Aug 20, 2015 at 01:40:02PM +0200, Richard Weinberger wrote: Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: On

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dongsheng Yang
On 08/24/2015 03:17 PM, Dongsheng Yang wrote: On 08/24/2015 03:18 PM, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 15:34 +0300, Artem Bityutskiy wrote: On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the common practice here, and follow it. This

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Richard Weinberger
Am 24.08.2015 um 11:34 schrieb Artem Bityutskiy: On Mon, 2015-08-24 at 01:03 -0700, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: Back when we were writing UBIFS, we did not need direct IO, so we did not implement it. But yes, probably someone who

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Artem Bityutskiy
On Mon, 2015-08-24 at 01:03 -0700, Christoph Hellwig wrote: On Mon, Aug 24, 2015 at 11:02:42AM +0300, Artem Bityutskiy wrote: Back when we were writing UBIFS, we did not need direct IO, so we did not implement it. But yes, probably someone who cares could just try implementing this

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Dave Chinner
On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: Brian Norris computersforpe...@gmail.com writes: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now, some user-space fails when direct I/O is not supported. I think the whole argument rested on what it means

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-24 Thread Chris Mason
On Tue, Aug 25, 2015 at 09:46:11AM +1000, Dave Chinner wrote: On Mon, Aug 24, 2015 at 01:19:24PM -0400, Jeff Moyer wrote: Brian Norris computersforpe...@gmail.com writes: On Mon, Aug 24, 2015 at 10:13:25AM +0300, Artem Bityutskiy wrote: Now, some user-space fails when direct I/O is not

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Brian Norris
Pardon the innocent bystander's comment, but: On Thu, Aug 20, 2015 at 01:40:02PM +0200, Richard Weinberger wrote: > Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: > > On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: > >> On 08/20/2015 04:35 AM, Richard Weinberger wrote: > >>> Currently

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: > > Basically, we need to see what is the "common practice" here, and > > follow it. This requires a small research. What would be the most > > popular Linux FS which does not support direct I/O? Can we check > > what > > it does? > >

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Richard Weinberger
Artem, Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: > On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: >> On 08/20/2015 04:35 AM, Richard Weinberger wrote: >>> Currently UBIFS does not support direct IO, but some applications >>> blindly use the O_DIRECT flag. >>> Instead of failing

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: > On 08/20/2015 04:35 AM, Richard Weinberger wrote: > > Currently UBIFS does not support direct IO, but some applications > > blindly use the O_DIRECT flag. > > Instead of failing upon open() we can do better and fall back > > to buffered

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Wed, 2015-08-19 at 22:35 +0200, Richard Weinberger wrote: > Currently UBIFS does not support direct IO, but some applications > blindly use the O_DIRECT flag. > Instead of failing upon open() we can do better and fall back > to buffered IO. > > Cc: Dongsheng Yang > Cc: dedeki...@gmail.com >

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Dongsheng Yang
On 08/20/2015 02:42 PM, Richard Weinberger wrote: Yang, (Sorry if I've used your last name lately) Haha, that's fine. My friends in China all call me Dongsheng. :) Am 20.08.2015 um 05:00 schrieb Dongsheng Yang: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Richard Weinberger
Yang, (Sorry if I've used your last name lately) Am 20.08.2015 um 05:00 schrieb Dongsheng Yang: > On 08/20/2015 04:35 AM, Richard Weinberger wrote: >> Currently UBIFS does not support direct IO, but some applications >> blindly use the O_DIRECT flag. >> Instead of failing upon open() we can do

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Dongsheng Yang
On 08/20/2015 02:42 PM, Richard Weinberger wrote: Yang, (Sorry if I've used your last name lately) Haha, that's fine. My friends in China all call me Dongsheng. :) Am 20.08.2015 um 05:00 schrieb Dongsheng Yang: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Richard Weinberger
Yang, (Sorry if I've used your last name lately) Am 20.08.2015 um 05:00 schrieb Dongsheng Yang: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO.

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Richard Weinberger
Artem, Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open()

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Wed, 2015-08-19 at 22:35 +0200, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO. Cc: Dongsheng Yang yangds.f...@cn.fujitsu.com Cc:

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Artem Bityutskiy
On Thu, 2015-08-20 at 13:40 +0200, Richard Weinberger wrote: Basically, we need to see what is the common practice here, and follow it. This requires a small research. What would be the most popular Linux FS which does not support direct I/O? Can we check what it does? All popular

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-20 Thread Brian Norris
Pardon the innocent bystander's comment, but: On Thu, Aug 20, 2015 at 01:40:02PM +0200, Richard Weinberger wrote: Am 20.08.2015 um 13:31 schrieb Artem Bityutskiy: On Thu, 2015-08-20 at 11:00 +0800, Dongsheng Yang wrote: On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-19 Thread Dongsheng Yang
On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO. H, to be honest, I am not sure we have to do it as Dave

[PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-19 Thread Richard Weinberger
Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO. Cc: Dongsheng Yang Cc: dedeki...@gmail.com Suggested-by: Dave Chinner Signed-off-by: Richard Weinberger ---

[PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-19 Thread Richard Weinberger
Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO. Cc: Dongsheng Yang yangds.f...@cn.fujitsu.com Cc: dedeki...@gmail.com Suggested-by: Dave Chinner da...@fromorbit.com

Re: [PATCH 2/2] ubifs: Allow O_DIRECT

2015-08-19 Thread Dongsheng Yang
On 08/20/2015 04:35 AM, Richard Weinberger wrote: Currently UBIFS does not support direct IO, but some applications blindly use the O_DIRECT flag. Instead of failing upon open() we can do better and fall back to buffered IO. H, to be honest, I am not sure we have to do it as Dave