Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1739544
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() |
| Date | 2017-09-26 08:40 +0200 |
| Message-ID | <utRHc-10R-23@gated-at.bofh.it> (permalink) |
| References | <utKPp-4Lc-5@gated-at.bofh.it> <utKPp-4Lc-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Sep 25, 2017 at 05:14:03PM -0600, Ross Zwisler wrote: > When mappings are created the vma->vm_flags that they use vary based on > whether the inode being mapped is using DAX or not. This setup happens in > XFS via mmap_region()=>call_mmap()=>xfs_file_mmap(). > > For us to be able to safely use the DAX per-inode flag we need to prevent > S_DAX transitions when any mappings are present, and we will do that by > looking at the address_space->i_mmap tree and returning -EBUSY if any > mappings are present. > > Unfortunately at the time that the filesystem's file_operations->mmap() > entry point is called the mapping has not yet been added to the > address_space->i_mmap tree. This means that at that point in time we > cannot determine whether or not the mapping will be set up to support DAX. > > Fix this by adding a new file_operations entry called post_mmap() which is > called after the mapping has been added to the address_space->i_mmap tree. > This post_mmap() op now happens at a time when we can be sure whether the > mapping will use DAX or not, and we can set up the vma->vm_flags > appropriately. Just like in the read/write path we'll need a flag that is passed down from the VM based on checking IS_DAX once and exactly once instead.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-09-26 01:20 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-26 01:40 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-09-26 21:00 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-26 21:30 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-09-26 23:10 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-26 23:50 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Jan Kara <jack@suse.cz> - 2017-09-27 13:40 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-27 16:10 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Jan Kara <jack@suse.cz> - 2017-09-27 17:10 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-27 17:40 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Ross Zwisler <ross.zwisler@linux.intel.com> - 2017-09-27 17:40 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Dan Williams <dan.j.williams@intel.com> - 2017-09-27 18:00 +0200
Re: [PATCH 6/7] mm, fs: introduce file_operations->post_mmap() Christoph Hellwig <hch@lst.de> - 2017-09-26 08:40 +0200
csiph-web