Skip to content

Introduce attach/detach_page_private to cleanup code

Guoqing Jiang linux-btrfs linux-f2fs-devel linux-fsdevel linux-mm linux-raid linux-xfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 14 repliesIn review 9 of 11 applied

RFC V2 -> RFC V3 from the cover letter

1. rename clear_page_private to detach_page_private.
2. Update the comments for attach/detach_page_private from Mattew.
3. add one patch to call new function in mm/migrate.c as suggested by Mattew, but use the conservative way to keep the orginal semantics [2].

Patches in v1 9 of 11 applied

#Subject and filesSizeRepliesApplied
1/10include/linux/pagemap.h: introduce attach/detach_page_privateinclude/linux/pagemap.h+37 -00 replies
2/10md: remove __clear_page_buffers and use attach/detach_page_privatedrivers/md/md-bitmap.c+2 -100 repliesApplied
3/10btrfs: use attach/detach_page_privatefs/btrfs/disk-io.c fs/btrfs/extent_io.c fs/btrfs/inode.c+12 -360 repliesApplied
4/10fs/buffer.c: use attach/detach_page_privatefs/buffer.c+4 -120 repliesApplied
5/10f2fs: use attach/detach_page_privatefs/f2fs/f2fs.h+2 -90 repliesApplied
6/10iomap: use attach/detach_page_privatefs/iomap/buffered-io.c+4 -150 repliesApplied
7/10ntfs: replace attach_page_buffers with attach_page_privatefs/ntfs/aops.c fs/ntfs/mft.c+2 -20 repliesApplied
8/10orangefs: use attach/detach_page_privatefs/orangefs/inode.c+6 -262 repliesApplied
9/10buffer_head.h: remove attach_page_buffersinclude/linux/buffer_head.h+0 -80 repliesApplied
10/10mm/migrate.c: call detach_page_private to cleanup codemm/migrate.c+1 -412 replies
10/10mm/migrate.c: call detach_page_private to cleanup codemm/migrate.c+1 -40 repliesApplied

Reviews trailers per patch

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

PatchSong LiuChao Yu
1/10
2/10A-b
3/10
4/10
5/10A-b
6/10
7/10
8/10
9/10
10/10
10/10

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/10] Introduce attach/detach_page_private to cleanup code

Hell Andrew and Al,

Since no more feedback from RFC V3, I suppose the series could be ready for merge. And Song has already acked the md patch, then all the rest patches are for fs and mm.

So, if no further comments for the patchset, could you consider to queue them from either of your tree to avoid potential build issue? Thank you!

RFC V3: https://lore.kernel.org/lkml/[email protected]/
RFC V3: https://lore.kernel.org/lkml/[email protected]/
RFC: https://lore.kernel.org/lkml/[email protected]/

Thanks,
Guoqing

No change since RFC V3.

RFC V2 -> RFC V3:
1. rename clear_page_private to detach_page_private.
2. Update the comments for attach/detach_page_private from Mattew.
3. add one patch to call new function in mm/migrate.c as suggested by Mattew, but use the conservative way to keep the orginal semantics [2].

RFC -> RFC V2:
1. rename the new functions and add comments for them.
2. change the return type of attach_page_private.
3. call attach_page_private(newpage, clear_page_private(page)) to cleanup code further.
4. avoid potential use-after-free in orangefs.

[1]. https://lore.kernel.org/linux-fsdevel/[email protected]/
[2]. https://lore.kernel.org/lkml/[email protected]/

Guoqing Jiang (10):
include/linux/pagemap.h: introduce attach/detach_page_private
md: remove __clear_page_buffers and use attach/detach_page_private
btrfs: use attach/detach_page_private
fs/buffer.c: use attach/detach_page_private
f2fs: use attach/detach_page_private
iomap: use attach/detach_page_private
ntfs: replace attach_page_buffers with attach_page_private
orangefs: use attach/detach_page_private
buffer_head.h: remove attach_page_buffers
mm/migrate.c: call detach_page_private to cleanup code

 drivers/md/md-bitmap.c      | 12 ++----------
 fs/btrfs/disk-io.c          |  4 +---
 fs/btrfs/extent_io.c        | 21 ++++++---------------
 fs/btrfs/inode.c            | 23 +++++------------------
 fs/buffer.c                 | 16 ++++------------
 fs/f2fs/f2fs.h              | 11 ++---------
 fs/iomap/buffered-io.c      | 19 ++++---------------
 fs/ntfs/aops.c              |  2 +-
 fs/ntfs/mft.c               |  2 +-
 fs/orangefs/inode.c         | 32 ++++++--------------------------
 include/linux/buffer_head.h |  8 --------
 include/linux/pagemap.h     | 37 +++++++++++++++++++++++++++++++++++++
 mm/migrate.c                |  5 +----
 13 files changed, 70 insertions(+), 122 deletions(-)
Signature · 1 line
2.17.1