From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Christoph Hellwig'" <hch@lst.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<gregkh@linuxfoundation.org>, <valdis.kletnieks@vt.edu>,
<sj1557.seo@samsung.com>, <linkinjeon@gmail.com>,
<pali.rohar@gmail.com>
Subject: RE: [PATCH v9 01/13] exfat: add in-memory and on-disk structures and headers
Date: Fri, 10 Jan 2020 07:43:20 +0900 [thread overview]
Message-ID: <001601d5c73e$316b19e0$94414da0$@samsung.com> (raw)
In-Reply-To: <20200108170840.GB13388@lst.de>
> On Thu, Jan 02, 2020 at 04:20:24PM +0800, Namjae Jeon wrote:
> > This adds in-memory and on-disk structures and headers.
> >
> > Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> > Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
>
> This looks good modulo a few cosmetic nitpicks below.
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
>
> > --- /dev/null
> > +++ b/fs/exfat/exfat_fs.h
> > @@ -0,0 +1,569 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > +/*
> > + * Copyright (C) 2012-2013 Samsung Electronics Co., Ltd.
> > + */
> > +
> > +#ifndef _EXFAT_H
> > +#define _EXFAT_H
>
> This should probably be _EXFAT_FS_H to match the actual file name.
Right, Will fix it on v10.
>
> > +
> > +#include <linux/fs.h>
> > +#include <linux/ratelimit.h>
> > +
> > +#define EXFAT_SUPER_MAGIC (0x2011BAB0UL)
>
> No need for the braces.
Yes.
>
> > +/*
> > + * exfat common MACRO
> > + */
>
> Not sure this comment is all that helpful.
Will remove it.
>
> > +#define CLUSTER_32(x) ((unsigned int)((x) &
0xFFFFFFFFU))
>
> This could just use lower_32_bits().
Okay.
>
> > +#define EXFAT_BAD_CLUSTER (0xFFFFFFF7U)
> > +#define EXFAT_FREE_CLUSTER (0)
> > +/* Cluster 0, 1 are reserved, the first cluster is 2 in the cluster
> heap. */
> > +#define EXFAT_RESERVED_CLUSTERS (2)
> > +#define EXFAT_FIRST_CLUSTER (2)
>
> No need for the braces.
Okay.
>
> > +/* type values */
> > +#define TYPE_UNUSED 0x0000
> > +#define TYPE_DELETED 0x0001
> > +#define TYPE_INVALID 0x0002
> > +#define TYPE_CRITICAL_PRI 0x0100
> > +#define TYPE_BITMAP 0x0101
> > +#define TYPE_UPCASE 0x0102
> > +#define TYPE_VOLUME 0x0103
> > +#define TYPE_DIR 0x0104
> > +#define TYPE_FILE 0x011F
> > +#define TYPE_CRITICAL_SEC 0x0200
> > +#define TYPE_STREAM 0x0201
> > +#define TYPE_EXTEND 0x0202
> > +#define TYPE_ACL 0x0203
> > +#define TYPE_BENIGN_PRI 0x0400
> > +#define TYPE_GUID 0x0401
> > +#define TYPE_PADDING 0x0402
> > +#define TYPE_ACLTAB 0x0403
> > +#define TYPE_BENIGN_SEC 0x0800
> > +#define TYPE_ALL 0x0FFF
>
> Shouldn't this go into exfat_raw.h?
Yes, These are not.
> Maybe check if a few other values should as well if they define an on-disk
format.
Right, I found a few values which should be move to exfat_raw.h.
Will fix.
>
> > +static inline sector_t exfat_cluster_to_sector(struct exfat_sb_info
> *sbi,
> > + unsigned int clus)
> > +{
> > + return ((clus - EXFAT_RESERVED_CLUSTERS) << sbi->sect_per_clus_bits)
> > + + sbi->data_start_sector;
>
> Nitpick: normally we put the operators at the of the previous line in
> Linux code.
Okay.
>
> > +#define EXFAT_DELETE ~(0x80)
>
> The braces would more useful outside the ~.
Okay.
>
> > +#define file_num_ext dentry.file.num_ext
> > +#define file_checksum dentry.file.checksum
> > +#define file_attr dentry.file.attr
> > +#define file_create_time dentry.file.create_time
> > +#define file_create_date dentry.file.create_date
> > +#define file_modify_time dentry.file.modify_time
> > +#define file_modify_date dentry.file.modify_date
> > +#define file_access_time dentry.file.access_time
> > +#define file_access_date dentry.file.access_date
> > +#define file_create_time_ms dentry.file.create_time_ms
> > +#define file_modify_time_ms dentry.file.modify_time_ms
> > +#define file_create_tz dentry.file.create_tz
> > +#define file_modify_tz dentry.file.modify_tz
> > +#define file_access_tz dentry.file.access_tz
> > +#define stream_flags dentry.stream.flags
> > +#define stream_name_len dentry.stream.name_len
> > +#define stream_name_hash dentry.stream.name_hash
> > +#define stream_start_clu dentry.stream.start_clu
> > +#define stream_valid_size dentry.stream.valid_size
> > +#define stream_size dentry.stream.size
> > +#define name_flags dentry.name.flags
> > +#define name_unicode dentry.name.unicode_0_14
> > +#define bitmap_flags dentry.bitmap.flags
> > +#define bitmap_start_clu dentry.bitmap.start_clu
> > +#define bitmap_size dentry.bitmap.size
> > +#define upcase_start_clu dentry.upcase.start_clu
> > +#define upcase_size dentry.upcase.size
> > +#define upcase_checksum dentry.upcase.checksum
>
> Personally I don't find these defines very helpful - directly seeing the
> field name makes the code much easier to read.
Okay, Will remove them.
Thanks for your review!
next prev parent reply other threads:[~2020-01-09 22:43 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200102082359epcas1p2aa1eca9729a6ec54ec3b8140615dca6e@epcas1p2.samsung.com>
2020-01-02 8:20 ` [PATCH v9 00/13] add the latest exfat driver Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 01/13] exfat: add in-memory and on-disk structures and headers Namjae Jeon
2020-01-08 17:08 ` Christoph Hellwig
2020-01-09 22:43 ` Namjae Jeon [this message]
2020-01-02 8:20 ` [PATCH v9 02/13] exfat: add super block operations Namjae Jeon
2020-01-08 17:21 ` Christoph Hellwig
2020-01-09 23:21 ` Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 03/13] exfat: add inode operations Namjae Jeon
2020-01-08 17:50 ` Christoph Hellwig
2020-01-09 23:23 ` Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 04/13] exfat: add directory operations Namjae Jeon
2020-01-08 17:52 ` Christoph Hellwig
2020-01-02 8:20 ` [PATCH v9 05/13] exfat: add file operations Namjae Jeon
2020-01-08 17:56 ` Christoph Hellwig
2020-01-02 8:20 ` [PATCH v9 06/13] exfat: add exfat entry operations Namjae Jeon
2020-01-08 18:00 ` Christoph Hellwig
2020-01-09 23:24 ` Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 07/13] exfat: add bitmap operations Namjae Jeon
2020-01-08 18:01 ` Christoph Hellwig
2020-01-02 8:20 ` [PATCH v9 08/13] exfat: add exfat cache Namjae Jeon
2020-01-08 18:02 ` Christoph Hellwig
2020-01-02 8:20 ` [PATCH v9 09/13] exfat: add misc operations Namjae Jeon
2020-01-02 9:19 ` Pali Rohár
2020-01-02 11:30 ` Namjae Jeon
2020-01-02 11:40 ` Pali Rohár
2020-01-03 18:36 ` Pali Rohár
2020-01-03 23:28 ` Namjae Jeon
2020-01-08 18:03 ` Christoph Hellwig
2020-01-08 19:40 ` Arnd Bergmann
2020-01-09 23:32 ` Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 10/13] exfat: add nls operations Namjae Jeon
2020-01-02 13:55 ` Pali Rohár
2020-01-03 7:06 ` Namjae Jeon
2020-01-03 8:44 ` Pali Rohár
2020-01-02 14:20 ` Pali Rohár
2020-01-03 4:44 ` Namjae Jeon
2020-01-03 9:40 ` Pali Rohár
2020-01-03 12:31 ` Pali Rohár
2020-01-09 22:35 ` Namjae Jeon
2020-01-05 15:24 ` Pali Rohár
2020-01-05 16:51 ` Pali Rohár
2020-01-06 19:46 ` Gabriel Krisman Bertazi
2020-01-07 11:52 ` Pali Rohár
2020-01-09 22:04 ` [PATCH v9 09/13] exfat: add misc operations Valdis Klētnieks
2020-01-09 23:41 ` Namjae Jeon
2020-01-09 22:37 ` [PATCH v9 10/13] exfat: add nls operations Namjae Jeon
2020-01-02 8:20 ` [PATCH v9 11/13] exfat: add Kconfig and Makefile Namjae Jeon
2020-01-02 12:53 ` Pali Rohár
2020-01-02 8:20 ` [PATCH v9 12/13] exfat: add exfat in fs/Kconfig and fs/Makefile Namjae Jeon
2020-01-02 12:58 ` Pali Rohár
2020-01-02 13:07 ` Namjae Jeon
2020-01-02 13:10 ` Pali Rohár
2020-01-02 14:19 ` Greg KH
2020-01-02 23:48 ` Namjae Jeon
2020-01-04 5:22 ` kbuild test robot
2020-01-02 8:20 ` [PATCH v9 13/13] MAINTAINERS: add exfat filesystem Namjae Jeon
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='001601d5c73e$316b19e0$94414da0$@samsung.com' \
--to=namjae.jeon@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linkinjeon@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=sj1557.seo@samsung.com \
--cc=valdis.kletnieks@vt.edu \
/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