Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1661487pxu; Thu, 17 Dec 2020 15:46:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzK9TLNBycj5hSnP5lIwxih4JEv3gMjSRgW3NINXvtNVEFZWM8bO4MEdvQCAT0XvmlA3Mpb X-Received: by 2002:a50:e0ce:: with SMTP id j14mr1894981edl.18.1608248818511; Thu, 17 Dec 2020 15:46:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608248818; cv=none; d=google.com; s=arc-20160816; b=WzQx130MoeflOIEyvFQghNFILEx2xbTDTlBo10VaCqGJHhtcqNNp9BXy5bHfOiMObd BB2/rfDvZocy3TeCXQwiwPfogeflxYL2ISRvpNJRYZcjMRSAITqg5Ag2Hb7Yd5qHdUUo UeGb1reRN3yuzL/RHwdUB6yUmL/zl6vBf9gxuA4pEGecNzPGdWSVf0Qp8dbFNLHrZxZP +vV7LpISZWsgMCNEYPU3fDIO3lQaiqzyist9yBSkwJWxjV8DgMiUxIqrgQQEoFS2qMCf 5IfDiyc+240Iul1P3psxmfnnEPxM3tc4Vp/AXoP3uXtojWky8WMfXNE6uJASPEAMpLcf 87OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Vbz3zFCtCF18eH8Wh4CcqPj8B9UhYGmOgUNAu7zs1vE=; b=qeUVXlgNAUHjY1Btl0FgZ/hURyknSPaI2dGGFDI7ucGMmZdwelgM4jbXvS4fsZTKqa N6bJLd/CYUnZllRB6OnaCTT5Pa/mgE2sN6MWC7+Y3SUvDLruY7hnx7/cLxg5QYVE9yPX baXpWDDD3Jph26PdQae4ZbneeYieGcCCjRYizbtQ+90HF78dV07vNizzMK81Q31H3wPV aJGdQSQFXesOLW6Q2tV60C3EVo21EZIjqEo/3Qx39QBZoDYTcpUA+n/qzHe2h2Hzo2Hm eyiS6ii/kFPBz7D3eqzSGFjqq4ukcO7C6d1kT8oymabZPj4NqisqTGiN6btTwhgxUFSM B7iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=lEQ2sYrh; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ly25si3692440ejb.326.2020.12.17.15.46.30; Thu, 17 Dec 2020 15:46:58 -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=@oracle.com header.s=corp-2020-01-29 header.b=lEQ2sYrh; 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=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727138AbgLQXds (ORCPT + 99 others); Thu, 17 Dec 2020 18:33:48 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:59550 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgLQXds (ORCPT ); Thu, 17 Dec 2020 18:33:48 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BHNV3da148336; Thu, 17 Dec 2020 23:33:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=Vbz3zFCtCF18eH8Wh4CcqPj8B9UhYGmOgUNAu7zs1vE=; b=lEQ2sYrhP4LQlp8fhHvTKksB+gxaIeJTY366AGvtL5qlaPGchgPuz1Xj1MJHp9UqNVbg 2jiZInuwCzDkeY0DV1LgWg4OB+IkAPigfsTlBNzD9r9cRt+ehh15EsQMR5d/Wa96dEIY gEPzpmioz8U3wPqjA83FduWLChSEMMotiIW2+rGycftHt6eGgChfgwYEiC527t/QDsCK huc07KW1aIoQexFWnnM0sdRnqVUA5dkAsCeZ9Y6XsFS+kCBIkzAHI0RV8/QuHxtaLxwQ s5Q9peI2vWImmJj5dtXLVKejXNV36Qin974NPiotEejUrxfLRDv3L8uRrP/UIEGysQZi Cw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 35cn9rr113-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Dec 2020 23:33:00 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BHNLL28088410; Thu, 17 Dec 2020 23:31:00 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 35e6eu0mdt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Dec 2020 23:31:00 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0BHNUwY6030600; Thu, 17 Dec 2020 23:30:58 GMT Received: from localhost (/10.159.157.202) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 Dec 2020 15:30:58 -0800 Date: Thu, 17 Dec 2020 15:30:56 -0800 From: "Darrick J. Wong" To: Saranya Muruganandam Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, Wang Shilong Subject: Re: [RFC PATCH v3 37/61] e2fsck: merge options after threads finish Message-ID: <20201217233056.GA6908@magnolia> References: <20201118153947.3394530-1-saranyamohan@google.com> <20201118153947.3394530-38-saranyamohan@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201118153947.3394530-38-saranyamohan@google.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9838 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012170150 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9838 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 clxscore=1011 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 mlxscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012170151 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Nov 18, 2020 at 07:39:23AM -0800, Saranya Muruganandam wrote: > From: Wang Shilong > > It will be possible that threads might append E2F_OPT_YES, > so we need merge options to global, test f_yesall cover this. I don't get it -- presumably fix_problem already has to take some sort of a lock to complain the console and (possibly) wait for input, right? Why not just set E2F_OPT_YES right then and there and have it take effect across all threads immediately? I guess you'd have to add another lock to protect the options bitflags. --D > Signed-off-by: Wang Shilong > Signed-off-by: Saranya Muruganandam > --- > e2fsck/pass1.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c > index ad3bd8be..1a68a2fb 100644 > --- a/e2fsck/pass1.c > +++ b/e2fsck/pass1.c > @@ -2935,6 +2935,7 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx > ext2_refcount_t ea_inode_refs = global_ctx->ea_inode_refs; > ext2fs_block_bitmap block_found_map = global_ctx->block_found_map; > ext2fs_block_bitmap block_dup_map = global_ctx->block_dup_map; > + int options = global_ctx->options; > > #ifdef HAVE_SETJMP_H > jmp_buf old_jmp; > @@ -2987,7 +2988,8 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx > global_ctx->fs_fragmented += fs_fragmented; > global_ctx->fs_fragmented_dir += fs_fragmented_dir; > global_ctx->large_files += large_files; > - > + /* threads might enable E2F_OPT_YES */ > + global_ctx->options |= options; > global_ctx->flags |= flags; > > retval = e2fsck_pass1_merge_fs(global_fs, thread_fs); > @@ -3022,10 +3024,7 @@ static int e2fsck_pass1_thread_join_one(e2fsck_t global_ctx, e2fsck_t thread_ctx > thread_ctx->qctx); > if (retval) > return retval; > - global_ctx->invalid_block_bitmap_flag = invalid_block_bitmap_flag; > - global_ctx->invalid_inode_bitmap_flag = invalid_inode_bitmap_flag; > - global_ctx->invalid_inode_table_flag = invalid_inode_table_flag; > - global_ctx->invalid_bitmaps = invalid_bitmaps; > + > e2fsck_pass1_merge_invalid_bitmaps(global_ctx, thread_ctx); > > retval = e2fsck_pass1_merge_bitmap(global_fs, > -- > 2.29.2.299.gdc1121823c-goog >