Re: Direct IO for fat

2007-02-09 Thread OGAWA Hirofumi
Jan Kara <[EMAIL PROTECTED]> writes: >> I see. When I wrote this, I thought kernel should use DIO to write if >> user sets O_DIRECT. Because the wrong alignment request isn't fallback >> to buffered-write, and it's also returns EINVAL. > I understand. It's just that I've got some surprised users

Re: Direct IO for fat

2007-02-08 Thread Jan Kara
On Fri 09-02-07 04:53:02, OGAWA Hirofumi wrote: > Jan Kara <[EMAIL PROTECTED]> writes: > > >> > -> blockdev_direct_IO() > >> > -> direct_io_worker() > >> > -> do_direct_IO() > >> > -> get_more_blocks() > >> > > >> > create = dio->rw & WRITE; > >> Here, create == 1. > >> >

Re: Direct IO for fat

2007-02-08 Thread OGAWA Hirofumi
Jan Kara <[EMAIL PROTECTED]> writes: >> > -> blockdev_direct_IO() >> > -> direct_io_worker() >> > -> do_direct_IO() >> > -> get_more_blocks() >> > >> >create = dio->rw & WRITE; >> Here, create == 1. >> >> >if (dio->lock_type == DIO_LOCKING) { >> >

Re: Direct IO for fat

2007-02-08 Thread Jan Kara
> On Fri 09-02-07 01:40:31, OGAWA Hirofumi wrote: > > Jan Kara <[EMAIL PROTECTED]> writes: > > > > >> FAT has to fill the hole completely, but DIO doesn't seems to do. > > >> > > >> e.g. > > >> fd = open("file", O_WRONLY | O_CREAT | O_TRUNC); > > >> write(fd, buf, 512); > > >>

Re: Direct IO for fat

2007-02-08 Thread Jan Kara
On Fri 09-02-07 01:40:31, OGAWA Hirofumi wrote: > Jan Kara <[EMAIL PROTECTED]> writes: > > >> FAT has to fill the hole completely, but DIO doesn't seems to do. > >> > >> e.g. > >> fd = open("file", O_WRONLY | O_CREAT | O_TRUNC); > >> write(fd, buf, 512); > >> lseek(fd, 100

Re: Direct IO for fat

2007-02-08 Thread OGAWA Hirofumi
Jan Kara <[EMAIL PROTECTED]> writes: >> FAT has to fill the hole completely, but DIO doesn't seems to do. >> >> e.g. >> fd = open("file", O_WRONLY | O_CREAT | O_TRUNC); >> write(fd, buf, 512); >> lseek(fd, 1, SEEK_SET); >> write(fd, buf, 512); >> >> We need to

Re: Direct IO for fat

2007-02-08 Thread Jan Kara
On Fri 09-02-07 00:44:06, OGAWA Hirofumi wrote: > Jan Kara <[EMAIL PROTECTED]> writes: Hello, > > I've noticed that extending a file using direct IO fails for FAT with > > EINVAL. It's basically because of the following code in fat_direct_IO(): > > > > if (rw == WRITE) { > > /* > >

Re: Direct IO for fat

2007-02-08 Thread OGAWA Hirofumi
Jan Kara <[EMAIL PROTECTED]> writes: > Hello, Hello, > I've noticed that extending a file using direct IO fails for FAT with > EINVAL. It's basically because of the following code in fat_direct_IO(): > > if (rw == WRITE) { > /* > * FIXME: blockdev_direct_IO() doesn't use >

Direct IO for fat

2007-02-08 Thread Jan Kara
Hello, I've noticed that extending a file using direct IO fails for FAT with EINVAL. It's basically because of the following code in fat_direct_IO(): if (rw == WRITE) { /* * FIXME: blockdev_direct_IO() doesn't use * ->prepare_write(), * so we need to update