[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <873b5g2zq9.fsf@duaron.myhome.or.jp>
Date: Fri, 09 Feb 2007 04:53:02 +0900
From: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To: Jan Kara <jack@...e.cz>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Direct IO for fat
Jan Kara <jack@...e.cz> 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) {
>> > if (dio->block_in_file < (i_size_read(dio->inode) >>
>> > dio->blkbits))
>> > create = 0;
>> But here create was reset back to 0 - exactly because
>> dio->block_in_file > i_size...
> Obviously, I'm blind and you're right ;) This test is not satisfied
> and so create == 1.
> But still it would seem better to me to return 0 from fat_direct_IO()
> instead of EINVAL so that write falls back to a buffered one, instead
> returning the error...
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.
But I don't have strong opinion here. If anyone (you) has any request
of it, I'll not have objection to it.
--
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists