Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1666304rwb; Mon, 7 Nov 2022 04:31:15 -0800 (PST) X-Google-Smtp-Source: AMsMyM4TBqQhmpwmXHoko3Ycxv8GtyCz/rFw5X+AuBnQw+7BxNNefC3YxyCsaDAZm7mwVH+0Hrhx X-Received: by 2002:a50:ef06:0:b0:463:2605:d24d with SMTP id m6-20020a50ef06000000b004632605d24dmr44965638eds.43.1667824275065; Mon, 07 Nov 2022 04:31:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667824275; cv=none; d=google.com; s=arc-20160816; b=BrgRzVkwuUwzT0FIGjvbm0oDVBE2/9zH1uriia4x9WiskHO/Fvl87STLMqBgyzc2Dh /sGBYH1TyjFYaelVmlh+A2vDzjO5V2ikX18I4jBkmKVs9OMljvWLhccwrlC4IujddRo2 p4WF/swmGIfzcr+tQYxeNaQXujRgJOA52dgXwAzlo/t+OI9AVwi8mI28a/MCfiXgJLG4 ljH4ONMn4NNS8iU4aHBDAlZ/SDaCltbTFnLR0570/RgQXYDrDpIoKw0Jc7KkN/s2Ucov f7c81huLNxVVDE6mQkQXkZKD/QF5YzEK/MlMzqCSYlwHx0Z1mA274IDSlrXyY2wQKSDR t2Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZW6y/QZcxmvZCTvnr9AhcCkA/wkdGYiX//7dn8rWZ28=; b=UAe5RUghTWKAc+MpeZ1S0Pi54C5O1ryh0IbbXYtaLAFMIZnHOks33bSY58DdmT4z63 flJEDUU5ANuDi/40HIA1sUsIl97dJNNGGh+AcZp8ACsmNJS7iumbUpTAkLTuEAz/j3C5 T5IKrjvVnmmGlz6XwyB9A3vsHS9Y6C6RtImglUTOR9wKV00StNQqDTvTeRQYC54ehcVl Afqfa4Bvt+PnzO4vI80/SiES9c+88aSnKDq0SYsOMzwDVD6lsfVh9ESwCFprBrfxdnT7 Z4Pj54UIW6gl+wMG+j1egy9BnaK1hp56q0HVslO7/YGRTM3el8kLsyymlhI3+MxZb6AI WLuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IhrE6Lsh; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a1709063b8200b007429f0c69ccsi7349727ejf.579.2022.11.07.04.30.51; Mon, 07 Nov 2022 04:31:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=IhrE6Lsh; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232181AbiKGMar (ORCPT + 99 others); Mon, 7 Nov 2022 07:30:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232298AbiKGM3C (ORCPT ); Mon, 7 Nov 2022 07:29:02 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 396F91038 for ; Mon, 7 Nov 2022 04:29:02 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id b185so10452183pfb.9 for ; Mon, 07 Nov 2022 04:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZW6y/QZcxmvZCTvnr9AhcCkA/wkdGYiX//7dn8rWZ28=; b=IhrE6LshpY0kCaNyJT9iNbBFJvfo7qiRUhmcjTqlyJjob47horGomCIcY+ztL6GZsB wy6ay6dHHIeQugNCX0oFgok4SAKgGgGHvW7yE+6cVV12ZOCFdoVlMeuSFb5popdt3k0C w3gmACEjlRdYQtYpGUsnkTHgKXQiXuwCV2c7gb6SP4klEhzz+1VFyrKD92j4mDvpd+sj ZovBrvC/yMxwEsL7AdgxXk8Blmzzh4W8ipQR6HdX+Z1pYfDRAWo6+mhJlYJmSwrp6dSV FEBKuiyCUTkmwh1d7OcAaYrfX6WXkQTFC4mYueyN2aaXjX57DUctU+Bm4kfrvhD0ruQh UBIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZW6y/QZcxmvZCTvnr9AhcCkA/wkdGYiX//7dn8rWZ28=; b=2Oigkv22mq59eE2ZOvhvvZkqaG40Q6NPUy14uF815WcYgwd0VNl404Xfh/rto/U5WG q0DS9nZkLOE1onywTaJxhzPMt2O+K2/YJwzW7DLZ9iHfoLIy+dQIYchMMndOcnMW5ias m0uIpoQ93SdbQGXBOq9ctQVtvTooaPKXOin+dMhqYdKSRMl+7kJ9S9OBgGDecHRiwpbm Ls7dra447++8vwSDORgXRSIIFwf67AL4TD5SM0EzSLcae6XVy79NJ/J8Vl54QIgXR/yD ZwlCIPDXRt1f6uUOw/RN/bFxbAbwIIZoE3SEEmZ6aczZPo1A6TUYQDQOIOqp9zC0/e4e +5eQ== X-Gm-Message-State: ACrzQf07LVuxovnaf7BEa0Esp35pHOIv+VxrMiUQxnGVlE+fS5PypnY4 A0jXOEBXklYBz09ls6AbxX7rtB8etTk= X-Received: by 2002:a63:c04b:0:b0:46f:c183:242d with SMTP id z11-20020a63c04b000000b0046fc183242dmr34938582pgi.287.1667824141704; Mon, 07 Nov 2022 04:29:01 -0800 (PST) Received: from localhost ([2406:7400:63:f20b:312d:45b2:85c1:c486]) by smtp.gmail.com with ESMTPSA id e18-20020a056a0000d200b0056c5aee2d6esm4380740pfj.213.2022.11.07.04.29.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 04:29:01 -0800 (PST) From: "Ritesh Harjani (IBM)" To: Theodore Ts'o Cc: linux-ext4@vger.kernel.org, Harshad Shirwadkar , Wang Shilong , Andreas Dilger , Li Xi , Saranya Muruganandam , Ritesh Harjani Subject: [RFCv1 65/72] e2fsck: Annotating fields in e2fsck_struct Date: Mon, 7 Nov 2022 17:51:53 +0530 Message-Id: <17fb23e236be36b22ca578def6d5efeadfba2d0c.1667822612.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Saranya Muruganandam Adding information on fields in e2fsck_struct on how they are used when running parallel fsck. Signed-off-by: Saranya Muruganandam Signed-off-by: Ritesh Harjani (IBM) --- e2fsck/e2fsck.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/e2fsck/e2fsck.h b/e2fsck/e2fsck.h index 33866316..1e82b048 100644 --- a/e2fsck/e2fsck.h +++ b/e2fsck/e2fsck.h @@ -285,7 +285,7 @@ struct e2fsck_thread { struct e2fsck_struct { /* Global context to get the cancel flag */ e2fsck_t global_ctx; - ext2_filsys fs; + ext2_filsys fs; /* [fs_fix_rwlock] */ const char *program_name; char *filesystem_name; char *device_name; @@ -294,7 +294,9 @@ struct e2fsck_struct { char *log_fn; FILE *problem_logf; char *problem_log_fn; - int flags; /* E2fsck internal flags */ + /* E2fsck internal flags. + * shared by different threads for pass1 [fs_fix_rwlock] */ + int flags; int options; unsigned blocksize; /* blocksize */ blk64_t use_superblock; /* sb requested by user */ @@ -314,6 +316,7 @@ struct e2fsck_struct { int (*progress)(e2fsck_t ctx, int pass, unsigned long cur, unsigned long max); + /* The following inode bitmaps are separately used in thread_ctx Pass1*/ ext2fs_inode_bitmap inode_used_map; /* Inodes which are in use */ ext2fs_inode_bitmap inode_bad_map; /* Inodes which are bad somehow */ ext2fs_inode_bitmap inode_dir_map; /* Inodes which are directories */ @@ -322,12 +325,14 @@ struct e2fsck_struct { ext2fs_inode_bitmap inode_reg_map; /* Inodes which are regular files*/ ext2fs_inode_bitmap inode_casefold_map; /* Inodes which are casefolded */ + /* Following 3 protected by [fs_block_map_rwlock] */ ext2fs_block_bitmap block_found_map; /* Blocks which are in use */ ext2fs_block_bitmap block_dup_map; /* Blks referenced more than once */ ext2fs_block_bitmap block_ea_map; /* Blocks which are used by EA's */ /* - * Inode count arrays + * Inode count arrays. + * Separately used in thread_ctx, pass1 */ ext2_icount_t inode_count; ext2_icount_t inode_link_info; @@ -349,7 +354,8 @@ struct e2fsck_struct { /* * Array of flags indicating whether an inode bitmap, block - * bitmap, or inode table is invalid + * bitmap, or inode table is invalid. + * Separately used in thread_ctx, pass1 */ int *invalid_inode_bitmap_flag; int *invalid_block_bitmap_flag; @@ -362,7 +368,8 @@ struct e2fsck_struct { char *block_buf; /* - * For pass1_check_directory and pass1_get_blocks + * For pass1_check_directory and pass1_get_blocks. + * Separately used in thread_ctx in pass1 */ ext2_ino_t stashed_ino; struct ext2_inode *stashed_inode; @@ -421,6 +428,7 @@ struct e2fsck_struct { /* * How we display the progress update (for unix) + * shared by different threads for pass1 [fs_fix_rwlock] */ int progress_fd; int progress_pos; @@ -429,7 +437,7 @@ struct e2fsck_struct { int interactive; /* Are we connected directly to a tty? */ char start_meta[2], stop_meta[2]; - /* File counts */ + /* File counts. Separately used in thread_ctx, pass1 */ __u32 fs_directory_count; __u32 fs_regular_count; __u32 fs_blockdev_count; -- 2.37.3