Skip to content

block/bio, fs: convert put_page() to put_user_page*()

[email protected] ceph-devel kvm linux-block linux-cifs linux-fsdevel linux-mm linux-nfs linux-rdma lkml netdev virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12mm/gup: add make_dirty arg to put_user_pages_dirty_lock()drivers/infiniband/core/umem.c drivers/infiniband/hw/hfi1/user_pages.c drivers/infiniband/hw/qib/qib_user_pages.c +4 more+58 -900 replies
1/12mm/gup: add make_dirty arg to put_user_pages_dirty_lock()drivers/infiniband/core/umem.c drivers/infiniband/hw/hfi1/user_pages.c drivers/infiniband/hw/qib/qib_user_pages.c +4 more+58 -900 replies
2/12iov_iter: add helper to test if an iter would use GUP v2include/linux/uio.h+11 -00 replies
2/12iov_iter: add helper to test if an iter would use GUP v2include/linux/uio.h+11 -00 replies
3/12block: bio_release_pages: use flags arg instead of boolblock/bio.c fs/block_dev.c fs/direct-io.c +1 more+21 -1010 replies
3/12block: bio_release_pages: use flags arg instead of boolblock/bio.c fs/block_dev.c fs/direct-io.c +1 more+21 -100 replies
4/12block: bio_release_pages: convert put_page() to put_user_page*()block/bio.c include/linux/bio.h+49 -120 replies
4/12block: bio_release_pages: convert put_page() to put_user_page*()block/bio.c include/linux/bio.h+49 -120 replies
5/12block_dev: convert put_page() to put_user_page*()block/bio.c fs/block_dev.c include/linux/bio.h+38 -50 replies
5/12block_dev: convert put_page() to put_user_page*()block/bio.c fs/block_dev.c include/linux/bio.h+38 -50 replies
6/12fs/nfs: convert put_page() to put_user_page*()fs/nfs/direct.c+8 -20 replies
6/12fs/nfs: convert put_page() to put_user_page*()fs/nfs/direct.c+8 -20 replies
7/12vhost-scsi: convert put_page() to put_user_page*()drivers/vhost/scsi.c+10 -33 replies
7/12vhost-scsi: convert put_page() to put_user_page*()drivers/vhost/scsi.c+10 -30 replies
8/12fs/cifs: convert put_page() to put_user_page*()fs/cifs/cifsglob.h fs/cifs/file.c fs/cifs/misc.c+35 -90 replies
8/12fs/cifs: convert put_page() to put_user_page*()fs/cifs/cifsglob.h fs/cifs/file.c fs/cifs/misc.c+35 -90 replies
9/12fs/fuse: convert put_page() to put_user_page*()fs/fuse/dev.c fs/fuse/file.c+57 -180 replies
9/12fs/fuse: convert put_page() to put_user_page*()fs/fuse/dev.c fs/fuse/file.c+57 -180 replies
10/12fs/ceph: convert put_page() to put_user_page*()fs/ceph/file.c+48 -140 replies
10/12fs/ceph: convert put_page() to put_user_page*()fs/ceph/file.c+48 -140 replies
11/129p/net: convert put_page() to put_user_page*()net/9p/trans_common.c net/9p/trans_common.h net/9p/trans_virtio.c+25 -100 replies
11/129p/net: convert put_page() to put_user_page*()net/9p/trans_common.c net/9p/trans_common.h net/9p/trans_virtio.c+25 -100 replies
12/12fs/ceph: fix a build warning: returning a value from void functionfs/ceph/debugfs.c+1 -10 replies
12/12fs/ceph: fix a build warning: returning a value from void functionfs/ceph/debugfs.c+1 -10 replies

Reviews trailers per patch

2 of 24 patches have a Reviewed-by or Acked-by.

PatchMichael S. Tsirkin
1/12
1/12
2/12
2/12
3/12
3/12
4/12
4/12
5/12
5/12
6/12
6/12
7/12A-b
7/12A-b
8/12
8/12
9/12
9/12
10/12
10/12
11/12
11/12
12/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

From: John Hubbard <[email protected]>

Hi,

This is mostly Jerome's work, converting the block/bio and related areas to call put_user_page*() instead of put_page(). Because I've changed Jerome's patches, in some cases significantly, I'd like to get his feedback before we actually leave him listed as the author (he might want to disown some or all of these).

I added a new patch, in order to make this work with Christoph Hellwig's recent overhaul to bio_release_pages(): "block: bio_release_pages: use flags arg instead of bool".

I've started the series with a patch that I've posted in another series ("mm/gup: add make_dirty arg to put_user_pages_dirty_lock()"[1]), because I'm not sure which of these will go in first, and this allows each to stand alone.

Testing: not much beyond build and boot testing has been done yet. And I'm not set up to even exercise all of it (especially the IB parts) at run time.

Anyway, changes here are:

* Store, in the iov_iter, a "came from gup (get_user_pages)" parameter. Then, use the new iov_iter_get_pages_use_gup() to retrieve it when it is time to release the pages. That allows choosing between put_page() and put_user_page*().

* Pass in one more piece of information to bio_release_pages: a "from_gup" parameter. Similar use as above.

* Change the block layer, and several file systems, to use put_user_page*().

[1] https://lore.kernel.org/r/[email protected]
And please note the correction email that I posted as a follow-up, if you're looking closely at that patch. :) The fixed version is included here.

John Hubbard (3):
mm/gup: add make_dirty arg to put_user_pages_dirty_lock()
block: bio_release_pages: use flags arg instead of bool fs/ceph: fix a build warning: returning a value from void function

Jérôme Glisse (9):
iov_iter: add helper to test if an iter would use GUP v2
block: bio_release_pages: convert put_page() to put_user_page*()
block_dev: convert put_page() to put_user_page*() fs/nfs: convert put_page() to put_user_page*()
vhost-scsi: convert put_page() to put_user_page*() fs/cifs: convert put_page() to put_user_page*() fs/fuse: convert put_page() to put_user_page*() fs/ceph: convert put_page() to put_user_page*() 9p/net: convert put_page() to put_user_page*()

 block/bio.c                                |  81 ++++++++++++---
 drivers/infiniband/core/umem.c             |   5 +-
 drivers/infiniband/hw/hfi1/user_pages.c    |   5 +-
 drivers/infiniband/hw/qib/qib_user_pages.c |   5 +-
 drivers/infiniband/hw/usnic/usnic_uiom.c   |   5 +-
 drivers/infiniband/sw/siw/siw_mem.c        |   8 +-
 drivers/vhost/scsi.c                       |  13 ++-
 fs/block_dev.c                             |  22 +++-
 fs/ceph/debugfs.c                          |   2 +-
 fs/ceph/file.c                             |  62 ++++++++---
 fs/cifs/cifsglob.h                         |   3 +
 fs/cifs/file.c                             |  22 +++-
 fs/cifs/misc.c                             |  19 +++-
 fs/direct-io.c                             |   2 +-
 fs/fuse/dev.c                              |  22 +++-
 fs/fuse/file.c                             |  53 +++++++---
 fs/nfs/direct.c                            |  10 +-
 include/linux/bio.h                        |  22 +++-
 include/linux/mm.h                         |   5 +-
 include/linux/uio.h                        |  11 ++
 mm/gup.c                                   | 115 +++++++++------------
 net/9p/trans_common.c                      |  14 ++-
 net/9p/trans_common.h                      |   3 +-
 net/9p/trans_virtio.c                      |  18 +++-
 24 files changed, 357 insertions(+), 170 deletions(-)
Signature · 1 line
2.22.0