From patchwork Sun Nov 28 05:52:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 12642775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EC02C433F5 for ; Sun, 28 Nov 2021 05:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232179AbhK1F6i (ORCPT ); Sun, 28 Nov 2021 00:58:38 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:35610 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232434AbhK1F4g (ORCPT ); Sun, 28 Nov 2021 00:56:36 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8C18021639; Sun, 28 Nov 2021 05:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1638078800; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uvC8nQa6w+nEdJ1prtfmpQgHUacFxgCpjBjtbrUKVMU=; b=tSRK0nHd0vLUNHsjf0tMYEvjM6Rm/RLsYBGPCkW1QZJ2sRZ9yVrX6EYUl81nyUoYrXQrjc +zmchniJ1BqPEynFsObuO+PXOLjj4o/IAaDnuMcInrLCBPZwBeju/KUFQocl9CmbavXBWu 5/0n5RQqgq/siq3qKJKlLSswRadx+RY= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3003913446; Sun, 28 Nov 2021 05:53:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uG+WAE8Zo2G7fAAAMHmgww (envelope-from ); Sun, 28 Nov 2021 05:53:19 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Cc: linux-block@vger.kernel.org, dm-devel@redhat.com Subject: [PATCH RFC 01/11] btrfs: update an stale comment on btrfs_submit_bio_hook() Date: Sun, 28 Nov 2021 13:52:49 +0800 Message-Id: <20211128055259.39249-2-wqu@suse.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128055259.39249-1-wqu@suse.com> References: <20211128055259.39249-1-wqu@suse.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org This function is renamed to btrfs_submit_data_bio(), update the comment and add extra reason why it doesn't completely follow the same rule in btrfs_submit_data_bio(). Signed-off-by: Qu Wenruo --- fs/btrfs/inode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 91f7ed27e421..91c59b6e279d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8197,7 +8197,13 @@ static inline blk_status_t btrfs_submit_dio_bio(struct bio *bio, bool write = btrfs_op(bio) == BTRFS_MAP_WRITE; blk_status_t ret; - /* Check btrfs_submit_bio_hook() for rules about async submit. */ + /* + * Check btrfs_submit_data_bio() for rules about async submit. + * + * The only exception is for RAID56, when there are more than one bios + * to submit, async submit seems to make it harder to collect csums + * for the full stripe. + */ if (async_submit) async_submit = !atomic_read(&BTRFS_I(inode)->sync_writers);