Hello, On Fri 18-01-13 17:10:07, Josef Bacik wrote: > I'd like to talk about what to do about O_DIRECT. Nobody really owns it > and nobody really _wants_ to own it, and we've all been tacking on our > own file systems optimizations and work arounds to make the generic stuff > work. I'm to the point now where I'm just going to do all the work > ourselves inside of btrfs since we need to have different waiting rules. > So the question is do we want to just rm -f fs/direct-io.c and let > everybody do their own thing, I don't think we really can. Just grep for its uses. There are like 15 filesystems using it. That would be a huge amount of duplication. > or is there some way we can tease out the > actual generic stuff that everybody is going to need to do and adapt > everybody to use that? And then theres the question of what are the > things we want to do in the generic code, do we want to just do the get > pages thing, do we want to still have stuff to build and submit the bios? > What about how AIO interacts with it? I'm not sure what issues you are exactly facing but I can understand blockdev_direct_IO() isn't doing what btrfs would need. And I also agree with others that the code is rather complex and hard to maintain. E.g. the get_block_t insanity of using buffer_head is nagging me for a long time. The handling of unaligned DIO which all filesystems just serialize (at least for writes) because it causes data corruption. But these are mostly smaller gradual improvements. IMHO the devil is in "show me the code that is flexible enough to work for most, fast, and simpler than what we have". So I think we can speak about what btrfs (or xfs or whoever else) would need and how we could change (or whether it's worth to change) the generic code to accommodate its needs. Hum? Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html