[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190902124521.GA22153@infradead.org>
Date: Mon, 2 Sep 2019 05:45:21 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Gao Xiang <hsiangkao@....com>
Cc: Christoph Hellwig <hch@...radead.org>,
Gao Xiang <gaoxiang25@...wei.com>, Jan Kara <jack@...e.cz>,
Dave Chinner <david@...morbit.com>,
LKML <linux-kernel@...r.kernel.org>,
Miao Xie <miaoxie@...wei.com>, devel@...verdev.osuosl.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Amir Goldstein <amir73il@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Theodore Ts'o <tytso@....edu>, Pavel Machek <pavel@...x.de>,
David Sterba <dsterba@...e.cz>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
linux-erofs@...ts.ozlabs.org
Subject: Re: [PATCH v6 01/24] erofs: add on-disk layout
On Sun, Sep 01, 2019 at 03:54:11PM +0800, Gao Xiang wrote:
> It could be better has a name though, because 1) erofs.mkfs uses this
> definition explicitly, and we keep this on-disk definition erofs_fs.h
> file up with erofs-utils.
>
> 2) For kernel use, first we have,
> datamode < EROFS_INODE_LAYOUT_MAX; and
> !erofs_inode_is_data_compressed, so there are only two mode here,
> 1) EROFS_INODE_FLAT_INLINE,
> 2) EROFS_INODE_FLAT_PLAIN
> if its datamode isn't EROFS_INODE_FLAT_INLINE (tail-end block packing),
> it should be EROFS_INODE_FLAT_PLAIN.
>
> The detailed logic in erofs_read_inode and
> erofs_map_blocks_flatmode....
Ok. At least the explicit numbering makes this a little more obvious
now. What seems fairly odd is that there are only various places that
check for some inode layouts/formats but nothing that does a switch
over all of them.
> > why are we adding a legacy field to a brand new file system?
>
> The difference is just EROFS_INODE_FLAT_COMPRESSION_LEGACY doesn't
> have z_erofs_map_header, so it only supports default (4k clustersize)
> fixed-sized output compression rather than per-file setting, nothing
> special at all...
It still seems odd to add a legacy field to a brand new file system.
> > structures, as that keeps it clear in everyones mind what needs to
> > stay persistent and what can be chenged easily.
>
> All fields in this file are on-disk representation by design
> (no logic for in-memory presentation).
Ok, make sense. Maybe add a note to the top of the file comment
that this is the on-disk format.
One little oddity is that erofs_inode_is_data_compressed is here, while
is_inode_flat_inline is in internal.h. There are arguments for either
place, but I'd suggest to keep the related macros together.
Powered by blists - more mailing lists