linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: linux-erofs@lists.ozlabs.org, Chao Yu <chao@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	huyue2@coolpad.com, zhangwen@coolpad.com
Subject: Re: [PATCH 3/3] erofs: refine on-disk definition comments
Date: Sat, 7 May 2022 13:42:47 +0800	[thread overview]
Message-ID: <20220507134247.00007786.zbestahu@gmail.com> (raw)
In-Reply-To: <20220506194612.117120-3-hsiangkao@linux.alibaba.com>

On Sat,  7 May 2022 03:46:12 +0800
Gao Xiang <hsiangkao@linux.alibaba.com> wrote:

> Fix some outdated comments and typos, hopefully helpful.
> 
> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
> ---
>  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;

Reviewed-by: Yue Hu <huyue2@coolpad.com>

  reply	other threads:[~2022-05-07  5:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 19:46 [PATCH 1/3] erofs: get rid of erofs_prepare_dio() helper Gao Xiang
2022-05-06 19:46 ` [PATCH 2/3] erofs: remove obsoluted comments Gao Xiang
2022-05-07  5:40   ` Yue Hu
2022-05-17 14:56   ` Chao Yu
2022-05-06 19:46 ` [PATCH 3/3] erofs: refine on-disk definition comments Gao Xiang
2022-05-07  5:42   ` Yue Hu [this message]
2022-05-17 14:58   ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220507134247.00007786.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=chao@kernel.org \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=huyue2@coolpad.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhangwen@coolpad.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).