Re: [PATCH] fs: iomap: Change return type to vm_fault_t

From: Matthew Wilcox
Date: Fri Jul 20 2018 - 15:37:14 EST


On Fri, Jul 20, 2018 at 12:25:26PM +0530, Souptick Joarder wrote:
> At this point we are almost done with vm_fault_t migration in all drivers/fs
> except 3 patches and all the changes will be available in 4.19-rc1.

I think there's a little more than that left to do. I'm looking at
linux-next 20180720.

Documentation/filesystems/Locking: int (*fault)(struct vm_area_struct*, struct vm_fault *);
arch/s390/kernel/vdso.c-static int vdso_fault(const struct vm_special_mapping *sm,
arch/s390/kernel/vdso.c: struct vm_area_struct *vma, struct vm_fault *vmf)
arch/x86/entry/vdso/vma.c-static int vdso_fault(const struct vm_special_mapping *sm,
arch/x86/entry/vdso/vma.c: struct vm_area_struct *vma, struct vm_fault *vmf)
drivers/dax/device.c:static int __dev_dax_pte_fault(struct dev_dax *dev_dax, struct vm_fault *vmf)
drivers/gpu/drm/armada/armada_gem.c:static int armada_gem_vm_fault(struct vm_fault *vmf)
drivers/gpu/drm/etnaviv/etnaviv_gem.c:int etnaviv_gem_fault(struct vm_fault *vmf)
drivers/gpu/drm/msm/msm_gem.c:int msm_gem_fault(struct vm_fault *vmf)
drivers/gpu/drm/virtio/virtgpu_ttm.c:static int virtio_gpu_ttm_fault(struct vm_fault *vmf)
drivers/gpu/drm/vkms/vkms_gem.c:int vkms_gem_fault(struct vm_fault *vmf)
fs/buffer.c:int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
fs/ceph/addr.c:static int ceph_filemap_fault(struct vm_fault *vmf)
fs/ext4/inode.c:int ext4_page_mkwrite(struct vm_fault *vmf)
fs/iomap.c:int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
fs/userfaultfd.c:int handle_userfault(struct vm_fault *vmf, unsigned long reason)
mm/filemap.c:int filemap_page_mkwrite(struct vm_fault *vmf)
mm/huge_memory.c:static int __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page,
mm/memory.c:static int do_page_mkwrite(struct vm_fault *vmf)

That's about 18 files left to handle. I know some of these are still
in flight, but others I don't think I've seen patches for.

To get to the end-goal of eliminating vm_insert_* (leaving only
vmf_insert_*), there are some other tricky customers to satisfy.

remap_vmalloc_range_partial() is one; fortunately neither of the two
callers care about the errno; they choose their own errno to return if
an error happens, so we can change that one too.

I don't have time to go through the rest now ;-)