[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0d7df5f-ac43-4e15-8400-155bf87d5e77@infradead.org>
Date: Mon, 8 Sep 2025 16:17:16 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Jonathan Corbet <corbet@....net>, Matthew Wilcox <willy@...radead.org>,
Guo Ren <guoren@...nel.org>, Thomas Bogendoerfer
<tsbogend@...ha.franken.de>, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, Alexander Gordeev
<agordeev@...ux.ibm.com>, Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, "David S . Miller"
<davem@...emloft.net>, Andreas Larsson <andreas@...sler.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Dave Jiang <dave.jiang@...el.com>,
Nicolas Pitre <nico@...xnic.net>, Muchun Song <muchun.song@...ux.dev>,
Oscar Salvador <osalvador@...e.de>, David Hildenbrand <david@...hat.com>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
Dave Young <dyoung@...hat.com>, Tony Luck <tony.luck@...el.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Dave Martin <Dave.Martin@....com>, James Morse <james.morse@....com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
Hugh Dickins <hughd@...gle.com>, Baolin Wang
<baolin.wang@...ux.alibaba.com>, Uladzislau Rezki <urezki@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>, Andrey Konovalov <andreyknvl@...il.com>,
Jann Horn <jannh@...gle.com>, Pedro Falcato <pfalcato@...e.de>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-csky@...r.kernel.org,
linux-mips@...r.kernel.org, linux-s390@...r.kernel.org,
sparclinux@...r.kernel.org, nvdimm@...ts.linux.dev,
linux-cxl@...r.kernel.org, linux-mm@...ck.org, ntfs3@...ts.linux.dev,
kexec@...ts.infradead.org, kasan-dev@...glegroups.com,
Jason Gunthorpe <jgg@...dia.com>
Subject: Re: [PATCH 07/16] doc: update porting, vfs documentation for
mmap_[complete, abort]
Hi--
On 9/8/25 4:10 AM, Lorenzo Stoakes wrote:
> We have introduced the mmap_complete() and mmap_abort() callbacks, which
> work in conjunction with mmap_prepare(), so describe what they used for.
>
> We update both the VFS documentation and the porting guide.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> ---
> Documentation/filesystems/porting.rst | 9 +++++++
> Documentation/filesystems/vfs.rst | 35 +++++++++++++++++++++++++++
> 2 files changed, 44 insertions(+)
>
> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
> index 486a91633474..172d36a13e13 100644
> --- a/Documentation/filesystems/vfs.rst
> +++ b/Documentation/filesystems/vfs.rst
> @@ -1236,6 +1240,37 @@ otherwise noted.
> file-backed memory mapping, most notably establishing relevant
> private state and VMA callbacks.
>
> +``mmap_complete``
> + If mmap_prepare is provided, will be invoked after the mapping is fully
s/mmap_prepare/mmap_complete/ ??
> + established, with the mmap and VMA write locks held.
> +
> + It is useful for prepopulating VMAs before they may be accessed by
> + users.
> +
> + The hook MUST NOT release either the VMA or mmap write locks. This is
You could also do **bold** above:
The hook **MUST NOT** release ...
> + asserted by the mmap logic.
> +
> + If an error is returned by the hook, the VMA is unmapped and the
> + mmap() operation fails with that error.
> +
> + It is not valid to specify this hook if mmap_prepare is not also
> + specified, doing so will result in an error upon mapping.
--
~Randy
Powered by blists - more mailing lists