From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D80C46AA88 for ; Sat, 5 Sep 2026 10:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788605269; cv=none; b=GUEdyEh4FiwB9OrBGWH8nsX1cKVwj8elEYGuKDfS63K40LXC/pqsRXhnCrVotVv8Y/YC6QX/yIA8fx+MGfDs2imW70/rAWoRT6gIC9p9CS9Nj/tWj0MIcBau3D1ZWjUtrv1jD3fjXjr2w/KgUcNKSbhvnBvnqUVytI6mHZxo/zo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788605269; c=relaxed/simple; bh=HDADB5g8qyCvuPB9/Qia55junVgNt/wmtvEJ9NMs/90=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Mhmgl70iTZ0JvM3HROsq9u+CB56scln/Wl6VK9z1BryB0cZyEbvOMM0SU7jL4DDw0bNZZs9ZkXgJ/7idBjw6HX3L6bOQYrqpMY6m5k+nxcngx0xQCSSeUHcvhZSYl5xw3d3/bwJ7tvXf91xEM9Ei1EH/QfwUWAH9/ZbpLfw6nWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com; spf=pass smtp.mailfrom=gmx.com; dkim=pass (2048-bit key) header.d=gmx.com header.i=quwenruo.btrfs@gmx.com header.b=M1YC5RGD; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.com header.i=quwenruo.btrfs@gmx.com header.b="M1YC5RGD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1788605263; x=1789210063; i=quwenruo.btrfs@gmx.com; bh=oq6G6C15sHdkxozoj4aNTHzZ7afdaXUS3/dnerSEY7c=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=M1YC5RGDT9WNVNAVGRJvylo5cf3ob/NmlvGjVHJEwWOQlNMB2asRpRThGGKdjnwh SjZ3XylVD3nSEVphedx/xYImh1HtuvsWt2g/IzngOv6/xlpgX12QjTxw8iEIdWr0a 17l9HD29wKzBegKFI1MzvNMBhgr8jFRVVZ7XflTfXguMG6mZwxdO0IBjqHPIv5dQO f5Ho2iDgiAzErB+SRPp8quTrP03C1mwIG0F0875JgUeQOwWY2puguGetOQSe2Be0C jA8Se+rDutBO4rGlcVjhyApDG4CnFR8h71TL2mFsmDtKajUyym2Sa68DQEpvmAMxR YlD38CycyaU9j90B1w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from client.hidden.invalid by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mt75H-1wiX3f0Cdd-00rF2i; Sat, 05 Sep 2026 12:47:43 +0200 Message-ID: <2eb96a3b-3d93-4563-8526-3bcf13594d50@gmx.com> Date: Sat, 5 Sep 2026 20:17:38 +0930 Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] btrfs: move async csum generation out of experimental features To: Daniel Vacek , Qu Wenruo Cc: linux-btrfs@vger.kernel.org References: <700ba6c46da86ace18a502b43c5e61d16a556060.1788424754.git.wqu@suse.com> <00fc1bdb-cb69-4339-8184-afc04fceab19@gmx.com> <130fdc9a-2d51-49cd-bf7f-c8e4b8fa19aa@suse.com> Content-Language: en-US From: Qu Wenruo Autocrypt: addr=quwenruo.btrfs@gmx.com; keydata= xsBNBFnVga8BCACyhFP3ExcTIuB73jDIBA/vSoYcTyysFQzPvez64TUSCv1SgXEByR7fju3o 8RfaWuHCnkkea5luuTZMqfgTXrun2dqNVYDNOV6RIVrc4YuG20yhC1epnV55fJCThqij0MRL 1NxPKXIlEdHvN0Kov3CtWA+R1iNN0RCeVun7rmOrrjBK573aWC5sgP7YsBOLK79H3tmUtz6b 9Imuj0ZyEsa76Xg9PX9Hn2myKj1hfWGS+5og9Va4hrwQC8ipjXik6NKR5GDV+hOZkktU81G5 gkQtGB9jOAYRs86QG/b7PtIlbd3+pppT0gaS+wvwMs8cuNG+Pu6KO1oC4jgdseFLu7NpABEB AAHNIlF1IFdlbnJ1byA8cXV3ZW5ydW8uYnRyZnNAZ214LmNvbT7CwJQEEwEIAD4CGwMFCwkI BwIGFQgJCgsCBBYCAwECHgECF4AWIQQt33LlpaVbqJ2qQuHCPZHzoSX+qAUCZxF1YAUJEP5a sQAKCRDCPZHzoSX+qF+mB/9gXu9C3BV0omDZBDWevJHxpWpOwQ8DxZEbk9b9LcrQlWdhFhyn xi+l5lRziV9ZGyYXp7N35a9t7GQJndMCFUWYoEa+1NCuxDs6bslfrCaGEGG/+wd6oIPb85xo naxnQ+SQtYLUFbU77WkUPaaIU8hH2BAfn9ZSDX9lIxheQE8ZYGGmo4wYpnN7/hSXALD7+oun tZljjGNT1o+/B8WVZtw/YZuCuHgZeaFdhcV2jsz7+iGb+LsqzHuznrXqbyUQgQT9kn8ZYFNW 7tf+LNxXuwedzRag4fxtR+5GVvJ41Oh/eygp8VqiMAtnFYaSlb9sjia1Mh+m+OBFeuXjgGlG VvQFzsBNBFnVga8BCACqU+th4Esy/c8BnvliFAjAfpzhI1wH76FD1MJPmAhA3DnX5JDORcga CbPEwhLj1xlwTgpeT+QfDmGJ5B5BlrrQFZVE1fChEjiJvyiSAO4yQPkrPVYTI7Xj34FnscPj /IrRUUka68MlHxPtFnAHr25VIuOS41lmYKYNwPNLRz9Ik6DmeTG3WJO2BQRNvXA0pXrJH1fN GSsRb+pKEKHKtL1803x71zQxCwLh+zLP1iXHVM5j8gX9zqupigQR/Cel2XPS44zWcDW8r7B0 q1eW4Jrv0x19p4P923voqn+joIAostyNTUjCeSrUdKth9jcdlam9X2DziA/DHDFfS5eq4fEv ABEBAAHCwHwEGAEIACYCGwwWIQQt33LlpaVbqJ2qQuHCPZHzoSX+qAUCZxF1gQUJEP5a0gAK CRDCPZHzoSX+qHGpB/kB8A7M7KGL5qzat+jBRoLwB0Y3Zax0QWuANVdZM3eJDlKJKJ4HKzjo B2Pcn4JXL2apSan2uJftaMbNQbwotvabLXkE7cPpnppnBq7iovmBw++/d8zQjLQLWInQ5kNq Vmi36kmq8o5c0f97QVjMryHlmSlEZ2Wwc1kURAe4lsRG2dNeAd4CAqmTw0cMIrR6R/Dpt3ma +8oGXJOmwWuDFKNV4G2XLKcghqrtcRf2zAGNogg3KulCykHHripG3kPKsb7fYVcSQtlt5R6v HZStaZBzw4PcDiaAF3pPDBd+0fIKS6BlpeNRSFG94RYrt84Qw77JWDOAZsyNfEIEE0J6LSR/ In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ZXwkC1cH0XB2SyxTmmUsy8S7mnraQpalb33FCtqZTVQkqbw4Ioy 86nbmgVq9NpQ0cMvhcIkc2wjYPBSMhRx0z65pStd5CPFutZGB+O9FvMH2NSyiGgPS264b5h nbQj8QLZ1BEyMCKkyh6Rpoj2pA3r1ELr4WBnm8QfgsQ0xhFCxol+iAW9DSH0n4XUoq5jJi4 OXRXcJ+FmM+j/tLSpVgkA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3gNXDU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L05bEjFOhDp0gOjbnyAPt9Y HfV2IXyQgVv+r =E5=9C=A8 2026/9/5 19:39, Daniel Vacek =E5=86=99=E9=81=93: > On Sat, 5 Sept 2026 at 02:57, Qu Wenruo wrote: [...] >> This has one new problem though. >> >> The csum_one_bio_work() can queue a new work into the same endio_worker= s. >> >> It happens like this: >> >> csum_one_bio_work() >> |- bio_endio() >> | |- btrfs_simple_end_io() >> |- queue_work() into endio_workers again >> >> This can cause problems with flush_workqueue() in close_ctree(), where >> we only flush the workqueue once, which doesn't ensure newly created >> work is also flushed. >=20 > Do you know of any situation where this can happen? Check the commit message of cda76788f8b0 ("btrfs: fix non-empty delayed=20 iputs list on unmount due to async workers"). With your change, we just move the csum generation and endio workload=20 from workers to endio_workers. Otherwise it's the same. >=20 > If btrfs_simple_end_io() can queue a work after close_ctree() has > flushed the wq, that would be buggy even before. IIUC, it does not > matter whether btrfs_simple_end_io() is running from interrupt (or > interrupt thread) or from the worker thread. >=20 > I understand that at the point when close_ctree() flushes > endio_workers we know there will be no new interrupt ending the io > request (that could queue an additional work). And since we know there > won't be a new interrupt, we also know there is no csum_one_bio_work() > queued. Right? >=20 > So can it even happen? Coz unless I'm mistaken in the reasoning above, > I think we're safe regarding your suspicion. >=20 > --nX >=20 >> We can use drain_workqueue() instead to fix it easily though. >> >> Mind to send out a proper patch for it? >> >> Thanks, >> Qu >> >>> >>> >>> That should make sashiko happy as well as btrfs end_io work running on >>> btrfs end_io work queues. >>> >>> And we should stay on the safe side wrt memory reclaim. >>> >>> --nX >>> >>> >>>> And since the csum generation is needed for data writeback, if under >>>> very heavy memory pressure, there may be no worker to ensure the csum >>>> work can be queued, in that case, it will hang the writeback (which i= s >>>> triggered to reclaim memory). >>>> >>>> If we really want to address that problem, your idea about splitting = the >>>> patch will make a lot of sense. >>>> We will need to keep the old infrastructure first, convert the worker= to >>>> a regular workqueue, and call queue_work(), then fully remove unused = code. >>>> >>>> >>>> But on the other hand, I doubt how pratically it is for anyone to sta= ll >>>> system_percpu_wq. >>>> It's very common utilized across the whole kernel, and if it really >>>> stalls I think there are a lot of more things to bother before btrfs. >>>> >>>> Another thing is, if we use fs_info::workers, we will follow the >>>> existing wq flags, which means no PERCPU flag. >>>> And according to the existing docs for those flags, PERCPU wq has a >>>> better performance due to CPU locality. >>>> >>>> >>>> So overall I think the current version is good enough, but not perfec= t. >>>> On the other hand, using a WQ_MEM_RECLAIM seems more "correct", but w= ill >>>> definitely introduce some extra pentalty. >>>> >>>> If someone else has some idea on this Sashiko review, or very familia= r >>>> with the WQ_MEM_RECLAIM situation, any comment will be appreciated. >>>> >>>> Thanks, >>>> Qu >>>> >>>>> >>>>>> Suggested-by: Daniel Vacek >>>>>> Signed-off-by: Qu Wenruo >>>>>> --- >>>>>> fs/btrfs/bio.c | 136 +-----------------------------------= =2D------ >>>>>> fs/btrfs/disk-io.c | 20 +------ >>>>>> fs/btrfs/file-item.c | 6 +- >>>>>> fs/btrfs/file-item.h | 2 +- >>>>>> fs/btrfs/fs.h | 10 ---- >>>>>> fs/btrfs/super.c | 1 - >>>>>> 6 files changed, 4 insertions(+), 171 deletions(-) >>>>>> >>>>>> diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c >>>>>> index 771b7d598aee..e08006543c3d 100644 >>>>>> --- a/fs/btrfs/bio.c >>>>>> +++ b/fs/btrfs/bio.c >>>>>> @@ -569,136 +569,7 @@ static int btrfs_bio_csum(struct btrfs_bio *b= bio) >>>>>> { >>>>>> if (bbio->bio.bi_opf & REQ_META) >>>>>> return btree_csum_one_bio(bbio); >>>>>> -#ifdef CONFIG_BTRFS_EXPERIMENTAL >>>>>> - return btrfs_csum_one_bio(bbio, true); >>>>>> -#else >>>>>> - return btrfs_csum_one_bio(bbio, false); >>>>>> -#endif >>>>>> -} >>>>>> - >>>>>> -/* >>>>>> - * Async submit bios are used to offload expensive checksumming on= to the worker >>>>>> - * threads. >>>>>> - */ >>>>>> -struct async_submit_bio { >>>>>> - struct btrfs_bio *bbio; >>>>>> - struct btrfs_io_context *bioc; >>>>>> - struct btrfs_io_stripe smap; >>>>>> - int mirror_num; >>>>>> - struct btrfs_work work; >>>>>> -}; >>>>>> - >>>>>> -/* >>>>>> - * In order to insert checksums into the metadata in large chunks,= we wait >>>>>> - * until bio submission time. All the pages in the bio are check= summed and >>>>>> - * sums are attached onto the ordered extent record. >>>>>> - * >>>>>> - * At IO completion time the csums attached on the ordered extent = record are >>>>>> - * inserted into the btree. >>>>>> - */ >>>>>> -static void run_one_async_start(struct btrfs_work *work) >>>>>> -{ >>>>>> - struct async_submit_bio *async =3D >>>>>> - container_of(work, struct async_submit_bio, work); >>>>>> - int ret; >>>>>> - >>>>>> - ret =3D btrfs_bio_csum(async->bbio); >>>>>> - if (ret) >>>>>> - async->bbio->bio.bi_status =3D errno_to_blk_status(= ret); >>>>>> -} >>>>>> - >>>>>> -/* >>>>>> - * In order to insert checksums into the metadata in large chunks,= we wait >>>>>> - * until bio submission time. All the pages in the bio are check= summed and >>>>>> - * sums are attached onto the ordered extent record. >>>>>> - * >>>>>> - * At IO completion time the csums attached on the ordered extent = record are >>>>>> - * inserted into the tree. >>>>>> - * >>>>>> - * If called with @do_free =3D=3D true, then it will free the work= struct. >>>>>> - */ >>>>>> -static void run_one_async_done(struct btrfs_work *work, bool do_fr= ee) >>>>>> -{ >>>>>> - struct async_submit_bio *async =3D >>>>>> - container_of(work, struct async_submit_bio, work); >>>>>> - struct bio *bio =3D &async->bbio->bio; >>>>>> - >>>>>> - if (do_free) { >>>>>> - kfree(container_of(work, struct async_submit_bio, w= ork)); >>>>>> - return; >>>>>> - } >>>>>> - >>>>>> - /* If an error occurred we just want to clean up the bio an= d move on. */ >>>>>> - if (bio->bi_status) { >>>>>> - btrfs_bio_end_io(async->bbio, bio->bi_status); >>>>>> - return; >>>>>> - } >>>>>> - >>>>>> - /* >>>>>> - * All of the bios that pass through here are from async he= lpers. >>>>>> - * Use REQ_BTRFS_CGROUP_PUNT to issue them from the owning = cgroup's >>>>>> - * context. This changes nothing when cgroups aren't in us= e. >>>>>> - */ >>>>>> - bio->bi_opf |=3D REQ_BTRFS_CGROUP_PUNT; >>>>>> - btrfs_submit_bio(bio, async->bioc, &async->smap, async->mir= ror_num); >>>>>> -} >>>>>> - >>>>>> -static bool should_async_write(struct btrfs_bio *bbio) >>>>>> -{ >>>>>> - struct btrfs_fs_info *fs_info =3D bbio->inode->root->fs_inf= o; >>>>>> - bool auto_csum_mode =3D true; >>>>>> - >>>>>> -#ifdef CONFIG_BTRFS_EXPERIMENTAL >>>>>> - /* >>>>>> - * Write bios will calculate checksum and submit bio at the= same time. >>>>>> - * Unless explicitly required don't offload serial csum cal= culate and bio >>>>>> - * submit into a workqueue. >>>>>> - */ >>>>>> - return false; >>>>>> -#endif >>>>>> - >>>>>> - /* Submit synchronously if the checksum implementation is f= ast. */ >>>>>> - if (auto_csum_mode && test_bit(BTRFS_FS_CSUM_IMPL_FAST, &fs= _info->flags)) >>>>>> - return false; >>>>>> - >>>>>> - /* >>>>>> - * Try to defer the submission to a workqueue to paralleliz= e the >>>>>> - * checksum calculation unless the I/O is issued synchronou= sly. >>>>>> - */ >>>>>> - if (op_is_sync(bbio->bio.bi_opf)) >>>>>> - return false; >>>>>> - >>>>>> - /* Zoned devices require I/O to be submitted in order. */ >>>>>> - if ((bbio->bio.bi_opf & REQ_META) && btrfs_is_zoned(fs_info= )) >>>>>> - return false; >>>>>> - >>>>>> - return true; >>>>>> -} >>>>>> - >>>>>> -/* >>>>>> - * Submit bio to an async queue. >>>>>> - * >>>>>> - * Return true if the work has been successfully submitted, else f= alse. >>>>>> - */ >>>>>> -static bool btrfs_wq_submit_bio(struct btrfs_bio *bbio, >>>>>> - struct btrfs_io_context *bioc, >>>>>> - struct btrfs_io_stripe *smap, int m= irror_num) >>>>>> -{ >>>>>> - struct btrfs_fs_info *fs_info =3D bbio->inode->root->fs_inf= o; >>>>>> - struct async_submit_bio *async; >>>>>> - >>>>>> - async =3D kmalloc_obj(*async, GFP_NOFS); >>>>>> - if (!async) >>>>>> - return false; >>>>>> - >>>>>> - async->bbio =3D bbio; >>>>>> - async->bioc =3D bioc; >>>>>> - async->smap =3D *smap; >>>>>> - async->mirror_num =3D mirror_num; >>>>>> - >>>>>> - btrfs_init_work(&async->work, run_one_async_start, run_one_= async_done); >>>>>> - btrfs_queue_work(fs_info->workers, &async->work); >>>>>> - return true; >>>>>> + return btrfs_csum_one_bio(bbio); >>>>>> } >>>>>> >>>>>> static u64 btrfs_append_map_length(struct btrfs_bio *bbio, u64 = map_length) >>>>>> @@ -806,10 +677,6 @@ static bool btrfs_submit_chunk(struct btrfs_bi= o *bbio, int mirror_num) >>>>>> if (!(inode->flags & BTRFS_INODE_NODATASUM) && >>>>>> !test_bit(BTRFS_FS_STATE_NO_DATA_CSUMS, &fs_= info->fs_state) && >>>>>> !btrfs_is_data_reloc_root(inode->root) && !b= bio->is_remap) { >>>>>> - if (should_async_write(bbio) && >>>>>> - btrfs_wq_submit_bio(bbio, bioc, &smap, = mirror_num)) >>>>>> - goto done; >>>>>> - >>>>>> ret =3D btrfs_bio_csum(bbio); >>>>>> status =3D errno_to_blk_status(ret); >>>>>> if (status) >>>>>> @@ -824,7 +691,6 @@ static bool btrfs_submit_chunk(struct btrfs_bio= *bbio, int mirror_num) >>>>>> } >>>>>> >>>>>> btrfs_submit_bio(bio, bioc, &smap, mirror_num); >>>>>> -done: >>>>>> return map_length =3D=3D length; >>>>>> >>>>>> fail: >>>>>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c >>>>>> index a1d83ad9a4c0..0046f3cb75a1 100644 >>>>>> --- a/fs/btrfs/disk-io.c >>>>>> +++ b/fs/btrfs/disk-io.c >>>>>> @@ -1776,7 +1776,6 @@ static void btrfs_stop_all_workers(struct btr= fs_fs_info *fs_info) >>>>>> if (fs_info->fixup_workers) >>>>>> destroy_workqueue(fs_info->fixup_workers); >>>>>> btrfs_destroy_workqueue(fs_info->delalloc_workers); >>>>>> - btrfs_destroy_workqueue(fs_info->workers); >>>>>> if (fs_info->endio_workers) >>>>>> destroy_workqueue(fs_info->endio_workers); >>>>>> if (fs_info->rmw_workers) >>>>>> @@ -1968,9 +1967,6 @@ static int btrfs_init_workqueues(struct btrfs= _fs_info *fs_info) >>>>>> unsigned int flags =3D WQ_MEM_RECLAIM | WQ_FREEZABLE | W= Q_UNBOUND; >>>>>> unsigned int ordered_flags =3D WQ_MEM_RECLAIM | WQ_FREEZ= ABLE; >>>>>> >>>>>> - fs_info->workers =3D >>>>>> - btrfs_alloc_workqueue(fs_info, "worker", flags, max= _active, 16); >>>>>> - >>>>>> fs_info->delalloc_workers =3D >>>>>> btrfs_alloc_workqueue(fs_info, "delalloc", >>>>>> flags, max_active, 2); >>>>>> @@ -2005,8 +2001,7 @@ static int btrfs_init_workqueues(struct btrfs= _fs_info *fs_info) >>>>>> fs_info->discard_ctl.discard_workers =3D >>>>>> alloc_ordered_workqueue("btrfs-discard", WQ_FREE= ZABLE); >>>>>> >>>>>> - if (!(fs_info->workers && >>>>>> - fs_info->delalloc_workers && fs_info->flush_workers &= & >>>>>> + if (!(fs_info->delalloc_workers && fs_info->flush_workers &= & >>>>>> fs_info->endio_workers && fs_info->endio_meta_work= ers && >>>>>> fs_info->endio_write_workers && >>>>>> fs_info->endio_freespace_worker && fs_info->rmw_wo= rkers && >>>>>> @@ -4437,19 +4432,6 @@ void __cold close_ctree(struct btrfs_fs_info= *fs_info) >>>>>> */ >>>>>> btrfs_flush_workqueue(fs_info->delalloc_workers); >>>>>> >>>>>> - /* >>>>>> - * We can have ordered extents getting their last reference= dropped from >>>>>> - * the fs_info->workers queue because for async writes for = data bios we >>>>>> - * queue a work for that queue, at btrfs_wq_submit_bio(), t= hat runs >>>>>> - * run_one_async_done() which calls btrfs_bio_end_io() in c= ase the bio >>>>>> - * has an error, and that later function can do the final >>>>>> - * btrfs_put_ordered_extent() on the ordered extent attache= d to the bio, >>>>>> - * which adds a delayed iput for the inode. So we must flus= h the queue >>>>>> - * so that we don't have delayed iputs after committing the= current >>>>>> - * transaction below and stopping the cleaner and transacti= on kthreads. >>>>>> - */ >>>>>> - btrfs_flush_workqueue(fs_info->workers); >>>>>> - >>>>>> /* >>>>>> * When finishing a compressed write bio we schedule a w= ork queue item >>>>>> * to finish an ordered extent - end_bbio_compressed_wri= te() >>>>>> diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c >>>>>> index 0fed4e0d32d5..7dbd9b8eec11 100644 >>>>>> --- a/fs/btrfs/file-item.c >>>>>> +++ b/fs/btrfs/file-item.c >>>>>> @@ -825,7 +825,7 @@ static void csum_one_bio_work(struct work_struc= t *work) >>>>>> /* >>>>>> * Calculate checksums of the data contained inside a bio. >>>>>> */ >>>>>> -int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async) >>>>>> +int btrfs_csum_one_bio(struct btrfs_bio *bbio) >>>>>> { >>>>>> struct btrfs_ordered_extent *ordered =3D bbio->ordered; >>>>>> struct btrfs_inode *inode =3D bbio->inode; >>>>>> @@ -849,10 +849,6 @@ int btrfs_csum_one_bio(struct btrfs_bio *bbio,= bool async) >>>>>> btrfs_add_ordered_sum(ordered, sums); >>>>>> >>>>>> bbio->csum_saved_iter =3D bio->bi_iter; >>>>>> - if (!async) { >>>>>> - csum_one_bio(bbio); >>>>>> - return 0; >>>>>> - } >>>>>> bio_inc_remaining(bio); >>>>>> INIT_WORK(&bbio->csum_work, csum_one_bio_work); >>>>>> schedule_work(&bbio->csum_work); >>>>>> diff --git a/fs/btrfs/file-item.h b/fs/btrfs/file-item.h >>>>>> index 6c678787c770..60a0eb17b3f6 100644 >>>>>> --- a/fs/btrfs/file-item.h >>>>>> +++ b/fs/btrfs/file-item.h >>>>>> @@ -64,7 +64,7 @@ int btrfs_lookup_file_extent(struct btrfs_trans_h= andle *trans, >>>>>> int btrfs_insert_data_csums(struct btrfs_trans_handle *trans, >>>>>> struct btrfs_root *root, >>>>>> struct btrfs_ordered_sum *sums); >>>>>> -int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async); >>>>>> +int btrfs_csum_one_bio(struct btrfs_bio *bbio); >>>>>> int btrfs_alloc_dummy_sum(struct btrfs_bio *bbio); >>>>>> int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start= , u64 end, >>>>>> struct list_head *list, int search_= commit, >>>>>> diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h >>>>>> index 3eba8438593c..203f7131f737 100644 >>>>>> --- a/fs/btrfs/fs.h >>>>>> +++ b/fs/btrfs/fs.h >>>>>> @@ -696,16 +696,6 @@ struct btrfs_fs_info { >>>>>> /* All fs/file tree roots that have delalloc inodes. */ >>>>>> struct list_head delalloc_roots; >>>>>> >>>>>> - /* >>>>>> - * There is a pool of worker threads for checksumming durin= g writes and >>>>>> - * a pool for checksumming after reads. This is because re= aders can >>>>>> - * run with FS locks held, and the writers may be waiting f= or those >>>>>> - * locks. We don't want ordering in the pending list to ca= use >>>>>> - * deadlocks, and so the two are serviced separately. >>>>>> - * >>>>>> - * A third pool does submit_bio to avoid deadlocking with t= he other two. >>>>>> - */ >>>>>> - struct btrfs_workqueue *workers; >>>>>> struct btrfs_workqueue *delalloc_workers; >>>>>> struct btrfs_workqueue *flush_workers; >>>>>> struct workqueue_struct *endio_workers; >>>>>> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c >>>>>> index 464129b1b0d4..54f2da47c567 100644 >>>>>> --- a/fs/btrfs/super.c >>>>>> +++ b/fs/btrfs/super.c >>>>>> @@ -1237,7 +1237,6 @@ static void btrfs_resize_thread_pool(struct b= trfs_fs_info *fs_info, >>>>>> btrfs_info(fs_info, "resize thread pool %d -> %d", >>>>>> old_pool_size, new_pool_size); >>>>>> >>>>>> - btrfs_workqueue_set_max(fs_info->workers, new_pool_size); >>>>>> btrfs_workqueue_set_max(fs_info->delalloc_workers, new_p= ool_size); >>>>>> btrfs_workqueue_set_max(fs_info->caching_workers, new_po= ol_size); >>>>>> workqueue_set_max_active(fs_info->endio_workers, new_poo= l_size); >>>>>> -- >>>>>> 2.55.0 >>>>>> >>>>> >>>> >> >=20