From: Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
To: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
Cc: reinoud-qavaossjCcEdnm+yROfE0A@public.gmane.org,
nop-Nqdcz63CPQY@public.gmane.org,
linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [CFD] disk format fixing
Date: Thu, 06 May 2010 00:10:53 +0900 [thread overview]
Message-ID: <8739y675aa.wl%jir@sekiba.com> (raw)
In-Reply-To: <20100504.230135.205087691.ryusuke-sG5X7nlA6pw@public.gmane.org>
Hi,
OK, it looks like a flag should be introduced for older flash device
not to write super block whenever checkpoint is created, but maintain
it less frequently or even not writing at all until unmount.
In any cases, at least super block disk format is not modified.
At Tue, 04 May 2010 23:01:35 +0900 (JST),
Ryusuke Konishi wrote:
>
> On Tue, 4 May 2010 14:02:22 +0200, Reinoud Zandijk wrote:
> > On Mon, May 03, 2010 at 03:35:03PM -0400, Jay Carlson wrote:
> > > On May 3, 2010, at 11:54 AM, Jiro SEKIBA wrote:
> > > Low-end consumer flash (like USB thumb drives or MMC) often uses a simple
> > > zone-based FTL with bad block replacement. I am told really cheap ones
> > > allocate zones with 1000 flash blocks with 24 held as replacements for
> > > failing blocks and wear leveling.
> > >
> > > If I understand nilfs, its superblock is both fixed location and "hot": it
> > > is written fairly frequently (on every fsync?) On cheap flash, it will wear
> > > out the flash block it lives on in 25 write lifetimes or less.
> >
> > I'd opt for NOT writing out the super block but on unmount or when the
> > roll-forward chain is disturbed by the garbage collector.i
> >
> > Another option is to never update it; it should at most take a few secs to
> > locate the latest segsum by just scanning trough the segement summaries;
> > especially now the segment summaries have the checkpoint number incorporated.
> >
> > If on mount all first segment summaries are read (say 4000 to 8000 sectors)
> > its clear wich is the newest and then follow that chain until you reach the
> > end... and you can mount. I agree its not optimal but i dont see a reason as
> > to why it shouldn't work :)
>
> I was just thinking the same thing.
>
> The reason nilfs frequently updates super blocks is for maintaining a
> pointer to recent logs. And, the new checkpoint number field allows
> it to find them by scanning through summary headers of each segments.
>
> This may be expensive for hard drives, but may be acceptable for flash
> devices. I think it's worth adding a new mount option (or a flag) for
> this.
This leads that boot loader is required to take care of searching
valid super root by the scanning all the segments, unlike just
roll forwarding the log.
From boot loader (grub2) point of view, any access to the filesystem
requires "mount" operation, which means leading two files (initrd and kernel)
requires at least two mount operations. That means in case of unclean unmount,
it requires to scan whole disks twice.
So I opt to write super block less frequently, to maintain super root
pointer so that roll forwarding likely finds correct super root.
Or maybe specifying frequency as mount option, say like write back
per 100 check points.
thanks,
regards,
> The super blocks also maintain free blocks count, but it's computable.
>
> > It is also backwards compatible since older
> > implementations can will search for the last super root; they only will need
> > to read more.
>
> You mean forward compatibility?
>
> I think older implementations have potential to select wrong super
> root due to the garbage collector. This issue seems a key of this
> approach.
>
> Even though we can make super blocks written out on unmount as before,
> an unclean shutdown and subsequent boot with an old implementation may
> lead to a fatal result.
>
> Without this issue, it looks pretty good.
>
> With regards,
> Ryusuke Konishi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
--
Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-05 15:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-03 15:54 [CFD] disk format fixing Jiro SEKIBA
[not found] ` <87aash3rrm.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2010-05-03 19:35 ` Jay Carlson
[not found] ` <7E6B7E93-FCB4-4E4C-AF4F-BEA8D8FE1F20-Nqdcz63CPQY@public.gmane.org>
2010-05-04 12:02 ` Reinoud Zandijk
[not found] ` <20100504120222.GA1132-bVHBekiX4bNgoMqBc1r0ESegHCQxtGRMHZ5vskTnxNA@public.gmane.org>
2010-05-04 14:01 ` Ryusuke Konishi
[not found] ` <20100504.230135.205087691.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-05-05 15:10 ` Jiro SEKIBA [this message]
[not found] ` <8739y675aa.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2010-05-05 18:23 ` Ryusuke Konishi
[not found] ` <20100506.032327.203276062.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-05-09 16:45 ` Jiro SEKIBA
[not found] ` <87aas9hvm8.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2010-05-09 18:29 ` Ryusuke Konishi
[not found] ` <20100510.032922.158554882.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-05-11 14:43 ` Jiro SEKIBA
2010-05-04 12:06 ` Reinoud Zandijk
[not found] ` <20100504120623.GB1132-bVHBekiX4bNgoMqBc1r0ESegHCQxtGRMHZ5vskTnxNA@public.gmane.org>
2010-05-05 15:19 ` Jiro SEKIBA
2010-05-04 14:38 ` Ryusuke Konishi
2010-05-16 14:42 ` Jiro SEKIBA
[not found] ` <87pr0v7vs8.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2010-05-16 17:25 ` Ryusuke Konishi
[not found] ` <20100517.022540.171394303.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-05-18 14:13 ` Jiro SEKIBA
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=8739y675aa.wl%jir@sekiba.com \
--to=jir-hfpbi5wx9j54eiagz67ipq@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nop-Nqdcz63CPQY@public.gmane.org \
--cc=reinoud-qavaossjCcEdnm+yROfE0A@public.gmane.org \
--cc=ryusuke-sG5X7nlA6pw@public.gmane.org \
/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