Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp182110rdb; Mon, 15 Jan 2024 17:33:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGkmOE4PCCdCOnFZrfrnrl92tjZ2tQK6rR0hzA5e/kJ0PF9VQeEpnEfzd6WbZFvvQd+dTib X-Received: by 2002:a05:6402:4314:b0:559:69ab:9bd8 with SMTP id m20-20020a056402431400b0055969ab9bd8mr939676edc.14.1705368831184; Mon, 15 Jan 2024 17:33:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705368831; cv=none; d=google.com; s=arc-20160816; b=jQ69tb6TBIhRnk6TZyLMhJfEWgVC2AqC4lcvUWcXZPJZ0kB4dzi/1h+fL3OfHoYZMh AeKBFvBb9+B6XXrr+i+X4VOfCAFLtcySvy6eAQ9F4yKyWEzR0iXnOjk2BE8xQbqD1Y7v Cts/1r1wrLjbrgXbs3oI99dwAqoVS3kMtU+tF8L3QPxGOFI+qnKxMVlbCpcd7EXs6EHQ 6DuZE9eifMAAStWKcoAO443hvXCib4hbnsjD/+6cL3aPKoMIatLuvqL/OXo6pDYu1H1R eRG3kG0Xh2kxHp2FgYRERYCXfaoZBU11E/n2GcudhbY+ubCehHq7kNvEjvGiV0Gfbkjx Z2+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8KgB3qtiWEPabKza2jGh8AM+EFGNSoOuxM6bPwGHRLk=; fh=nfltf0+hNezquMWkxd9RllESLqzkImd+o2QJQhSH/YQ=; b=CCTEyJr1ayBbRhOzi+UqQoBkNhJIkLfKA7rW0zrjVYlZwcWpvxg9C8MUmV0J1ig62x A6UmIGHuz91bEFS1RKSbPbwUSgj6rij76KjHvyyDWUgumaGwYZ7LCFJNJLXW1nyfJI2q nd+dGRkxMgyxT3eJBMO6kvhByms25r/XVBnPWjAyf+p1tZRU7G3SFbFFiKzs+8GxnW7i OvQrXYp0w3DHe2bN9SpXjROYvGRpl6F0I8NbkV47A04SQFe4V0hM7XeNhXBcb+6tnQ15 VCFUP4UOaz7qKobdcgm5mUYCKoqHu963SPy4LrVZoe6ejYN2LsXufNGEa4rFBZqRWJdX euBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vLoNGo3I; spf=pass (google.com: domain of linux-ext4+bounces-804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-804-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d7-20020a056402078700b00557b16ec36fsi4264283edy.175.2024.01.15.17.33.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:33:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vLoNGo3I; spf=pass (google.com: domain of linux-ext4+bounces-804-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-804-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CD2881F23742 for ; Tue, 16 Jan 2024 01:33:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B6CB241FA; Tue, 16 Jan 2024 01:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vLoNGo3I" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 00E0D24A10; Tue, 16 Jan 2024 01:07:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E33BCC433C7; Tue, 16 Jan 2024 01:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705367220; bh=zXa4LyVd3UZiy2Gz3ObZH1AGFuiXyPj00HeDJ2hGV9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vLoNGo3IvhDSXOubSVYRNq7EUnvnkbmVsyW+t72Ts0AR/xHLw7Iynm18omOjOjOvD D0n8Wu8FAvQDSYCiFd0jsB5bDOr3diorAPVGzU/S/XcD4QIbGIOmKQPuTnJCjYVgml eZPcxVpfDJ9NQuIZDiS0t5bvfT+dL15NzBZV/85TK85CK+PNRAOOTRTWP8Jgs9wXtp ELUejuwDJrqzcAz5hSUqzRuTdqzpgMd71NyEACu66qzvhtLeNtYPZNqUnPSIYdDKGr nktHunXRSy5cBJzukI2fOHNThUs24IN1JcZLBZoFNHCL8BRreRR/UTd0OgNxq+XaGI 92gIq7Fyga0xw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ojaswin Mujoo , Ritesh Harjani , Theodore Ts'o , Sasha Levin , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 08/14] ext4: enable dioread_nolock as default for bs < ps case Date: Mon, 15 Jan 2024 20:06:10 -0500 Message-ID: <20240116010642.218876-8-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240116010642.218876-1-sashal@kernel.org> References: <20240116010642.218876-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.73 Content-Transfer-Encoding: 8bit From: Ojaswin Mujoo [ Upstream commit e89fdcc425b6feea4dfb33877e9256757905d763 ] dioread_nolock was originally disabled as a default option for bs < ps scenarios due to a data corruption issue. Since then, we've had some fixes in this area which address such issues. Enable dioread_nolock by default and remove the experimental warning message for bs < ps path. dioread for bs < ps has been tested on a 64k pagesize machine using: kvm-xfstest -C 3 -g auto with the following configs: 64k adv bigalloc_4k bigalloc_64k data_journal encrypt dioread_nolock dioread_nolock_4k ext3 ext3conv nojournal And no new regressions were seen compared to baseline kernel. Suggested-by: Ritesh Harjani (IBM) Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20231101154717.531865-1-ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/super.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 601e097e1720..93ede89baeca 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2722,15 +2722,6 @@ static int ext4_check_opt_consistency(struct fs_context *fc, return -EINVAL; } - if (ctx_test_mount_opt(ctx, EXT4_MOUNT_DIOREAD_NOLOCK)) { - int blocksize = - BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); - if (blocksize < PAGE_SIZE) - ext4_msg(NULL, KERN_WARNING, "Warning: mounting with an " - "experimental mount option 'dioread_nolock' " - "for blocksize < PAGE_SIZE"); - } - err = ext4_check_test_dummy_encryption(fc, sb); if (err) return err; @@ -4345,7 +4336,7 @@ static void ext4_set_def_opts(struct super_block *sb, ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0)) set_opt(sb, DELALLOC); - if (sb->s_blocksize == PAGE_SIZE) + if (sb->s_blocksize <= PAGE_SIZE) set_opt(sb, DIOREAD_NOLOCK); } -- 2.43.0