[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPjX3FdRvkie6XMvAjSXb4=8bcjeg1qNjYVT5KOBUDrc+H=nDQ@mail.gmail.com>
Date: Mon, 13 Oct 2025 10:15:01 +0200
From: Daniel Vacek <neelx@...e.com>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: 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>,
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 05/10] btrfs: push struct writeback_control into start_delalloc_inodes
On Mon, 13 Oct 2025 at 09:56, Damien Le Moal <dlemoal@...nel.org> wrote:
>
> On 2025/10/13 11:58, Christoph Hellwig wrote:
> > In preparation for changing the filemap_fdatawrite_wbc API to not expose
> > the writeback_control to the callers, push the wbc declaration next to
> > the filemap_fdatawrite_wbc call and just pass thr nr_to_write value to
>
> s/thr/the
>
> > start_delalloc_inodes.
> >
> > Signed-off-by: Christoph Hellwig <hch@....de>
>
> ...
>
> > @@ -8831,9 +8821,10 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
> > &fs_info->delalloc_roots);
> > spin_unlock(&fs_info->delalloc_root_lock);
> >
> > - ret = start_delalloc_inodes(root, &wbc, false, in_reclaim_context);
> > + ret = start_delalloc_inodes(root, nr_to_write, false,
> > + in_reclaim_context);
> > btrfs_put_root(root);
> > - if (ret < 0 || wbc.nr_to_write <= 0)
> > + if (ret < 0 || nr <= 0)
>
> Before this change, wbc.nr_to_write will indicate what's remaining, not what you
> asked for. So I think you need a change like you did in start_delalloc_inodes(),
> no ?
I understand nr is updated to what's remaining using the nr_to_write
pointer in start_delalloc_inodes(). Right?
--nX
> > goto out;
> > spin_lock(&fs_info->delalloc_root_lock);
> > }
>
>
> --
> Damien Le Moal
> Western Digital Research
>
Powered by blists - more mailing lists