From mboxrd@z Thu Jan 1 00:00:00 1970 From: "hch@infradead.org" Subject: Re: [PATCH 01/19] mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags Date: Tue, 17 Oct 2017 23:59:38 -0700 Message-ID: <20171018065938.GA15310@infradead.org> References: <20171011200603.27442-1-jack@suse.cz> <20171011200603.27442-2-jack@suse.cz> <20171013071203.GA9105@infradead.org> <1507996677.21357.1.camel@intel.com> <20171016074504.GA7316@infradead.org> <20171017115047.GD24136@quack2.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "hch@infradead.org" , "Williams, Dan J" , "linux-xfs@vger.kernel.org" , "darrick.wong@oracle.com" , "akpm@linux-foundation.org" , "luto@kernel.org" , "linux-fsdevel@vger.kernel.org" , "ross.zwisler@linux.intel.com" , "linux-ext4@vger.kernel.org" , "tytso@mit.edu" , "arnd@arndb.de" To: Jan Kara Return-path: Content-Disposition: inline In-Reply-To: <20171017115047.GD24136@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org On Tue, Oct 17, 2017 at 01:50:47PM +0200, Jan Kara wrote: > OK, I can do that. But I had just realized that if MAP_DIRECT isn't going > to end up using mmap(2) interface but something else (and I'm not sure > where discussions on this matter ended), we don't need flags argument for > ->mmap at all. MAP_SYNC uses a VMA flag anyway and thus it is fine with the > current ->mmap interface. We still need some opt-in mechanism for > MAP_SHARED_VALIDATE though (probably supported mmap flags as Dan had in one > version of his patch). Thoughts on which way to go for now? Yes, I'd much prefer the mmap_flags in file_operations. The other option would be a new FMODE_* flag which is what Al did for various other optional features, but I generally thing that is a confusing interface.