Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2731763pxj; Mon, 10 May 2021 09:29:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEqPCE+1BxfmxTydjdts0jTmBxBzajUhjwciurqi/fSHPccdNiamWfrTZVvIg4iw5XCQ8V X-Received: by 2002:a17:906:2ec6:: with SMTP id s6mr3233903eji.65.1620664143454; Mon, 10 May 2021 09:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620664143; cv=none; d=google.com; s=arc-20160816; b=K892JroQKymWXbYM3vIjiOpNwPf+AiDs5zOhBolZrgFeX3oesguhKQWHj0WPXcAhlm AGN9H3B0RuBRb+fPUvr5bW9/BMS74rG0hFR3fRPtTJrySO6B5lxCx1DkNb2SXtdLn/Rs /JaekKoq8JwRLCWoyDxxsteme63o8o4JUz0mTYQgxBkz1Z4ltLl2F9rHWJklJIqe6Oyf cD1MrDNZxJk8nATCt02UWqMfvaWo/wgO3XwIKPArg49T6PCt478orvj6McKQi1KVkaiP RJ+bb5Kjgi7Q31o9tNkpfEQb/6Rjyfc0TvH8upJ7793whIys+Nehqm2+PCGcrw/+NLgm 4ohg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=T3JjFEEvmoiBarEjY+S61XzVJKU/4J/FwpRYrVMxAdE=; b=09WJSoncNKqNWWcypwdRgKKWt2Wzsjgtq1iyjMGDN0ywcwEa5vJ3fRMaac0QRx0quV Y00yYs5cOGX0jwPdAvCHw1XmRPuxIeOpmHohEWi2D9dGRWC+xcOvsM3r8/tv6Q4LkUmC AFoLs4t/CzpE3r+aMIHE9Oz/cAmc/WpzzcMv/voVwaG8+F7c0VrpMaCTyxRqYWGzVvFS SfPMmxBYgyCiuAWKWVIG1I2CVk6E9jnEykYYUnQ6jKKPxaoo4svRBA9+NR+cF0jKiiFw YYPeroelNtvffDUjZ/4fdrkMQvGTW/UoHOGKRMOoKkNqWpHl33m4VNwUECZ9nWvw4MZl /RBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XxtM58M+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw16si14234478ejb.337.2021.05.10.09.28.39; Mon, 10 May 2021 09:29:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=XxtM58M+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231487AbhEJQ0Q (ORCPT + 99 others); Mon, 10 May 2021 12:26:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:34996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhEJQ0P (ORCPT ); Mon, 10 May 2021 12:26:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7FD346112F; Mon, 10 May 2021 16:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620663910; bh=V3huKmh6GgUUU+2+jLRu6TLFbHdQL3XqX+IYvRfuV3w=; h=From:To:Cc:Subject:Date:From; b=XxtM58M+ahbXBAdvDO1n1Bz+76WXV9JvkjWjHbf8DluZH4FgM0c+bqcxBS9YCqVj3 vA/nCt84fapgGMhUh76QKs18ELcr/G08WB0OwTMqFxavZoJnqMxRsG6+5RKN+ic9Ut QFoo95rAlj+WYrpL/z2IkqRqHm4bjQyU0mVN8F0L6dFFfovXuR30PQjtVDMCV4JjLk s1UPuuZvCtxX8EiKK4wmDnX9L/1MUU9MORcuvCCN7X5S4PlY00KDCjDVM8F8ts038M CLAIqcRQSauAeFJuYNT0JB6KPv5dchS4uDxEst6tTQnuHIKm2NanPL+jijjgDozATE ftzx7oP8zdJlA== From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu Cc: LKML , Gao Xiang , Mauro Carvalho Chehab Subject: [PATCH 1/2] erofs: fix broken illustration in documentation Date: Tue, 11 May 2021 00:25:05 +0800 Message-Id: <20210510162506.28637-1-xiang@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gao Xiang Illustration was broken after ReST conversion by accident. (checked by 'make SPHINXDIRS="filesystems" htmldocs') Fixes: e66d8631ddb3 ("docs: filesystems: convert erofs.txt to ReST") Cc: Mauro Carvalho Chehab Signed-off-by: Gao Xiang --- Documentation/filesystems/erofs.rst | 119 ++++++++++++++-------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/Documentation/filesystems/erofs.rst b/Documentation/filesystems/erofs.rst index bf145171c2bf..869b183ff215 100644 --- a/Documentation/filesystems/erofs.rst +++ b/Documentation/filesystems/erofs.rst @@ -113,31 +113,31 @@ may not. All metadatas can be now observed in two different spaces (views): :: - |-> aligned with 8B - |-> followed closely - + meta_blkaddr blocks |-> another slot - _____________________________________________________________________ - | ... | inode | xattrs | extents | data inline | ... | inode ... - |________|_______|(optional)|(optional)|__(optional)_|_____|__________ - |-> aligned with the inode slot size - . . - . . - . . - . . - . . - . . - .____________________________________________________|-> aligned with 4B - | xattr_ibody_header | shared xattrs | inline xattrs | - |____________________|_______________|_______________| - |-> 12 bytes <-|->x * 4 bytes<-| . - . . . - . . . - . . . - ._______________________________.______________________. - | id | id | id | id | ... | id | ent | ... | ent| ... | - |____|____|____|____|______|____|_____|_____|____|_____| - |-> aligned with 4B - |-> aligned with 4B + |-> aligned with 8B + |-> followed closely + + meta_blkaddr blocks |-> another slot + _____________________________________________________________________ + | ... | inode | xattrs | extents | data inline | ... | inode ... + |________|_______|(optional)|(optional)|__(optional)_|_____|__________ + |-> aligned with the inode slot size + . . + . . + . . + . . + . . + . . + .____________________________________________________|-> aligned with 4B + | xattr_ibody_header | shared xattrs | inline xattrs | + |____________________|_______________|_______________| + |-> 12 bytes <-|->x * 4 bytes<-| . + . . . + . . . + . . . + ._______________________________.______________________. + | id | id | id | id | ... | id | ent | ... | ent| ... | + |____|____|____|____|______|____|_____|_____|____|_____| + |-> aligned with 4B + |-> aligned with 4B Inode could be 32 or 64 bytes, which can be distinguished from a common field which all inode versions have -- i_format:: @@ -175,13 +175,13 @@ may not. All metadatas can be now observed in two different spaces (views): Each share xattr can also be directly found by the following formula: xattr offset = xattr_blkaddr * block_size + 4 * xattr_id - :: +:: - |-> aligned by 4 bytes - + xattr_blkaddr blocks |-> aligned with 4 bytes - _________________________________________________________________________ - | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ... - |________|_____________|_____________|_____|______________|_______________ + |-> aligned by 4 bytes + + xattr_blkaddr blocks |-> aligned with 4 bytes + _________________________________________________________________________ + | ... | xattr_entry | xattr data | ... | xattr_entry | xattr data ... + |________|_____________|_____________|_____|______________|_______________ Directories ----------- @@ -193,19 +193,18 @@ algorithm (could refer to the related source code). :: - ___________________________ - / | - / ______________|________________ - / / | nameoff1 | nameoffN-1 - ____________.______________._______________v________________v__________ - | dirent | dirent | ... | dirent | filename | filename | ... | filename | - |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____| - \ ^ - \ | * could have - \ | trailing '\0' - \________________________| nameoff0 - - Directory block + ___________________________ + / | + / ______________|________________ + / / | nameoff1 | nameoffN-1 + ____________.______________._______________v________________v__________ + | dirent | dirent | ... | dirent | filename | filename | ... | filename | + |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____| + \ ^ + \ | * could have + \ | trailing '\0' + \________________________| nameoff0 + Directory block Note that apart from the offset of the first filename, nameoff0 also indicates the total number of directory entries in this block since it is no need to @@ -216,22 +215,22 @@ Compression Currently, EROFS supports 4KB fixed-sized output transparent file compression, as illustrated below:: - |---- Variant-Length Extent ----|-------- VLE --------|----- VLE ----- - clusterofs clusterofs clusterofs - | | | logical data - _________v_______________________________v_____________________v_______________ - ... | . | | . | | . | ... - ____|____.________|_____________|________.____|_____________|__.__________|____ - |-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-|-> cluster <-| - size size size size size - . . . . - . . . . - . . . . - _______._____________._____________._____________._____________________ - ... | | | | ... physical data - _______|_____________|_____________|_____________|_____________________ - |-> cluster <-|-> cluster <-|-> cluster <-| - size size size + |<- variable-sized extent ->|<- VLE ->| + clusterofs clusterofs clusterofs + | | | + _________v_________________________________v_______________________v________ + ... | . | | . | | . ... + ____|____._________|______________|________.___ _|______________|__.________ + |-> lcluster <-|-> lcluster <-|-> lcluster <-|-> lcluster <-| + size size size size . . + . . . . + . . . . + . . . . + _______.______________.______________.______________._________________ + ... | | | | ... + _______|______________|______________|______________|_________________ + |-> pcluster <-|-> pcluster <-|-> pcluster <-| + size size size Currently each on-disk physical cluster can contain 4KB (un)compressed data at most. For each logical cluster, there is a corresponding on-disk index to -- 2.20.1