lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65aad714-3f1d-4f4b-bb8f-6f751ff756b7@kernel.org>
Date: Mon, 13 Oct 2025 16:55:50 +0900
From: Damien Le Moal <dlemoal@...nel.org>
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 05/10] btrfs: push struct writeback_control into
 start_delalloc_inodes

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 ?

>  			goto out;
>  		spin_lock(&fs_info->delalloc_root_lock);
>  	}


-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ