All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolaus Rath <Nikolaus@rath.org>
To: Michael Lyle <mlyle@lyle.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	 linux-bcache@vger.kernel.org,  linux-block@vger.kernel.org
Subject: Re: bcache and hibernation
Date: Thu, 05 Apr 2018 20:51:04 +0100	[thread overview]
Message-ID: <87muyhmnyv.fsf@vostro.rath.org> (raw)
In-Reply-To: <70ea227e-ecb2-9047-0f8d-0864340dc870@lyle.org> (Michael Lyle's message of "Thu, 5 Apr 2018 11:13:08 -0700")

Hi Michael,

On Apr 05 2018, Michael Lyle <mlyle@lyle.org> wrote:
> On 04/05/2018 01:51 AM, Nikolaus Rath wrote:
>> Is there a way to prevent this from happening? Could eg the kernel
>> detect that the swap devices is (indirectly) on bcache and refuse to
>> hibernate? Or is there a way to do a "true" read-only mount of a
>> bcache volume so that one can safely resume from it?
>
> I think you're correct.  If you're using bcache in writeback mode, it is
> not safe to hibernate there, because some of the blocks involved in the
> resume can end up in cache (and dependency issues, like you mention).

Could you explain why this isn't a problem with writethrough? It seems
to me that the trouble happens when the hibernation image is *read*, so
why does it matter what kind of write caching is used?

> I am unaware of a mechanism to prohibit this in the kernel-- to say that
> a given type of block provider can't be involved in a resume operation.
> Most documentation for hibernation explicitly cautions about the btrfs
> situation, but use of bcache is less common and as a result generally
> isn't covered.

Could you maybe add a warning to Documentation/bcache.txt? I think this
would have saved me.

Best,
-Nikolaus

--=20
GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2=
=AB

  reply	other threads:[~2018-04-05 19:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 19:01 bcache: bad block header Nikolaus Rath
2018-04-03 22:38 ` Jens Axboe
2018-04-05  8:51   ` bcache and hibernation (was: bcache: bad block header) Nikolaus Rath
2018-04-05 18:13     ` bcache and hibernation Michael Lyle
2018-04-05 19:51       ` Nikolaus Rath [this message]
2018-04-06  0:21         ` Michael Lyle
  -- strict thread matches above, loose matches on Subject: below --
2014-11-13 13:52 Mathijs Kwik
2014-11-13 15:52 ` Mathijs Kwik
     [not found]   ` <CAPBO7TZF5qUV64UZJVE+WQkKa2aCJSTjkQxh6eVktH7nA41Vqw@mail.gmail.com>
2014-11-13 16:52     ` Mathijs Kwik
     [not found]       ` <CAPBO7TbQA2MbFS43racKOwZ+=U2jC4OcLF413-MvvNKML5=QZQ@mail.gmail.com>
2014-11-13 17:23         ` Mathijs Kwik
2015-02-10 22:36           ` Kai Krakow
2014-11-13 22:11 ` Kent Overstreet
2014-11-30 18:25   ` Mathijs Kwik
2014-11-30 23:24     ` Kent Overstreet
2014-11-30 23:29     ` Kent Overstreet
2014-12-01  8:48       ` Mathijs Kwik

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=87muyhmnyv.fsf@vostro.rath.org \
    --to=nikolaus@rath.org \
    --cc=axboe@kernel.dk \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mlyle@lyle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.