Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Guoqing Jiang
On 5/1/20 3:49 AM, Al Viro wrote: On Fri, May 01, 2020 at 02:42:29AM +0100, Al Viro wrote: On Thu, Apr 30, 2020 at 03:13:38PM -0700, Matthew Wilcox wrote: +/** + * clear_page_private - clear page's private field and PG_private. + * @page: page to be cleared. + * + * The counterpart function of

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Guoqing Jiang
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. + * + *

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Guoqing Jiang
On 5/1/20 12:10 AM, Andreas Grünbacher wrote: Hi, Am Do., 30. Apr. 2020 um 23:56 Uhr schrieb Guoqing Jiang : The logic in attach_page_buffers and __clear_page_buffers are quite paired, but 1. they are located in different files. 2. attach_page_buffers is implemented in buffer_head.h, so it c

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Al Viro
On Fri, May 01, 2020 at 02:42:29AM +0100, Al Viro wrote: > On Thu, Apr 30, 2020 at 03:13:38PM -0700, Matthew Wilcox wrote: > > > > +/** > > > + * clear_page_private - clear page's private field and PG_private. > > > + * @page: page to be cleared. > > > + * > > > + * The counterpart function of att

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Al Viro
On Thu, Apr 30, 2020 at 03:13:38PM -0700, Matthew Wilcox wrote: > > +/** > > + * 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

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Matthew Wilcox
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

Re: [RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Andreas Grünbacher
Hi, Am Do., 30. Apr. 2020 um 23:56 Uhr schrieb Guoqing Jiang : > The logic in attach_page_buffers and __clear_page_buffers are quite > paired, but > > 1. they are located in different files. > > 2. attach_page_buffers is implemented in buffer_head.h, so it could be >used by other files. But _

[RFC PATCH V2 1/9] include/linux/pagemap.h: introduce attach/clear_page_private

2020-04-30 Thread Guoqing Jiang
The logic in attach_page_buffers and __clear_page_buffers are quite paired, but 1. they are located in different files. 2. attach_page_buffers is implemented in buffer_head.h, so it could be used by other files. But __clear_page_buffers is static function in buffer.c and other potential us