All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	hch@infradead.org, david@fromorbit.com,
	Andrew Morton <akpm@linux-foundation.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	William Kucharski <william.kucharski@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	Yafang Shao <laoar.shao@gmail.com>, Song Liu <song@kernel.org>,
	linux-raid@vger.kernel.org, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-xfs@vger.kernel.org, Anton
Subject: Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private
Date: Fri, 1 May 2020 08:39:31 +0200	[thread overview]
Message-ID: <4c177757-7e27-420e-621b-98353ec43ea1@cloud.ionos.com> (raw)
In-Reply-To: <20200430221338.GY29705@bombadil.infradead.org>

On 5/1/20 12:13 AM, Matthew Wilcox wrote:
> On Thu, Apr 30, 2020 at 11:44:42PM +0200, Guoqing Jiang wrote:
>> +/**
>> + * attach_page_private - attach data to page's private field and set PG_private.
>> + * @page: page to be attached and set flag.
>> + * @data: data to attach to page's private field.
>> + *
>> + * Need to take reference as mm.h said "Setting PG_private should also increment
>> + * the refcount".
>> + */
> I don't think this will read well when added to the API documentation.
> Try this:
>
> /**
>   * attach_page_private - Attach private data to a page.
>   * @page: Page to attach data to.
>   * @data: Data to attach to page.
>   *
>   * Attaching private data to a page increments the page's reference count.
>   * The data must be detached before the page will be freed.
>   */
>
>> +/**
>> + * clear_page_private - clear page's private field and PG_private.
>> + * @page: page to be cleared.
>> + *
>> + * The counterpart function of attach_page_private.
>> + * Return: private data of page or NULL if page doesn't have private data.
>> + */
> Seems to me that the opposite of "attach" is "detach", not "clear".
>
> /**
>   * detach_page_private - Detach private data from a page.
>   * @page: Page to detach data from.
>   *
>   * Removes the data that was previously attached to the page and decrements
>   * the refcount on the page.
>   *
>   * Return: Data that was attached to the page.
>   */

Thanks you very much, Mattew! Will change them in next version.

Best Regards,
Guoqing

WARNING: multiple messages have this Message-ID (diff)
From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	hch@infradead.org, david@fromorbit.com,
	Andrew Morton <akpm@linux-foundation.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	William Kucharski <william.kucharski@oracle.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	Yafang Shao <laoar.shao@gmail.com>, Song Liu <song@kernel.org>,
	linux-raid@vger.kernel.org, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-xfs@vger.kernel.org, Anton Altaparmakov <anton@tuxera.com>,
	linux-ntfs-dev@lists.sourceforge.net,
	Mike Marshall <hubcap@omnibond.com>,
	Martin Brandenburg <martin@omnibond.com>,
	devel@lists.orangefs.org, Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Roman Gushchin <guro@fb.com>, Andreas Dilger <adilger@dilger.ca>
Subject: Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private
Date: Fri, 1 May 2020 08:39:31 +0200	[thread overview]
Message-ID: <4c177757-7e27-420e-621b-98353ec43ea1@cloud.ionos.com> (raw)
In-Reply-To: <20200430221338.GY29705@bombadil.infradead.org>

On 5/1/20 12:13 AM, Matthew Wilcox wrote:
> On Thu, Apr 30, 2020 at 11:44:42PM +0200, Guoqing Jiang wrote:
>> +/**
>> + * attach_page_private - attach data to page's private field and set PG_private.
>> + * @page: page to be attached and set flag.
>> + * @data: data to attach to page's private field.
>> + *
>> + * Need to take reference as mm.h said "Setting PG_private should also increment
>> + * the refcount".
>> + */
> I don't think this will read well when added to the API documentation.
> Try this:
>
> /**
>   * attach_page_private - Attach private data to a page.
>   * @page: Page to attach data to.
>   * @data: Data to attach to page.
>   *
>   * Attaching private data to a page increments the page's reference count.
>   * The data must be detached before the page will be freed.
>   */
>
>> +/**
>> + * clear_page_private - clear page's private field and PG_private.
>> + * @page: page to be cleared.
>> + *
>> + * The counterpart function of attach_page_private.
>> + * Return: private data of page or NULL if page doesn't have private data.
>> + */
> Seems to me that the opposite of "attach" is "detach", not "clear".
>
> /**
>   * detach_page_private - Detach private data from a page.
>   * @page: Page to detach data from.
>   *
>   * Removes the data that was previously attached to the page and decrements
>   * the refcount on the page.
>   *
>   * Return: Data that was attached to the page.
>   */

Thanks you very much, Mattew! Will change them in next version.

Best Regards,
Guoqing

WARNING: multiple messages have this Message-ID (diff)
From: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Martin Brandenburg <martin@omnibond.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	david@fromorbit.com, Song Liu <song@kernel.org>,
	Yafang Shao <laoar.shao@gmail.com>,
	Mike Marshall <hubcap@omnibond.com>,
	Andreas Gruenbacher <agruenba@redhat.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Chris Mason <clm@fb.com>,
	hch@infradead.org, devel@lists.orangefs.org,
	Josef Bacik <josef@toxicpanda.com>,
	linux-raid@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	David Sterba <dsterba@suse.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Anton Altaparmakov <anton@tuxera.com>,
	Andreas Dilger <adilger@dilger.ca>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	William Kucharski <william.kucharski@oracle.com>,
	linux-ntfs-dev@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-xfs@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Gushchin <guro@fb.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [f2fs-dev] [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private
Date: Fri, 1 May 2020 08:39:31 +0200	[thread overview]
Message-ID: <4c177757-7e27-420e-621b-98353ec43ea1@cloud.ionos.com> (raw)
In-Reply-To: <20200430221338.GY29705@bombadil.infradead.org>

On 5/1/20 12:13 AM, Matthew Wilcox wrote:
> On Thu, Apr 30, 2020 at 11:44:42PM +0200, Guoqing Jiang wrote:
>> +/**
>> + * attach_page_private - attach data to page's private field and set PG_private.
>> + * @page: page to be attached and set flag.
>> + * @data: data to attach to page's private field.
>> + *
>> + * Need to take reference as mm.h said "Setting PG_private should also increment
>> + * the refcount".
>> + */
> I don't think this will read well when added to the API documentation.
> Try this:
>
> /**
>   * attach_page_private - Attach private data to a page.
>   * @page: Page to attach data to.
>   * @data: Data to attach to page.
>   *
>   * Attaching private data to a page increments the page's reference count.
>   * The data must be detached before the page will be freed.
>   */
>
>> +/**
>> + * clear_page_private - clear page's private field and PG_private.
>> + * @page: page to be cleared.
>> + *
>> + * The counterpart function of attach_page_private.
>> + * Return: private data of page or NULL if page doesn't have private data.
>> + */
> Seems to me that the opposite of "attach" is "detach", not "clear".
>
> /**
>   * detach_page_private - Detach private data from a page.
>   * @page: Page to detach data from.
>   *
>   * Removes the data that was previously attached to the page and decrements
>   * the refcount on the page.
>   *
>   * Return: Data that was attached to the page.
>   */

Thanks you very much, Mattew! Will change them in next version.

Best Regards,
Guoqing


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2020-05-01  6:39 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 21:44 [RFC PATCH V2 0/9] Introduce attach/clear_page_private to cleanup code Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private Guoqing Jiang
2020-04-30 21:44   ` [f2fs-dev] " Guoqing Jiang
2020-04-30 21:44   ` Guoqing Jiang
2020-04-30 22:10   ` Andreas Grünbacher
2020-04-30 22:10     ` [f2fs-dev] " Andreas Grünbacher
2020-04-30 22:10     ` Andreas Grünbacher
2020-05-01  6:38     ` Guoqing Jiang
2020-05-01  6:38       ` [f2fs-dev] " Guoqing Jiang
2020-05-01  6:38       ` Guoqing Jiang
2020-04-30 22:13   ` Matthew Wilcox
2020-04-30 22:13     ` [f2fs-dev] " Matthew Wilcox
2020-04-30 22:13     ` Matthew Wilcox
2020-05-01  1:42     ` Al Viro
2020-05-01  1:42       ` [f2fs-dev] " Al Viro
2020-05-01  1:42       ` Al Viro
2020-05-01  1:49       ` Al Viro
2020-05-01  1:49         ` [f2fs-dev] " Al Viro
2020-05-01  1:49         ` Al Viro
2020-05-01  6:41         ` Guoqing Jiang
2020-05-01  6:41           ` [f2fs-dev] " Guoqing Jiang
2020-05-01  6:41           ` Guoqing Jiang
2020-05-01  6:39     ` Guoqing Jiang [this message]
2020-05-01  6:39       ` [f2fs-dev] " Guoqing Jiang
2020-05-01  6:39       ` Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 2/9] md: remove __clear_page_buffers and use attach/clear_page_private Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 3/9] btrfs: " Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 4/9] fs/buffer.c: " Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 5/9] f2fs: " Guoqing Jiang
2020-04-30 21:44   ` [f2fs-dev] " Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 6/9] iomap: " Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 7/9] ntfs: replace attach_page_buffers with attach_page_private Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 8/9] orangefs: use attach/clear_page_private Guoqing Jiang
2020-04-30 21:44 ` [RFC PATCH V2 9/9] buffer_head.h: remove attach_page_buffers Guoqing Jiang
2020-05-01 22:16 ` [RFC PATCH V2 0/9] Introduce attach/clear_page_private to cleanup code Matthew Wilcox
2020-05-01 22:42   ` Guoqing Jiang
2020-05-02  0:41     ` Matthew Wilcox
2020-05-02  8:56       ` Guoqing Jiang

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=4c177757-7e27-420e-621b-98353ec43ea1@cloud.ionos.com \
    --to=guoqing.jiang@cloud.ionos.com \
    --cc=agruenba@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=chao@kernel.org \
    --cc=clm@fb.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=dsterba@suse.com \
    --cc=hch@infradead.org \
    --cc=jaegeuk@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=laoar.shao@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=william.kucharski@oracle.com \
    --cc=willy@infradead.org \
    --cc=yang.shi@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.