[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <41f5cd92-6bd8-46d4-afce-3c14a1cd48dc@redhat.com>
Date: Mon, 13 Oct 2025 14:48:48 +0200
From: David Hildenbrand <david@...hat.com>
To: Christoph Hellwig <hch@....de>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Eric Van Hensbergen <ericvh@...nel.org>, Latchesar Ionkov
<lucho@...kov.net>, Dominique Martinet <asmadeus@...ewreck.org>,
Christian Schoenebeck <linux_oss@...debyte.com>, Chris Mason <clm@...com>,
David Sterba <dsterba@...e.com>, Mark Fasheh <mark@...heh.com>,
Joel Becker <jlbec@...lplan.org>, Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Josef Bacik <josef@...icpanda.com>,
Jan Kara <jack@...e.cz>, linux-block@...r.kernel.org, v9fs@...ts.linux.dev,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org, jfs-discussion@...ts.sourceforge.net,
ocfs2-devel@...ts.linux.dev, linux-xfs@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 06/10] mm,btrfs: add a filemap_fdatawrite_kick_nr helper
> @@ -474,6 +474,28 @@ int filemap_flush(struct address_space *mapping)
> }
> EXPORT_SYMBOL(filemap_flush);
>
> +/*
> + * Start writeback on @nr_to_write pages from @mapping. No one but the existing
> + * btrfs caller should be using this. Talk to linux-mm if you think adding a
> + * new caller is a good idea.
> + */
Nit: We seem to prefer proper kerneldoc for filemap_fdatawrite* functions.
> +int filemap_fdatawrite_kick_nr(struct address_space *mapping, long *nr_to_write)
> +{
> + struct writeback_control wbc = {
> + .nr_to_write = *nr_to_write,
> + .sync_mode = WB_SYNC_NONE,
> + .range_start = 0,
> + .range_end = LLONG_MAX,
> + };
> + int ret;
> +
> + ret = filemap_fdatawrite_wbc(mapping, &wbc);
> + if (!ret)
> + *nr_to_write = wbc.nr_to_write;
> + return ret;
> +}
> +EXPORT_SYMBOL_FOR_MODULES(filemap_fdatawrite_kick_nr, "btrfs");
> +
> /**
> * filemap_range_has_page - check if a page exists in range.
> * @mapping: address space within which to check
I think there is still a discussion on the name, but in general LGTM
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Cheers
David / dhildenb
Powered by blists - more mailing lists