Re: [PATCH v8 19/20] fs/dax: Properly refcount fs dax pages

2025-02-20 Thread David Hildenbrand
-static inline unsigned long dax_folio_share_put(struct folio *folio) +static inline unsigned long dax_folio_put(struct folio *folio) { - return --folio->page.share; + unsigned long ref; + int order, i; + + if (!dax_folio_is_shared(folio)) + ref = 0; +

Re: [PATCH v8 19/20] fs/dax: Properly refcount fs dax pages

2025-02-18 Thread Alistair Popple
On Tue, Feb 18, 2025 at 12:37:28PM +0100, David Hildenbrand wrote: > On 18.02.25 04:55, Alistair Popple wrote: > > Currently fs dax pages are considered free when the refcount drops to > > one and their refcounts are not increased when mapped via PTEs or > > decreased when unmapped. This requires s

Re: [PATCH v8 19/20] fs/dax: Properly refcount fs dax pages

2025-02-18 Thread David Hildenbrand
On 18.02.25 04:55, Alistair Popple wrote: Currently fs dax pages are considered free when the refcount drops to one and their refcounts are not increased when mapped via PTEs or decreased when unmapped. This requires special logic in mm paths to detect that these pages should not be properly refc

[PATCH v8 19/20] fs/dax: Properly refcount fs dax pages

2025-02-17 Thread Alistair Popple
Currently fs dax pages are considered free when the refcount drops to one and their refcounts are not increased when mapped via PTEs or decreased when unmapped. This requires special logic in mm paths to detect that these pages should not be properly refcounted, and to detect when the refcount drop