[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190815164650.GA4958@hsiangkao-HP-ZHAN-66-Pro-G1>
Date: Fri, 16 Aug 2019 00:46:56 +0800
From: Gao Xiang <hsiangkao@....com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Gao Xiang <gaoxiang25@...wei.com>, Jan Kara <jack@...e.cz>,
Dave Chinner <david@...morbit.com>,
David Sterba <dsterba@...e.cz>, Miao Xie <miaoxie@...wei.com>,
devel@...verdev.osuosl.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
Richard Weinberger <richard@....at>,
Christoph Hellwig <hch@...radead.org>,
Amir Goldstein <amir73il@...il.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Theodore Ts'o <tytso@....edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Pavel Machek <pavel@...x.de>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-erofs@...ts.ozlabs.org
Subject: Re: [PATCH v8 07/24] erofs: add directory operations
Hi Linus,
On Thu, Aug 15, 2019 at 09:13:19AM -0700, Linus Torvalds wrote:
> On Wed, Aug 14, 2019 at 9:42 PM Gao Xiang <gaoxiang25@...wei.com> wrote:
> >
> > +
> > +static const unsigned char erofs_filetype_table[EROFS_FT_MAX] = {
> > + [EROFS_FT_UNKNOWN] = DT_UNKNOWN,
> > + [EROFS_FT_REG_FILE] = DT_REG,
> > + [EROFS_FT_DIR] = DT_DIR,
> > + [EROFS_FT_CHRDEV] = DT_CHR,
> > + [EROFS_FT_BLKDEV] = DT_BLK,
> > + [EROFS_FT_FIFO] = DT_FIFO,
> > + [EROFS_FT_SOCK] = DT_SOCK,
> > + [EROFS_FT_SYMLINK] = DT_LNK,
> > +};
>
> Hmm.
>
> The EROFS_FT_XYZ values seem to match the normal FT_XYZ values, and
> we've lately tried to just have filesystems use the standard ones
> instead of having a (pointless) duplicate conversion between the two.
>
> And then you can use the common "fs_ftype_to_dtype()" to convert from
> FT_XYZ to DT_XYZ.
>
> Maybe I'm missing something, and the EROFS_FT_x list actually differs
> from the normal FT_x list some way, but it would be good to not
> introduce another case of this in normal filesystems, just as we've
> been getting rid of them.
>
> See for example commit e10892189428 ("ext2: use common file type conversion").
Yes, you're right. There is nothing different with DT_XYZ since
I followed what f2fs did when I wrote this place.
Actually, I noticed that patchset once in mailing list months ago
https://lore.kernel.org/r/20181023201952.GA15676@pathfinder/
but I didn't keep eyes on it (whether this patchset is merged or not...)
OK, let me fix that like other fses. Thanks for pointing out.
Thanks,
Gao Xiang
>
> Linus
Powered by blists - more mailing lists