Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp415104pxb; Wed, 18 Nov 2020 07:44:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrfgr0Iot5v6wCyVr6YC2+Zd5FtNfqErDG8Q5W4ANRfzAlQIYcTvhnSAhBcC0V3+kBz1W4 X-Received: by 2002:a05:6402:1f0:: with SMTP id i16mr26178533edy.122.1605714257887; Wed, 18 Nov 2020 07:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605714257; cv=none; d=google.com; s=arc-20160816; b=0p7lbF8PVog7HAZOmZFg4EHVSWRZMEraDjx/1MkIIe8HOld3skj5NAvbOtoiFybdlW hYJHOiPUHQ6VMCCZdGaa0vQDIsn3StCB1lyPng4vw3ryg9Fr0aHV7DRA949Fe02Z+6Py cHmzIaqrr+4491f0QH+xzht9AVxaGDLD+IXrMAoa+HAWf5jYYkPClDTmUCNs1spQV5c5 BB+lf7XluACs+6Dv2cUFYzX7jZNkKEtOe6SbRudWHe8RhKVOfjhv8Rqk37pPK9YL5CRN b57Qaz1NgqT+6csovTu7uX2qbLzIRor+cLBZIg4SRDNifD21EatqBY/QElqQ5Sw3JyHd RntA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=6IeNjD+JbZWYlVnUDIDclFUs22c3oVDKirYNwy4hr2M=; b=BLo4opmLY2LMB1NVXiQwIbZxQTnzXjho6z2iOQdurVCF1EPsqkWQ0lyRmusgGu4G37 kW68V3/W16l+OYq1UwaEp0BxI+3j6z9lwaF5814nkXro9plbBd6ZUVwotC8VTPZB0RjK WyxX2EXxntBiFNDw820g9RcTmTrnwcnLYTVmh6DXM/4GOZYRXVXOTU4ODEYRAT/MaaDE dTq0z486yzIm6NGXhtYwp8HjI9ehXcmaX7zxHcSKuDJDJsNENBz0fZuWVDxkHcerfz6W I4z4cDvN3zutIcs5Af0I1pg4UTvyNLDlpKp1rHkF4gKU5TA8gkRpgGds4dQOAUnzplEJ i5sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DYfUx3kp; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qn24si15413723ejb.680.2020.11.18.07.43.54; Wed, 18 Nov 2020 07:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DYfUx3kp; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727460AbgKRPmO (ORCPT + 99 others); Wed, 18 Nov 2020 10:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbgKRPmK (ORCPT ); Wed, 18 Nov 2020 10:42:10 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F06CC061A4D for ; Wed, 18 Nov 2020 07:42:10 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id h9so2932148ybj.10 for ; Wed, 18 Nov 2020 07:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=6IeNjD+JbZWYlVnUDIDclFUs22c3oVDKirYNwy4hr2M=; b=DYfUx3kpNmLUUozvKg+jllUuffkVzXz6e3G6nLUHL+uB/3tCfo23jtvrPgq2WUXzi4 yRkSTCqZ6zrMkvlINLISX6ue6XgKz6gfzVf3ch0tBBC+fv+eOvJ7rArT1DOqtpH0g5U8 bFsII9Lwa7ZUMGdF0CBTeNz9zPTtxPMQekyjuyewFH/D8f1hlxpQRd/IMuShSTXosrzA Kv1zUmyl1FtkY7t7+HfzWrqTwGv2OqipSy+6HrPx7I9XuTZQCFfJj1Gpe1gdDx2fs+2Z HB5BXHE/i7hqDkmpPdMtSNUu9+d4M4ag+36mSL35MoVJLxeW7/Og3Rhm78oW+Cm4oUO2 nYJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=6IeNjD+JbZWYlVnUDIDclFUs22c3oVDKirYNwy4hr2M=; b=tmTZ36M4l7MEqWTsoG+ArqJ5fDaiTqjYa8DoO7C1lFDZjCW25VRK2BSpwlhNegUKa9 qRHRuwHUSTm/jpjWDk9pye4lOkjOluKNLeIUZOptDzhhMhXk/68RqJ+0bHRu4JO1seab kusbgTDe+D7M2eWasY11PIx/k3z3KL3rRRoHaah8ZwaapDf/5ORHb9X+cW3dccgl5vES D9g7XLQuKnIHh8lQQyHLAQ4KS2WSR5A0MIk2vBHdWBM6iyap0AW5zTEwmKdOp8NcCMEJ u/RSV6mZbKnjXHbXxh49mqWmll41qCRGWgMKXMH/tYuvzcYHjW1OUnPnwai3z8rBxquK iZqQ== X-Gm-Message-State: AOAM533B8vf8c+UPwjFttedcW/Cg0T0vwOnbMaGZGHKboK25nGWSvFB/ sKoHjG/Sk5i28UoFUTwhnx63z6yR2a6tyjZXwGgXiciBOiKkwmrAHPk0KLxFwllfY6XlLjvoC6x CML9b7nw8gRJwtIMJ7k9F45wy22CHqj6xam0CpuOF1mRFo7SMvp8fh9IaEyPkfNLLj45rYryMWq ldlE04Ago= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([100.116.76.178]) (user=saranyamohan job=sendgmr) by 2002:a5b:b45:: with SMTP id b5mr7588636ybr.355.1605714129778; Wed, 18 Nov 2020 07:42:09 -0800 (PST) Date: Wed, 18 Nov 2020 07:39:41 -0800 In-Reply-To: <20201118153947.3394530-1-saranyamohan@google.com> Message-Id: <20201118153947.3394530-56-saranyamohan@google.com> Mime-Version: 1.0 References: <20201118153947.3394530-1-saranyamohan@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [RFC PATCH v3 55/61] e2fsck: fix readahead for pass1 without pfsck From: Saranya Muruganandam To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: adilger.kernel@dilger.ca, Wang Shilong , Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Wang Shilong If admin try fsck without -m option, codes try old behavior, thread information won't be inited either. @et_group_end is 0 thus readahead for pass1 will be totally disabled. With the patch applied, we could get same performance number without pfsck as before. Signed-off-by: Wang Shilong Signed-off-by: Saranya Muruganandam --- e2fsck/pass1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 3899d710..70826866 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -1100,7 +1100,8 @@ static void pass1_readahead(e2fsck_t ctx, dgrp_t *group, ext2_ino_t *next_ino) errcode_t err = EXT2_ET_INVALID_ARGUMENT; #ifdef CONFIG_PFSCK - grp_end = ctx->thread_info.et_group_end; + if (ctx->fs->fs_num_threads > 1) + grp_end = ctx->thread_info.et_group_end; #endif if (ctx->readahead_kb == 0) goto out; -- 2.29.2.299.gdc1121823c-goog