Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4635555iob; Sun, 8 May 2022 20:04:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlEkdvyMxx2cQLfweAi/Qoai3ARS0K1p6RpDE2ncPOvLxT6397cWU4xIvtJG0LaiRksz4g X-Received: by 2002:a65:6946:0:b0:39d:a0c3:71f with SMTP id w6-20020a656946000000b0039da0c3071fmr11330637pgq.160.1652065479415; Sun, 08 May 2022 20:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652065479; cv=none; d=google.com; s=arc-20160816; b=NVSag1xwyEucu6cJ22+Rl/5Fa98/Q0wJZjFT9qMVxFNgI8a043oYk/1uppKesdYa+M 0wBrtV7V99rKhCy41Q70PyghQJe/dj0r+ss0DpnwU7HiTUJ/GJzLjVYAG+p9KegsEJsM 80BycBJ72wbuxlykliiEzn7Fxw/hfIwKaARcJOnSvuivNv20iWUppMZsJWEzGYtbWgrz sQ4prYN6N1ki86PUinoJAbioj0ECXLXEkKy2g3wgr8Esl95WQftgIDZCH5KN1jrgXi+3 o+8NM3DYDCYx0oUZvFfrAI3L4zZk84MQrAwMgilCrQMChL480a8WbK1tsEaUh4HMv5qf BV9w== 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; bh=jSmZ+CTYHrg0V/YD//rUGAhDEzic1T7/+s9J1pEzWD8=; b=nGBG8jk1RGel0w7pxctdbt6hLrTgoAlArlYBIW3wNTN/TN3CaatZV2wxjNV2E62UW0 6Ew9N2i00paFcrn43WygvM/yUTUYSFDDFBdeWypRUjTcu0ndZOpXRNFZzLXE6F8mIq0r b1WErXnPw5y/2ZeAso9/vXDcKX9y+WRcvTzNuGgBqg1DD72h/XGH52iIsIdtOu/Qk6tQ R94q98GKzOCEqittIGAOG+RjcxT72mC+b2Tm4+iZqiktA5pOt9Vyrg4bxGF70awcaKjt J3m6kM0N3SbYq9791SZZzwaFDsxSrDutp3hdZwdyUmZOxU714jcoBvaLuWrPR3791dwy uedw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 185-20020a6216c2000000b0050759c7a6f2si11859014pfw.376.2022.05.08.20.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:04:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 68912888EF; Sun, 8 May 2022 20:04:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391841AbiEFTu0 (ORCPT + 99 others); Fri, 6 May 2022 15:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391653AbiEFTuU (ORCPT ); Fri, 6 May 2022 15:50:20 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A026A074 for ; Fri, 6 May 2022 12:46:36 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0VCTGrli_1651866393; Received: from e18g06460.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VCTGrli_1651866393) by smtp.aliyun-inc.com(127.0.0.1); Sat, 07 May 2022 03:46:34 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu Cc: LKML , Gao Xiang Subject: [PATCH 3/3] erofs: refine on-disk definition comments Date: Sat, 7 May 2022 03:46:12 +0800 Message-Id: <20220506194612.117120-3-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.24.4 In-Reply-To: <20220506194612.117120-1-hsiangkao@linux.alibaba.com> References: <20220506194612.117120-1-hsiangkao@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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-kernel@vger.kernel.org Fix some outdated comments and typos, hopefully helpful. Signed-off-by: Gao Xiang --- fs/erofs/erofs_fs.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h index 1238ca104f09..000fa2738974 100644 --- a/fs/erofs/erofs_fs.h +++ b/fs/erofs/erofs_fs.h @@ -79,15 +79,15 @@ struct erofs_super_block { /* * erofs inode datalayout (i_format in on-disk inode): - * 0 - inode plain without inline data A: + * 0 - uncompressed flat inode without tail-packing inline data: * inode, [xattrs], ... | ... | no-holed data - * 1 - inode VLE compression B (legacy): - * inode, [xattrs], extents ... | ... - * 2 - inode plain with inline data C: - * inode, [xattrs], last_inline_data, ... | ... | no-holed data - * 3 - inode compression D: + * 1 - compressed inode with non-compact indexes: + * inode, [xattrs], [map_header], extents ... | ... + * 2 - uncompressed flat inode with tail-packing inline data: + * inode, [xattrs], tailpacking data, ... | ... | no-holed data + * 3 - compressed inode with compact indexes: * inode, [xattrs], map_header, extents ... | ... - * 4 - inode chunk-based E: + * 4 - chunk-based inode with (optional) multi-device support: * inode, [xattrs], chunk indexes ... | ... * 5~7 - reserved */ @@ -106,7 +106,7 @@ static inline bool erofs_inode_is_data_compressed(unsigned int datamode) datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY; } -/* bit definitions of inode i_advise */ +/* bit definitions of inode i_format */ #define EROFS_I_VERSION_BITS 1 #define EROFS_I_DATALAYOUT_BITS 3 @@ -140,8 +140,9 @@ struct erofs_inode_compact { __le32 i_size; __le32 i_reserved; union { - /* file total compressed blocks for data mapping 1 */ + /* total compressed blocks for compressed inodes */ __le32 compressed_blocks; + /* block address for uncompressed flat inodes */ __le32 raw_blkaddr; /* for device files, used to indicate old/new device # */ @@ -156,9 +157,9 @@ struct erofs_inode_compact { __le32 i_reserved2; }; -/* 32 bytes on-disk inode */ +/* 32-byte on-disk inode */ #define EROFS_INODE_LAYOUT_COMPACT 0 -/* 64 bytes on-disk inode */ +/* 64-byte on-disk inode */ #define EROFS_INODE_LAYOUT_EXTENDED 1 /* 64-byte complete form of an ondisk inode */ @@ -171,8 +172,9 @@ struct erofs_inode_extended { __le16 i_reserved; __le64 i_size; union { - /* file total compressed blocks for data mapping 1 */ + /* total compressed blocks for compressed inodes */ __le32 compressed_blocks; + /* block address for uncompressed flat inodes */ __le32 raw_blkaddr; /* for device files, used to indicate old/new device # */ @@ -365,17 +367,16 @@ enum { struct z_erofs_vle_decompressed_index { __le16 di_advise; - /* where to decompress in the head cluster */ + /* where to decompress in the head lcluster */ __le16 di_clusterofs; union { - /* for the head cluster */ + /* for the HEAD lclusters */ __le32 blkaddr; /* - * for the rest clusters - * eg. for 4k page-sized cluster, maximum 4K*64k = 256M) - * [0] - pointing to the head cluster - * [1] - pointing to the tail cluster + * for the NONHEAD lclusters + * [0] - distance to its HEAD lcluster + * [1] - distance to the next HEAD lcluster */ __le16 delta[2]; } di_u; -- 2.24.4