lkml.org 
[lkml]   [2012]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 02/16] f2fs: add on-disk layout
Date
[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



\
 
 \ /
  Last update: 2012-10-10 08:21    [W:0.161 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site