On 06/20/2017 06:56 AM, Christoph Hellwig wrote: > On Tue, Jun 20, 2017 at 06:51:34AM -0600, Jens Axboe wrote: >> That sounds fragile... Is it really worth it to avoid stealing three >> bits in the inode? Do we have buffer_heads attached everywhere, that >> sounds surprising to me. > > I'm not concerned about saving a few bits - we'll use those elsewhere > anyway. I'm concerned about settings on one file descriptor having > an effect on other fds that doesn't look intended. It's not the > end of the world, as multiple writers to the same file should > better be aware of each other, but the semantics of setting these > on a per-inode level still stink. For O_DIRECT writes, the file level hints work perfectly fine. For buffered writes, we need some way to defer retrieving this hint to when the flush happens. Seems very sad and dated to rely on storing these in buffer_heads, which we've been trying to kill for more than a decade. The per inode hint isn't perfect for multiple buffered writers in a single file. While I think it'd be great to have something bullet proof there, I also don't think it's a troublesome use cases for streams. -- Jens Axboe