public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin@lichtvoll.de>
To: linux-kernel@vger.kernel.org
Cc: 김재극 <jaegeuk.kim@samsung.com>,
	viro@zeniv.linux.org.uk, "'Theodore Ts'o'" <tytso@mit.edu>,
	gregkh@linuxfoundation.org, chur.lee@samsung.com,
	cm224.lee@samsung.com, jooyoung.hwang@samsung.com
Subject: Re: [PATCH 02/16] f2fs: add on-disk layout
Date: Fri, 5 Oct 2012 19:46:21 +0200	[thread overview]
Message-ID: <201210051946.21451.Martin@lichtvoll.de> (raw)
In-Reply-To: <000901cda2f0$7d773eb0$7865bc10$%kim@samsung.com>

Am Freitag, 5. Oktober 2012 schrieb 김재극:
> This adds a header file describing the on-disk layout of f2fs.
> 
> Signed-off-by: Changman Lee <cm224.lee@samsung.com>
> Signed-off-by: Chul Lee <chur.lee@samsung.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
> ---
>  include/linux/f2fs_fs.h |  359 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 359 insertions(+)
>  create mode 100644 include/linux/f2fs_fs.h
> 
> diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
> new file mode 100644
> index 0000000..b17eeec
> --- /dev/null
> +++ b/include/linux/f2fs_fs.h
> @@ -0,0 +1,359 @@
> +/**
> + * include/linux/f2fs_fs.h
[…]
> +/*
> + * 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) */
> +       __le32 log_blocks_per_seg; /* log2 (Number of blocks per segment) */
> +       __le32 log_segs_per_sec; /* log2 (Number of segments per section) */
> +       __le32 secs_per_zone; /* Number of sections per zone */
> +       __le32 checksum_offset; /* Checksum position in this super block */
> +       __le64 block_count;     /* Total number of blocks */
> +       __le32 section_count;   /* Total number of sections */
> +       __le32 segment_count;   /* Total number of segments */
> +       __le32 segment_count_ckpt; /* Total number of segments
> +                                     in Checkpoint area */
> +       __le32 segment_count_sit; /* Total number of segments
> +                                    in Segment information table */
> +       __le32 segment_count_nat; /* Total number of segments
> +                                    in Node address table */
> +       /*Total number of segments in Segment summary area */
> +       __le32 segment_count_ssa;
> +       /* Total number of segments in Main area */
> +       __le32 segment_count_main;
> +       __le32 failure_safe_block_distance;
> +       __le64 segment0_blkaddr;        /* Start block address of Segment 0 */
> +       __le64 start_segment_checkpoint; /* Start block address of ckpt */
> +       __le64 sit_blkaddr;     /* Start block address of SIT */
> +       __le64 nat_blkaddr;     /* Start block address of NAT */
> +       __le64 ssa_blkaddr;     /* Start block address of SSA */
> +       __le64 main_blkaddr;    /* Start block address of Main area */
> +       __le32 root_ino;        /* Root directory inode number */
> +       __le32 node_ino;        /* node inode number */
> +       __le32 meta_ino;        /* meta inode number */
> +       __le32 volume_serial_number;    /* VSN is optional field */
> +       __le16 volume_name[8];  /* Volume Name. 8 unicode characters */
> +} __packed;

Any reason why volume label is that short?

If superblock can occupy up to 4096 bytes, i.e. a block, I think a bit
more space for volume label would fit in there. I count 128 bytes up
to volume_name. Do other structures need to fit in superblock as well?

I believe users easily can hit a limit of 8 unicode characters even for
USB sticks and SD cards.

Nice to see a flash friendly filesystem which seems to take lots of the
stuff in account I read at Linaro website about flash devices.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

  reply	other threads:[~2012-10-05 17:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 11:56 [PATCH 02/16] f2fs: add on-disk layout 김재극
2012-10-05 17:46 ` Martin Steigerwald [this message]
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
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=201210051946.21451.Martin@lichtvoll.de \
    --to=martin@lichtvoll.de \
    --cc=chur.lee@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jaegeuk.kim@samsung.com \
    --cc=jooyoung.hwang@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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