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

2018-08-27 Thread Souptick Joarder
Return type has been changed to vm_fault_t type for
iomap_page_mkwrite().

see commit 1c8f422059ae ("mm: change return type to
vm_fault_t") for reference.

Signed-off-by: Souptick Joarder 
Reviewed-by: Matthew Wilcox 
---
 fs/iomap.c| 2 +-
 include/linux/iomap.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index afd1635..58477ee 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
unsigned bytes,
return length;
 }
 
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
*ops)
 {
struct page *page = vmf->page;
struct inode *inode = file_inode(vmf->vma->vm_file);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 19a07de..666b717 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -3,6 +3,7 @@
 #define LINUX_IOMAP_H 1
 
 #include 
+#include 
 
 struct fiemap_extent_info;
 struct inode;
@@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, loff_t 
len,
bool *did_zero, const struct iomap_ops *ops);
 int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
const struct iomap_ops *ops);
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
+   const struct iomap_ops *ops);
 int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
loff_t start, loff_t len, const struct iomap_ops *ops);
 loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
-- 
1.9.1



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

2018-08-27 Thread Souptick Joarder
Return type has been changed to vm_fault_t type for
iomap_page_mkwrite().

see commit 1c8f422059ae ("mm: change return type to
vm_fault_t") for reference.

Signed-off-by: Souptick Joarder 
Reviewed-by: Matthew Wilcox 
---
 fs/iomap.c| 2 +-
 include/linux/iomap.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index afd1635..58477ee 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
unsigned bytes,
return length;
 }
 
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
*ops)
 {
struct page *page = vmf->page;
struct inode *inode = file_inode(vmf->vma->vm_file);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 19a07de..666b717 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -3,6 +3,7 @@
 #define LINUX_IOMAP_H 1
 
 #include 
+#include 
 
 struct fiemap_extent_info;
 struct inode;
@@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, loff_t 
len,
bool *did_zero, const struct iomap_ops *ops);
 int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
const struct iomap_ops *ops);
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
+   const struct iomap_ops *ops);
 int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
loff_t start, loff_t len, const struct iomap_ops *ops);
 loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
-- 
1.9.1



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

2018-07-20 Thread Matthew Wilcox
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 ;-)


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

2018-07-20 Thread Matthew Wilcox
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 ;-)


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

2018-07-20 Thread Souptick Joarder
On Fri, Jul 20, 2018 at 11:39 AM, Darrick J. Wong
 wrote:
> On Fri, Jul 20, 2018 at 10:31:30AM +0530, Souptick Joarder wrote:
>> On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  
>> wrote:
>> > On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
>> >> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>> >>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>> >>> > Return type has been changed to vm_fault_t type for
>> >>> > iomap_page_mkwrite().
>> >>> >
>> >>> > see commit 1c8f422059ae ("mm: change return type to
>> >>> > vm_fault_t") for reference.
>> >>> >
>> >>> > Signed-off-by: Souptick Joarder 
>> >>> > Reviewed-by: Matthew Wilcox 
>> >>
>> >> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
>> >> version of this patch[1].  Has he changed his mind since May?
>> >  /|\
>> > Oops, a reply gone wrong -- I was me  |   to reply to Souptick
>> > Joarder's gfs2 change which I've add  |   the gfs2 for-next branch.
>> > Not the iomap change. Sorry for the   |  sion.
>> >   |
>> >> [1] https://spinics.net/lists/linux  |  vel/msg126032.html
>> >>  |
>> >> Now granted I didn't have a problem  |   the code (and applied the xfs
>> >> version to 4.18 after monitoring to  |  sfy myself that nothing
>> >> particularly weird happened during   |   but seeing as most of the iomap
>> >> changes have gone through hch's rev  |  nd landed via the xfs tree...
>   |
> --D   |
>   |
> I wasn't planning on it, due to aforementioned NAK still being in place
> to the best of my knowledge, at least for the iomap patch.
>
>> Darrick, is this patch going to 4.19 through xfs tree ?

Well,  the original patch was NAK by Christoph because he wanted
to see the complete vm_fault_t migration picture in a patch series
where Matthew mentioned to send one patch per driver through
different maintainers tree to upstream the changes. This discussion
went on into two separate mail threads.

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. We followed
one patch per driver mechanism and I believe we not are going to adopt other
mechanism (patch series) to upstream these vm_fault_t patches.

This particular patch is struggling for more than 3 months now.

Christoph, would you still like to maintain NAK on this patch ? :-)


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

2018-07-20 Thread Souptick Joarder
On Fri, Jul 20, 2018 at 11:39 AM, Darrick J. Wong
 wrote:
> On Fri, Jul 20, 2018 at 10:31:30AM +0530, Souptick Joarder wrote:
>> On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  
>> wrote:
>> > On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
>> >> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>> >>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>> >>> > Return type has been changed to vm_fault_t type for
>> >>> > iomap_page_mkwrite().
>> >>> >
>> >>> > see commit 1c8f422059ae ("mm: change return type to
>> >>> > vm_fault_t") for reference.
>> >>> >
>> >>> > Signed-off-by: Souptick Joarder 
>> >>> > Reviewed-by: Matthew Wilcox 
>> >>
>> >> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
>> >> version of this patch[1].  Has he changed his mind since May?
>> >  /|\
>> > Oops, a reply gone wrong -- I was me  |   to reply to Souptick
>> > Joarder's gfs2 change which I've add  |   the gfs2 for-next branch.
>> > Not the iomap change. Sorry for the   |  sion.
>> >   |
>> >> [1] https://spinics.net/lists/linux  |  vel/msg126032.html
>> >>  |
>> >> Now granted I didn't have a problem  |   the code (and applied the xfs
>> >> version to 4.18 after monitoring to  |  sfy myself that nothing
>> >> particularly weird happened during   |   but seeing as most of the iomap
>> >> changes have gone through hch's rev  |  nd landed via the xfs tree...
>   |
> --D   |
>   |
> I wasn't planning on it, due to aforementioned NAK still being in place
> to the best of my knowledge, at least for the iomap patch.
>
>> Darrick, is this patch going to 4.19 through xfs tree ?

Well,  the original patch was NAK by Christoph because he wanted
to see the complete vm_fault_t migration picture in a patch series
where Matthew mentioned to send one patch per driver through
different maintainers tree to upstream the changes. This discussion
went on into two separate mail threads.

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. We followed
one patch per driver mechanism and I believe we not are going to adopt other
mechanism (patch series) to upstream these vm_fault_t patches.

This particular patch is struggling for more than 3 months now.

Christoph, would you still like to maintain NAK on this patch ? :-)


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

2018-07-20 Thread Darrick J. Wong
On Fri, Jul 20, 2018 at 10:31:30AM +0530, Souptick Joarder wrote:
> On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  
> wrote:
> > On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
> >> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
> >>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> >>> > Return type has been changed to vm_fault_t type for
> >>> > iomap_page_mkwrite().
> >>> >
> >>> > see commit 1c8f422059ae ("mm: change return type to
> >>> > vm_fault_t") for reference.
> >>> >
> >>> > Signed-off-by: Souptick Joarder 
> >>> > Reviewed-by: Matthew Wilcox 
> >>
> >> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
> >> version of this patch[1].  Has he changed his mind since May?
> >  /|\
> > Oops, a reply gone wrong -- I was me  |   to reply to Souptick
> > Joarder's gfs2 change which I've add  |   the gfs2 for-next branch.
> > Not the iomap change. Sorry for the   |  sion.
> >   |
> >> [1] https://spinics.net/lists/linux  |  vel/msg126032.html
> >>  |
> >> Now granted I didn't have a problem  |   the code (and applied the xfs
> >> version to 4.18 after monitoring to  |  sfy myself that nothing
> >> particularly weird happened during   |   but seeing as most of the iomap
> >> changes have gone through hch's rev  |  nd landed via the xfs tree...
  |
--D   |
  |
I wasn't planning on it, due to aforementioned NAK still being in place
to the best of my knowledge, at least for the iomap patch.

> Darrick, is this patch going to 4.19 through xfs tree ?


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

2018-07-20 Thread Darrick J. Wong
On Fri, Jul 20, 2018 at 10:31:30AM +0530, Souptick Joarder wrote:
> On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  
> wrote:
> > On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
> >> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
> >>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> >>> > Return type has been changed to vm_fault_t type for
> >>> > iomap_page_mkwrite().
> >>> >
> >>> > see commit 1c8f422059ae ("mm: change return type to
> >>> > vm_fault_t") for reference.
> >>> >
> >>> > Signed-off-by: Souptick Joarder 
> >>> > Reviewed-by: Matthew Wilcox 
> >>
> >> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
> >> version of this patch[1].  Has he changed his mind since May?
> >  /|\
> > Oops, a reply gone wrong -- I was me  |   to reply to Souptick
> > Joarder's gfs2 change which I've add  |   the gfs2 for-next branch.
> > Not the iomap change. Sorry for the   |  sion.
> >   |
> >> [1] https://spinics.net/lists/linux  |  vel/msg126032.html
> >>  |
> >> Now granted I didn't have a problem  |   the code (and applied the xfs
> >> version to 4.18 after monitoring to  |  sfy myself that nothing
> >> particularly weird happened during   |   but seeing as most of the iomap
> >> changes have gone through hch's rev  |  nd landed via the xfs tree...
  |
--D   |
  |
I wasn't planning on it, due to aforementioned NAK still being in place
to the best of my knowledge, at least for the iomap patch.

> Darrick, is this patch going to 4.19 through xfs tree ?


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

2018-07-19 Thread Souptick Joarder
On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  wrote:
> On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
>> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>>> > Return type has been changed to vm_fault_t type for
>>> > iomap_page_mkwrite().
>>> >
>>> > see commit 1c8f422059ae ("mm: change return type to
>>> > vm_fault_t") for reference.
>>> >
>>> > Signed-off-by: Souptick Joarder 
>>> > Reviewed-by: Matthew Wilcox 
>>
>> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
>> version of this patch[1].  Has he changed his mind since May?
>
> Oops, a reply gone wrong -- I was meaning to reply to Souptick
> Joarder's gfs2 change which I've added to the gfs2 for-next branch.
> Not the iomap change. Sorry for the confusion.
>
>> [1] https://spinics.net/lists/linux-fsdevel/msg126032.html
>>
>> Now granted I didn't have a problem with the code (and applied the xfs
>> version to 4.18 after monitoring to satisfy myself that nothing
>> particularly weird happened during 4.17) but seeing as most of the iomap
>> changes have gone through hch's review and landed via the xfs tree...

Darrick, is this patch going to 4.19 through xfs tree ?


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

2018-07-19 Thread Souptick Joarder
On Wed, Jul 4, 2018 at 3:22 AM, Andreas Gruenbacher  wrote:
> On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
>> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>>> > Return type has been changed to vm_fault_t type for
>>> > iomap_page_mkwrite().
>>> >
>>> > see commit 1c8f422059ae ("mm: change return type to
>>> > vm_fault_t") for reference.
>>> >
>>> > Signed-off-by: Souptick Joarder 
>>> > Reviewed-by: Matthew Wilcox 
>>
>> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
>> version of this patch[1].  Has he changed his mind since May?
>
> Oops, a reply gone wrong -- I was meaning to reply to Souptick
> Joarder's gfs2 change which I've added to the gfs2 for-next branch.
> Not the iomap change. Sorry for the confusion.
>
>> [1] https://spinics.net/lists/linux-fsdevel/msg126032.html
>>
>> Now granted I didn't have a problem with the code (and applied the xfs
>> version to 4.18 after monitoring to satisfy myself that nothing
>> particularly weird happened during 4.17) but seeing as most of the iomap
>> changes have gone through hch's review and landed via the xfs tree...

Darrick, is this patch going to 4.19 through xfs tree ?


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

2018-07-03 Thread Andreas Gruenbacher
On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>> > Return type has been changed to vm_fault_t type for
>> > iomap_page_mkwrite().
>> >
>> > see commit 1c8f422059ae ("mm: change return type to
>> > vm_fault_t") for reference.
>> >
>> > Signed-off-by: Souptick Joarder 
>> > Reviewed-by: Matthew Wilcox 
>
> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
> version of this patch[1].  Has he changed his mind since May?

Oops, a reply gone wrong -- I was meaning to reply to Souptick
Joarder's gfs2 change which I've added to the gfs2 for-next branch.
Not the iomap change. Sorry for the confusion.

> [1] https://spinics.net/lists/linux-fsdevel/msg126032.html
>
> Now granted I didn't have a problem with the code (and applied the xfs
> version to 4.18 after monitoring to satisfy myself that nothing
> particularly weird happened during 4.17) but seeing as most of the iomap
> changes have gone through hch's review and landed via the xfs tree...
>
>> > ---
>> >  fs/iomap.c| 2 +-
>> >  include/linux/iomap.h | 4 +++-
>> >  2 files changed, 4 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/fs/iomap.c b/fs/iomap.c
>> > index afd1635..58477ee 100644
>> > --- a/fs/iomap.c
>> > +++ b/fs/iomap.c
>> > @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
>> > unsigned bytes,
>> > return length;
>> >  }
>> >
>> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
>> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct 
>> > iomap_ops *ops)
>> >  {
>> > struct page *page = vmf->page;
>> > struct inode *inode = file_inode(vmf->vma->vm_file);
>> > diff --git a/include/linux/iomap.h b/include/linux/iomap.h
>> > index 19a07de..666b717 100644
>> > --- a/include/linux/iomap.h
>> > +++ b/include/linux/iomap.h
>> > @@ -3,6 +3,7 @@
>> >  #define LINUX_IOMAP_H 1
>> >
>> >  #include 
>> > +#include 
>> >
>> >  struct fiemap_extent_info;
>> >  struct inode;
>> > @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
>> > loff_t len,
>> > bool *did_zero, const struct iomap_ops *ops);
>> >  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
>> > const struct iomap_ops *ops);
>> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
>> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
>> > +   const struct iomap_ops *ops);
>> >  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
>> > loff_t start, loff_t len, const struct iomap_ops *ops);
>> >  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
>> > --
>> > 1.9.1
>> >
>>
>> Added to for-next, thanks.
>
> ...this part caused me to sit up and say "Hey what?" :)
>
> Which tree is this? gfs2?
>
> --D
>
>>
>> Andreas


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

2018-07-03 Thread Andreas Gruenbacher
On 3 July 2018 at 23:39, Darrick J. Wong  wrote:
> On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
>> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
>> > Return type has been changed to vm_fault_t type for
>> > iomap_page_mkwrite().
>> >
>> > see commit 1c8f422059ae ("mm: change return type to
>> > vm_fault_t") for reference.
>> >
>> > Signed-off-by: Souptick Joarder 
>> > Reviewed-by: Matthew Wilcox 
>
> I don't recall Christoph [now cc'd] rescinding his NAK of the previous
> version of this patch[1].  Has he changed his mind since May?

Oops, a reply gone wrong -- I was meaning to reply to Souptick
Joarder's gfs2 change which I've added to the gfs2 for-next branch.
Not the iomap change. Sorry for the confusion.

> [1] https://spinics.net/lists/linux-fsdevel/msg126032.html
>
> Now granted I didn't have a problem with the code (and applied the xfs
> version to 4.18 after monitoring to satisfy myself that nothing
> particularly weird happened during 4.17) but seeing as most of the iomap
> changes have gone through hch's review and landed via the xfs tree...
>
>> > ---
>> >  fs/iomap.c| 2 +-
>> >  include/linux/iomap.h | 4 +++-
>> >  2 files changed, 4 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/fs/iomap.c b/fs/iomap.c
>> > index afd1635..58477ee 100644
>> > --- a/fs/iomap.c
>> > +++ b/fs/iomap.c
>> > @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
>> > unsigned bytes,
>> > return length;
>> >  }
>> >
>> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
>> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct 
>> > iomap_ops *ops)
>> >  {
>> > struct page *page = vmf->page;
>> > struct inode *inode = file_inode(vmf->vma->vm_file);
>> > diff --git a/include/linux/iomap.h b/include/linux/iomap.h
>> > index 19a07de..666b717 100644
>> > --- a/include/linux/iomap.h
>> > +++ b/include/linux/iomap.h
>> > @@ -3,6 +3,7 @@
>> >  #define LINUX_IOMAP_H 1
>> >
>> >  #include 
>> > +#include 
>> >
>> >  struct fiemap_extent_info;
>> >  struct inode;
>> > @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
>> > loff_t len,
>> > bool *did_zero, const struct iomap_ops *ops);
>> >  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
>> > const struct iomap_ops *ops);
>> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
>> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
>> > +   const struct iomap_ops *ops);
>> >  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
>> > loff_t start, loff_t len, const struct iomap_ops *ops);
>> >  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
>> > --
>> > 1.9.1
>> >
>>
>> Added to for-next, thanks.
>
> ...this part caused me to sit up and say "Hey what?" :)
>
> Which tree is this? gfs2?
>
> --D
>
>>
>> Andreas


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

2018-07-03 Thread Darrick J. Wong
On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> > Return type has been changed to vm_fault_t type for
> > iomap_page_mkwrite().
> >
> > see commit 1c8f422059ae ("mm: change return type to
> > vm_fault_t") for reference.
> >
> > Signed-off-by: Souptick Joarder 
> > Reviewed-by: Matthew Wilcox 

I don't recall Christoph [now cc'd] rescinding his NAK of the previous
version of this patch[1].  Has he changed his mind since May?

[1] https://spinics.net/lists/linux-fsdevel/msg126032.html

Now granted I didn't have a problem with the code (and applied the xfs
version to 4.18 after monitoring to satisfy myself that nothing
particularly weird happened during 4.17) but seeing as most of the iomap
changes have gone through hch's review and landed via the xfs tree...

> > ---
> >  fs/iomap.c| 2 +-
> >  include/linux/iomap.h | 4 +++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/iomap.c b/fs/iomap.c
> > index afd1635..58477ee 100644
> > --- a/fs/iomap.c
> > +++ b/fs/iomap.c
> > @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
> > unsigned bytes,
> > return length;
> >  }
> >
> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
> > *ops)
> >  {
> > struct page *page = vmf->page;
> > struct inode *inode = file_inode(vmf->vma->vm_file);
> > diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> > index 19a07de..666b717 100644
> > --- a/include/linux/iomap.h
> > +++ b/include/linux/iomap.h
> > @@ -3,6 +3,7 @@
> >  #define LINUX_IOMAP_H 1
> >
> >  #include 
> > +#include 
> >
> >  struct fiemap_extent_info;
> >  struct inode;
> > @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
> > loff_t len,
> > bool *did_zero, const struct iomap_ops *ops);
> >  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
> > const struct iomap_ops *ops);
> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
> > +   const struct iomap_ops *ops);
> >  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> > loff_t start, loff_t len, const struct iomap_ops *ops);
> >  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
> > --
> > 1.9.1
> >
> 
> Added to for-next, thanks.

...this part caused me to sit up and say "Hey what?" :)

Which tree is this? gfs2?

--D

> 
> Andreas


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

2018-07-03 Thread Darrick J. Wong
On Mon, Jul 02, 2018 at 07:52:41PM +0200, Andreas Gruenbacher wrote:
> On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> > Return type has been changed to vm_fault_t type for
> > iomap_page_mkwrite().
> >
> > see commit 1c8f422059ae ("mm: change return type to
> > vm_fault_t") for reference.
> >
> > Signed-off-by: Souptick Joarder 
> > Reviewed-by: Matthew Wilcox 

I don't recall Christoph [now cc'd] rescinding his NAK of the previous
version of this patch[1].  Has he changed his mind since May?

[1] https://spinics.net/lists/linux-fsdevel/msg126032.html

Now granted I didn't have a problem with the code (and applied the xfs
version to 4.18 after monitoring to satisfy myself that nothing
particularly weird happened during 4.17) but seeing as most of the iomap
changes have gone through hch's review and landed via the xfs tree...

> > ---
> >  fs/iomap.c| 2 +-
> >  include/linux/iomap.h | 4 +++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/iomap.c b/fs/iomap.c
> > index afd1635..58477ee 100644
> > --- a/fs/iomap.c
> > +++ b/fs/iomap.c
> > @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
> > unsigned bytes,
> > return length;
> >  }
> >
> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
> > *ops)
> >  {
> > struct page *page = vmf->page;
> > struct inode *inode = file_inode(vmf->vma->vm_file);
> > diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> > index 19a07de..666b717 100644
> > --- a/include/linux/iomap.h
> > +++ b/include/linux/iomap.h
> > @@ -3,6 +3,7 @@
> >  #define LINUX_IOMAP_H 1
> >
> >  #include 
> > +#include 
> >
> >  struct fiemap_extent_info;
> >  struct inode;
> > @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
> > loff_t len,
> > bool *did_zero, const struct iomap_ops *ops);
> >  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
> > const struct iomap_ops *ops);
> > -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
> > +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
> > +   const struct iomap_ops *ops);
> >  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> > loff_t start, loff_t len, const struct iomap_ops *ops);
> >  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
> > --
> > 1.9.1
> >
> 
> Added to for-next, thanks.

...this part caused me to sit up and say "Hey what?" :)

Which tree is this? gfs2?

--D

> 
> Andreas


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

2018-07-02 Thread Andreas Gruenbacher
On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> Return type has been changed to vm_fault_t type for
> iomap_page_mkwrite().
>
> see commit 1c8f422059ae ("mm: change return type to
> vm_fault_t") for reference.
>
> Signed-off-by: Souptick Joarder 
> Reviewed-by: Matthew Wilcox 
> ---
>  fs/iomap.c| 2 +-
>  include/linux/iomap.h | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/iomap.c b/fs/iomap.c
> index afd1635..58477ee 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
> unsigned bytes,
> return length;
>  }
>
> -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
> +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
> *ops)
>  {
> struct page *page = vmf->page;
> struct inode *inode = file_inode(vmf->vma->vm_file);
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 19a07de..666b717 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -3,6 +3,7 @@
>  #define LINUX_IOMAP_H 1
>
>  #include 
> +#include 
>
>  struct fiemap_extent_info;
>  struct inode;
> @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
> loff_t len,
> bool *did_zero, const struct iomap_ops *ops);
>  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
> const struct iomap_ops *ops);
> -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
> +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
> +   const struct iomap_ops *ops);
>  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> loff_t start, loff_t len, const struct iomap_ops *ops);
>  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
> --
> 1.9.1
>

Added to for-next, thanks.

Andreas


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

2018-07-02 Thread Andreas Gruenbacher
On 2 July 2018 at 17:43, Souptick Joarder  wrote:
> Return type has been changed to vm_fault_t type for
> iomap_page_mkwrite().
>
> see commit 1c8f422059ae ("mm: change return type to
> vm_fault_t") for reference.
>
> Signed-off-by: Souptick Joarder 
> Reviewed-by: Matthew Wilcox 
> ---
>  fs/iomap.c| 2 +-
>  include/linux/iomap.h | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/fs/iomap.c b/fs/iomap.c
> index afd1635..58477ee 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
> unsigned bytes,
> return length;
>  }
>
> -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
> +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
> *ops)
>  {
> struct page *page = vmf->page;
> struct inode *inode = file_inode(vmf->vma->vm_file);
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 19a07de..666b717 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -3,6 +3,7 @@
>  #define LINUX_IOMAP_H 1
>
>  #include 
> +#include 
>
>  struct fiemap_extent_info;
>  struct inode;
> @@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, 
> loff_t len,
> bool *did_zero, const struct iomap_ops *ops);
>  int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
> const struct iomap_ops *ops);
> -int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
> +vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
> +   const struct iomap_ops *ops);
>  int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> loff_t start, loff_t len, const struct iomap_ops *ops);
>  loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
> --
> 1.9.1
>

Added to for-next, thanks.

Andreas


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

2018-07-02 Thread Souptick Joarder
Return type has been changed to vm_fault_t type for
iomap_page_mkwrite().

see commit 1c8f422059ae ("mm: change return type to
vm_fault_t") for reference.

Signed-off-by: Souptick Joarder 
Reviewed-by: Matthew Wilcox 
---
 fs/iomap.c| 2 +-
 include/linux/iomap.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index afd1635..58477ee 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
unsigned bytes,
return length;
 }
 
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
*ops)
 {
struct page *page = vmf->page;
struct inode *inode = file_inode(vmf->vma->vm_file);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 19a07de..666b717 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -3,6 +3,7 @@
 #define LINUX_IOMAP_H 1
 
 #include 
+#include 
 
 struct fiemap_extent_info;
 struct inode;
@@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, loff_t 
len,
bool *did_zero, const struct iomap_ops *ops);
 int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
const struct iomap_ops *ops);
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
+   const struct iomap_ops *ops);
 int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
loff_t start, loff_t len, const struct iomap_ops *ops);
 loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
-- 
1.9.1



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

2018-07-02 Thread Souptick Joarder
Return type has been changed to vm_fault_t type for
iomap_page_mkwrite().

see commit 1c8f422059ae ("mm: change return type to
vm_fault_t") for reference.

Signed-off-by: Souptick Joarder 
Reviewed-by: Matthew Wilcox 
---
 fs/iomap.c| 2 +-
 include/linux/iomap.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/iomap.c b/fs/iomap.c
index afd1635..58477ee 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -443,7 +443,7 @@ static int iomap_dax_zero(loff_t pos, unsigned offset, 
unsigned bytes,
return length;
 }
 
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops)
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops 
*ops)
 {
struct page *page = vmf->page;
struct inode *inode = file_inode(vmf->vma->vm_file);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 19a07de..666b717 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -3,6 +3,7 @@
 #define LINUX_IOMAP_H 1
 
 #include 
+#include 
 
 struct fiemap_extent_info;
 struct inode;
@@ -88,7 +89,8 @@ int iomap_zero_range(struct inode *inode, loff_t pos, loff_t 
len,
bool *did_zero, const struct iomap_ops *ops);
 int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
const struct iomap_ops *ops);
-int iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops);
+vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf,
+   const struct iomap_ops *ops);
 int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
loff_t start, loff_t len, const struct iomap_ops *ops);
 loff_t iomap_seek_hole(struct inode *inode, loff_t offset,
-- 
1.9.1