From: Jaegeuk Kim <jaegeuk.kim@gmail.com>
To: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Jaegeuk Kim <jaegeuk.kim@samsung.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk,
arnd@arndb.de, tytso@mit.edu, chur.lee@samsung.com,
cm224.lee@samsung.com, jooyoung.hwang@samsung.com
Subject: RE: [PATCH 02/16 v2] f2fs: add on-disk layout
Date: Fri, 26 Oct 2012 22:13:12 +0900 [thread overview]
Message-ID: <1351257192.2132.3.camel@kjgkr> (raw)
In-Reply-To: <1351255718.2605.28.camel@slavad-ubuntu>
2012-10-26 (금), 16:48 +0400, Vyacheslav Dubeyko:
> On Fri, 2012-10-26 at 12:31 +0900, Jaegeuk Kim wrote:
> > [snip]
> > > > +#define F2FS_SUPER_MAGIC 0xF2F52010
> > > > +#define F2FS_SUPER_OFFSET 0 /* start sector # for sb */
> > >
> > > Does f2fs superblock really haven't any offset from the volume begin?
> >
> > The reason that I changed this from 1 to 0 is due to the failure during android
> > recovery. I don't know why the recovery is failed when the offset is 1, but it
> > works fine after the offset is changed to 0.
> > I suspect that mount procedure inspects the 0'th offset to figure out what file
> > system is installed by checking some kind of magic numbers.
> > Sometimes, we've seen that the mount program tries to load previously installed
> > file system even though mkfs.f2fs was conducted.
> > Would you recommend something?
> >
>
> I thought that superblock's placement is defined always from design
> point of view. :-)
>
> As I understand, usually many filesystems places first superblock on
> 1024 bytes distance from a volume beginning. It reserves some place for
> possibility to have volume boot record.
>
> I am afraid that Android recovery failure takes place because of
> in-proper configuration or, maybe, some special Android recovery code's
> modification. Does it means that it is not possible to use, for example,
> ext4 or nilfs2 under Android?
>
> Yes, you are right, the mount procedure try to detect a filesystem type.
> But superblock can place in different locations. For example, FAT's
> superblock hasn't any offset from the volume begin; hfs+ superblock is
> located on 1024 bytes from volume begin; reiserfs superblock is located
> on 64 KB from volume begin. The situation when mount utility tries to
> load another filesystem instead of f2fs is a symptom of mkfs.f2fs bug,
> from my point of view.
>
> I think that it makes sense to have as minimum 1024 bytes superblock's
> offset from a volume begin.
Thank you.
I'll try 1024 bytes offset, also in Android.
>
> [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) */
> > > > + __le32 log_blocks_per_seg; /* log2 (Number of blocks per segment) */
> > >
> > > From my point of view, __le32 is big data type for log2 (<value>). What
> > > do you think?
> > >
> >
> > Right, but it is superblock. Should we have to consider space overhead?
> >
>
> I simply think that __le16 can be enough. So, all four fields
> (log_sectorsize, log_sectors_per_block, log_blocksize,
> log_blocks_per_seg) will occupy 8 bytes instead of 16. And this place (8
> bytes) can be used for volume serial number field.
>
As your previous opinion, I added already uuid in superblock.
At this moment, we can change on-disk layout freely. :)
Thanks,
> With the best regards,
> Vyacheslav Dubeyko.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Jaegeuk Kim
Samsung
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-10-26 13:13 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 2:21 [PATCH 00/16 v2] f2fs: introduce flash-friendly file system Jaegeuk Kim
2012-10-23 2:25 ` [PATCH 01/16 v2] f2fs: add document Jaegeuk Kim
2012-10-23 11:41 ` Vyacheslav Dubeyko
2012-10-25 22:14 ` Jaegeuk Kim
2012-10-23 2:26 ` [PATCH 02/16 v2] f2fs: add on-disk layout Jaegeuk Kim
2012-10-23 3:46 ` NeilBrown
2012-10-23 6:30 ` Jaegeuk Kim
2012-10-23 6:47 ` Marco Stornelli
2012-10-23 7:08 ` Jaegeuk Kim
2012-10-24 11:25 ` Vyacheslav Dubeyko
2012-10-26 3:31 ` Jaegeuk Kim
2012-10-26 8:18 ` Arnd Bergmann
2012-10-26 8:31 ` Jaegeuk Kim
2012-10-26 12:48 ` Vyacheslav Dubeyko
2012-10-26 13:13 ` Jaegeuk Kim [this message]
2012-10-23 2:26 ` [PATCH 03/16 v2] f2fs: add superblock and major in-memory structure Jaegeuk Kim
2012-10-27 13:58 ` Vyacheslav Dubeyko
2012-10-23 2:27 ` [PATCH 04/16 v2] f2fs: add super block operations Jaegeuk Kim
2012-10-23 6:51 ` Marco Stornelli
2012-10-23 7:09 ` Jaegeuk Kim
2012-10-28 12:08 ` Vyacheslav Dubeyko
2012-10-23 2:28 ` [PATCH 05/16 v2] f2fs: add checkpoint operations Jaegeuk Kim
2012-10-23 2:28 ` [PATCH 06/16 v2] f2fs: add node operations Jaegeuk Kim
2012-10-23 2:28 ` [PATCH 07/16 v2] f2fs: add segment operations Jaegeuk Kim
2012-10-23 3:02 ` Max Filippov
2012-10-23 3:23 ` Jaegeuk Kim
2012-10-23 2:29 ` [PATCH 08/16 v2] f2fs: add file operations Jaegeuk Kim
2012-10-23 6:58 ` Marco Stornelli
2012-10-23 7:31 ` Jaegeuk Kim
2012-10-23 7:39 ` Marco Stornelli
2012-10-23 2:29 ` [PATCH 09/16 v2] f2fs: add address space operations for data Jaegeuk Kim
2012-10-23 2:30 ` [PATCH 10/16 v2] f2fs: add core inode operations Jaegeuk Kim
2012-10-23 2:30 ` [PATCH 11/16 v2] f2fs: add inode operations for special inodes Jaegeuk Kim
2012-10-23 7:01 ` Marco Stornelli
2012-10-23 7:46 ` Jaegeuk Kim
2012-10-23 8:20 ` Marco Stornelli
2012-10-23 8:49 ` Jaegeuk Kim
2012-10-23 9:35 ` Marco Stornelli
2012-10-23 2:31 ` [PATCH 12/16 v2] f2fs: add core directory operations Jaegeuk Kim
2012-10-23 2:31 ` [PATCH 13/16 v2] f2fs: add xattr and acl functionalities Jaegeuk Kim
2012-10-23 2:32 ` [PATCH 14/16 v2] f2fs: add garbage collection functions Jaegeuk Kim
2012-10-23 2:32 ` [PATCH 15/16 v2] f2fs: add recovery routines for roll-forward Jaegeuk Kim
2012-10-23 2:33 ` [PATCH 16/16 v2] f2fs: update Kconfig and Makefile Jaegeuk Kim
2012-10-23 3:04 ` Greg KH
2012-10-23 3:21 ` Jaegeuk Kim
2012-10-23 18:20 ` [PATCH 0/3] f2fs: move proc files to debugfs Greg KH
2012-10-23 18:21 ` [PATCH 1/3] f2fs: gc.h: make should_do_checkpoint() inline Greg KH
2012-10-23 18:22 ` [PATCH 2/3] f2fs: move statistics code into one file Greg KH
2012-10-23 18:23 ` [PATCH 3/3] f2fs: move proc files to debugfs Greg KH
2012-10-23 19:20 ` [PATCH 3/3 v2] " Greg KH
2012-10-23 19:11 ` [PATCH 0/3] " Greg KH
2012-10-25 8:12 ` Jaegeuk Kim
2012-10-23 18:26 ` [PATCH 00/16 v2] f2fs: introduce flash-friendly file system Greg KH
2012-10-23 18:57 ` Greg KH
2012-10-23 23:18 ` Jaegeuk Kim
2012-10-24 3:02 ` 'Greg KH'
2012-10-24 5:35 ` Jaegeuk Kim
2012-10-23 23:14 ` Jaegeuk Kim
2012-10-24 3:01 ` 'Greg KH'
2012-10-24 5:34 ` 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=1351257192.2132.3.camel@kjgkr \
--to=jaegeuk.kim@gmail.com \
--cc=arnd@arndb.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-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--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;
as well as URLs for NNTP newsgroup(s).