From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: "'Stefan Hajnoczi'" <stefanha@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: RE: [PATCH 02/16] f2fs: add on-disk layout
Date: Wed, 10 Oct 2012 14:52:56 +0900 [thread overview]
Message-ID: <009901cda6ab$7f00a6e0$7d01f4a0$%kim@samsung.com> (raw)
In-Reply-To: <20121007064222.GA436@stefanha-thinkpad>
[snip]
> > +/*
> > + * For superblock
> > + */
> > +struct f2fs_super_block {
> > + __le32 magic; /* Magic Number */
> > + __le16 major_ver; /* Major Version */
> > + __le16 minor_ver; /* Minor Version */
> > + __le32 log_sectorsize; /* log2 (Sector size in bytes) */
> > + __le32 log_sectors_per_block; /* log2 (Number of sectors per block */
> > + __le32 log_blocksize; /* log2 (Block size in bytes) */
>
> Why store log_blocksize on disk when it can be calculated from
> log_sectorsize and log_sectors_per_block? It may be handy to keep this
> in the in-memory superblock but keeping it on-disk means you need a
> consistency check and error code path when loading the superblock.
>
Yes, I added this for sanity check of superblock.
> > +struct f2fs_inode {
> > + __le16 i_mode; /* File mode */
> > + __le16 i_reserved; /* Reserved */
> > + __le32 i_uid; /* User ID */
> > + __le32 i_gid; /* Group ID */
> > + __le32 i_links; /* Links count */
> > + __le64 i_size; /* File size in bytes */
> > + __le64 i_blocks; /* File size in bytes */
>
> File size in blocks
>
> > +struct direct_node {
> > + __le32 addr[ADDRS_PER_BLOCK]; /* aray of data block address */
>
> s/aray/array/
>
> > +} __packed;
> > +
> > +struct indirect_node {
> > + __le32 nid[NIDS_PER_BLOCK]; /* aray of data block address */
>
> s/aray/array/
I'll change them.
Thank you.
>
> Stefan
next prev parent reply other threads:[~2012-10-10 5:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 11:56 김재극
2012-10-05 17:46 ` Martin Steigerwald
2012-10-06 18:25 ` Jaegeuk Kim
2012-10-05 17:54 ` Dan Luedtke
2012-10-05 21:09 ` Boaz Harrosh
2012-10-06 18:19 ` Jaegeuk Kim
2012-10-06 22:21 ` David Sterba
2012-10-09 5:27 ` Chul Lee
2012-10-07 6:42 ` Stefan Hajnoczi
2012-10-10 5:52 ` Jaegeuk Kim [this message]
2012-10-12 21:05 ` Arnd Bergmann
2012-10-13 11:39 ` Jaegeuk Kim
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='009901cda6ab$7f00a6e0$7d01f4a0$%kim@samsung.com' \
--to=jaegeuk.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanha@gmail.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
Powered by JetHome