Re: Direct IO for fat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) {
>> > 			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 <[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux