public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Roy Sigurd Karlsbakk <roy-ooPBL11mRiZbRRN4PJnoQQ@public.gmane.org>
Cc: Andrew Thrift
	<andrew-3e6jenk95VYpDvLZ8AWkcaVXKuFTiq87@public.gmane.org>,
	linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: bcache vs enhanceio?
Date: Tue, 12 Feb 2013 13:56:29 -0800	[thread overview]
Message-ID: <20130212215629.GJ27179@google.com> (raw)
In-Reply-To: <23363144.24.1360701679980.JavaMail.root@zimbra>

On Tue, Feb 12, 2013 at 09:41:20PM +0100, Roy Sigurd Karlsbakk wrote:
> Wouldn't it be better to allow the sysadmin to determine the safety?

The sysadmin can override, but - say you're using bcache for your root
filesystem and after a reboot the SSD doesn't come up, for whatever
reason.

How's the sysadmin supposed to know for sure whether there was dirty
data in the cache? There's no way to reliably track that without bcache
tracking it itself in the backing device's superblock.

Say there wasn't any dirty data in the cache, so you can safely run
without the cache device - so you do, so you can boot up and use your
machine.

Then later you figure out what's wrong with the SSD (cable got
unplugged?), so you reenable caching.

But the cache is now inconsistent - you _cannot_ use that cached data.
With the backing device superblock, bcache can trivially note that the
cache is out of sync and make sure that that cached data isn't used.

If we didn't have that, the sysadmin would have to make _sure_ to use
the right flag when reattaching to specify cached data shouldn't be
used, otherwise he just corrupted all his data.


> Also, if running in writethrough, why shouldn't an SSD be allowed to be added in realtime?

If you're running in writethrough, you'd already be caching... not sure
what you mean?

> All of this works well with systems like ZFS. I really don't see a reason for a filesystem being created to allow caching

ZFS is a filesystem that also does caching, bcache isn't a filesystem.
Did you get something backwards...?

  reply	other threads:[~2013-02-12 21:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 21:25 bcache vs enhanceio? Roy Sigurd Karlsbakk
2013-02-07 23:05 ` Andrew Thrift
     [not found]   ` <5114334D.7040709-3e6jenk95VYpDvLZ8AWkcaVXKuFTiq87@public.gmane.org>
2013-02-12 20:41     ` Roy Sigurd Karlsbakk
2013-02-12 21:56       ` Kent Overstreet [this message]
     [not found]         ` <20130212215629.GJ27179-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-02-19 12:48           ` Joseph Glanville
     [not found]             ` <CAOzFzEiLeW=nvuwcrVrs2xO__92ze7b6BDt8MkAkaNctuSR9Vg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-19 15:33               ` Joseph Glanville
2013-02-19 16:47               ` Jason Warr
     [not found] <20130213041453.9D6F6F5149@zimbra.karlsbakk.net>
     [not found] ` <20130213041453.9D6F6F5149-QnAKKd0jTYMSbMbpMVjRk+TW4wlIGRCZ@public.gmane.org>
2013-02-19 12:23   ` Roy Sigurd Karlsbakk
2013-02-19 16:41     ` Jason Warr
     [not found]       ` <5123AB2B.9020209-/cow75dQlsI@public.gmane.org>
2013-02-19 17:17         ` Joseph Glanville
     [not found]           ` <CAOzFzEj=Gna7AQK9f01i9a64qXw0TFjNPjsEViTRcaLKDdcHpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-19 17:42             ` Jason Warr
     [not found]               ` <5123B976.6050400-/cow75dQlsI@public.gmane.org>
2013-02-19 20:40                 ` Kent Overstreet

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=20130212215629.GJ27179@google.com \
    --to=koverstreet-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
    --cc=andrew-3e6jenk95VYpDvLZ8AWkcaVXKuFTiq87@public.gmane.org \
    --cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roy-ooPBL11mRiZbRRN4PJnoQQ@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