Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp415260pxb; Wed, 18 Nov 2020 07:44:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmEQtMyHfnnFRy0XDaAbcmLTgrFrbr4SWJqMMLXwHi4o28CkZMdlZlKam639ewiTu9viw3 X-Received: by 2002:a17:906:d931:: with SMTP id rn17mr24082121ejb.308.1605714274632; Wed, 18 Nov 2020 07:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605714274; cv=none; d=google.com; s=arc-20160816; b=bZpkg5vhJ4xqk2vMjxYCCidNOsRs41CjADVzRXiXSkvGBkPh4FCEENCmodPzGDriPU o5+90mjL+gQFuatOpS1B5ssA4fbL4HQy3UkleZIKE+TW0pfjhVpR3TEKybBCR7zuRtSO 1qGokegIxyz5ErYd6BGm1TD4Dj1wjFD0jlbWAQrd3HNYM9zbrdH2XvlmlpYbrCdKMFUr 8ZfnXb4dc/yMLgJ3e5V6zL/1eZg7tmIP592icZD/zSLBO9lOuTj520JEGQLygYre+vLh npQq3UhGDeZtiJD1nv4XtviV8vaz3786nhmPp65XgVJJB5WtM1Y5UXRTAh76MvbzdHy2 C8Ig== 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=TgxfBleuwBbiJ7V0ZDGA7yS/l34SxlrP250dNmU9++8=; b=B8TV+/lZhL2qJx503s7xErfLD1MMwinl2yujcfH5d8RAGHL/B+nMQU+fyrPTfeEbic n2tIloj0yCTK6uPnkG/YmvYPdFlw4GovUbtBhOaSCILt1MrG2PMQXesF4Wv/OkuT2WJV oLq9h36xoXQhYR7ixXmYT+2v0S+iL1KBZd6kb/nPut9jaLkpJhaF043KX+JmaetYVSLP XUNZpJ1IMqbt7f+wa/lt3QE3o2UQS7LaG19OIP8HCzJmZK5bQ7sf/HNU/7xwi8Zwb87r eKFzn3xr+ePearjQbtHy84b2yva4M5BNZDj+6EoY7I6f5H5jQ9QkLoPQ2O0twPvfuvCa 5tfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Xl/oPQbh"; 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 u12si2571854edp.98.2020.11.18.07.44.10; Wed, 18 Nov 2020 07:44:34 -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="Xl/oPQbh"; 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 S1727629AbgKRPmU (ORCPT + 99 others); Wed, 18 Nov 2020 10:42:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727398AbgKRPmU (ORCPT ); Wed, 18 Nov 2020 10:42:20 -0500 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1818FC0613D4 for ; Wed, 18 Nov 2020 07:42:20 -0800 (PST) Received: by mail-pf1-x44a.google.com with SMTP id r6so1425187pfg.4 for ; Wed, 18 Nov 2020 07:42:20 -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=TgxfBleuwBbiJ7V0ZDGA7yS/l34SxlrP250dNmU9++8=; b=Xl/oPQbhi6gbyqrHnE17F2l4yTLlEIK2hoomXsbGA3scog68er50CI5e57yewMtZyn P2QSePYFFfQkGI4g/ER+ph5u1B2O5uVnrvLCp5WREbUT91KbVF1/n9sFNQN7ItVApMD4 JRj4zpFhxgpSLVXrYXvoDhesnUpboihORzeQ9WH22E3PNkj7g7cQ8LZQcrx5cMinI2lf flFuTdrM2nHPMvAJmZy1fkwjOqgeXkH77fL/nyJCdrlV66DxO07rojiMBOWW9nTCqsK5 eFgazpnUrXaj4Gm2tTIL8TCf+Ji+vV52pH1WpTNbsN7PsG/fyMqYnDzenpphd6zKBu1D 1Dgw== 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=TgxfBleuwBbiJ7V0ZDGA7yS/l34SxlrP250dNmU9++8=; b=Vf1GBdUb+oBWG+iDcJOY+sMmQd222oepBsQzil8+ztw2LSvUoRr76qphmVFFfqc2MW X9qR+F8T9FOwawvyAmW90vKIJBsatcKFvT19d6RyolRlnpQTKpXMD68XgfFTsWL70C6Q YUUvQbXca+N0egw0Yogvo3y+IGeR9o6xvQKfIYMQbDkisFEV707I4fcXPrWJLubxmAje TjGx2gkdVG8b+pIZM7V65mYGOt4VGeRG7tff/Br0i7EGKBCbPzK/PfnDiV3sTCVy50EV w8N9Lfy5g+6wDeJKJBl2ARARvW15/G2KvJEyrJMDweE63Y87TXI/4QoqUpZS7BZ6EWxc Usgw== X-Gm-Message-State: AOAM531VmOYTBYlaaVkvGITTH7+qjl4GXi2XGwVhI28MsV3RK2dSUjS9 +sDhpPhqoA7H/6rLhaDsEzTULsnL+N2bVWpF4BqNgo6Y2tRuPa56vZQpLVbj8KEPJO6NqV9Y+IU MDSvqdhQeCLx0kBUgefLW3USl7BmQUlc+5a1b8WYfiJN+OPaUq1bZ/N2jZqWWXRve4q2raY1pkK A//+lTm9A= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([100.116.76.178]) (user=saranyamohan job=sendgmr) by 2002:a17:90b:e04:: with SMTP id ge4mr46609pjb.0.1605714139152; Wed, 18 Nov 2020 07:42:19 -0800 (PST) Date: Wed, 18 Nov 2020 07:39:46 -0800 In-Reply-To: <20201118153947.3394530-1-saranyamohan@google.com> Message-Id: <20201118153947.3394530-61-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 60/61] e2fsck: propagate number of threads From: Saranya Muruganandam To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: adilger.kernel@dilger.ca, Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Sometimes, such as in orphan_inode case, e2fsck_pass1 is called after reading the block bitmaps. This results in reading the block bitmap sequentially and multithreading only gets kicked in later. Fix the thread count earlier while setting up the file system. Signed-off-by: Saranya Muruganandam --- e2fsck/unix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2fsck/unix.c b/e2fsck/unix.c index bebc19ed..a2c6a178 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1729,6 +1729,9 @@ failure: ctx->fs = fs; fs->now = ctx->now; +#ifdef CONFIG_PFSCK + fs->fs_num_threads = ctx->pfs_num_threads; +#endif sb = fs->super; if (sb->s_rev_level > E2FSCK_CURRENT_REV) { -- 2.29.2.299.gdc1121823c-goog