[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YcGUWxqQts79Kv6B@infradead.org>
Date: Tue, 21 Dec 2021 00:46:19 -0800
From: Christoph Hellwig <hch@...radead.org>
To: NeilBrown <neilb@...e.de>
Cc: Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Chuck Lever <chuck.lever@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>,
Christoph Hellwig <hch@...radead.org>,
David Howells <dhowells@...hat.com>, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 08/18] MM: Add AS_CAN_DIO mapping flag
On Fri, Dec 17, 2021 at 10:48:23AM +1100, NeilBrown wrote:
> Currently various places test if direct IO is possible on a file by
> checking for the existence of the direct_IO address space operation.
> This is a poor choice, as the direct_IO operation may not be used - it is
> only used if the generic_file_*_iter functions are called for direct IO
> and some filesystems - particularly NFS - don't do this.
>
> Instead, introduce a new mapping flag: AS_CAN_DIO and change the various
> places to check this (avoiding a pointer dereference).
> unlock_new_inode() will set this flag if ->direct_IO is present, so
> filesystems do not need to be changed.
>
> NFS *is* changed, to set the flag explicitly and discard the direct_IO
> entry in the address_space_operations for files.
For other can flags related to file operations we usuall stash them into
file->f_mode. Any reason to treat this different?
Powered by blists - more mailing lists