archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <>
To: Richard Weinberger <>
Cc: zhangjun <>,
	Alexander Viro <>,,,
	"Darrick J . Wong" <>,,,
	Dave Chinner <>,,,,,,,,,, Gao Xiang <>
Subject: Re: [PATCH] fix page_count in ->iomap_migrate_page()
Date: Fri, 14 Dec 2018 20:26:28 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <1618433.IpySj692Hd@blindfold>

Hi Richard,

On 2018/12/14 19:25, Richard Weinberger wrote:
> This is the third place which needs this workaround.
> UBIFS, F2FS, and now iomap.
> I agree with Dave that nobody can assume that PG_private implies an additional
> page reference.
> But page migration does that. Including parts of the write back code.

It seems that it's clearly documented in

 * A pagecache page contains an opaque `private' member, which belongs to the
 * page's address_space. Usually, this is the address of a circular list of
 * the page's disk buffers. PG_private must be set to tell the VM to call
 * into the filesystem to release these pages.
 * A page may belong to an inode's memory mapping. In this case, page->mapping
 * is the pointer to the inode, and page->index is the file offset of the page,
 * in units of PAGE_SIZE.
 * If pagecache pages are not associated with an inode, they are said to be
 * anonymous pages. These may become associated with the swapcache, and in that
 * case PG_swapcache is set, and page->private is an offset into the swapcache.
 * In either case (swapcache or inode backed), the pagecache itself holds one
 * reference to the page. Setting PG_private should also increment the
 * refcount. The each user mapping also has a reference to the page.

and when I looked into that, I found

Gao Xiang

  reply	other threads:[~2018-12-14 12:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14  5:56 zhangjun
2018-12-14 11:25 ` Richard Weinberger
2018-12-14 12:26   ` Gao Xiang [this message]
2018-12-14 13:35     ` Richard Weinberger
2018-12-14 13:55       ` Gao Xiang
2018-12-15 10:51   ` Christoph Hellwig
2018-12-15 11:17     ` Richard Weinberger
2018-12-15  4:26 ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] fix page_count in ->iomap_migrate_page()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).