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/