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 d

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 di

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-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 s

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 can

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 s

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

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 ub

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 th

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 in

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_DIR

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 impl

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. Thi

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 does

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-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 U

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? > > A

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 up

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 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 > Su

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 suppo

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

2015-08-19 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 bet

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 suggested.

[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 --- fs/ubifs/fi