From: "James Johnston" <johnstonj.public@codenest.com>
To: 'Eric Wheeler' <bcache@lists.ewheeler.net>
Cc: 'Mike Snitzer' <snitzer@redhat.com>,
dm-crypt@saout.de, dm-devel@redhat.com,
linux-bcache@vger.kernel.org,
'Kent Overstreet' <kent.overstreet@gmail.com>,
'Alasdair Kergon' <agk@redhat.com>
Subject: RE: [dm-devel] bcache gets stuck flushing writeback cache when used in combination with LUKS/dm-crypt and non-default bucket size
Date: Wed, 18 May 2016 17:01:37 -0000 [thread overview]
Message-ID: <01df01d1b126$f1fe1810$d5fa4830$@codenest.com> (raw)
In-Reply-To: <alpine.LRH.2.11.1605101816240.22680@mx.ewheeler.net>
> On Sun, 8 May 2016, James Johnston wrote:
>
> > Hi,
> >
> > [1.] One line summary of the problem:
> >
> > bcache gets stuck flushing writeback cache when used in combination with
> > LUKS/dm-crypt and non-default bucket size
> >
> > [2.] Full description of the problem/report:
> >
> > I've run into a problem where the bcache writeback cache can't be flushed to
> > disk when the backing device is a LUKS / dm-crypt device and the cache set has
> > a non-default bucket size.
>
> You might try LUKS atop of bcache instead of under it. This might be
> better for privacy too, otherwise your cached data is unencrypted.
Only in this test case; on my real setup, the cache device is also layered on top
Of LUKS. (On both backing & cache, it's LUKS --> LVM2 --> bcache. This gives me
flexibility to adjust volumes without messing with the encryption, or having more
encryption devices than really needed. At any rate, I expect this setup to at
least work...)
>
> > # Make cache set on second drive
> > # IMPORTANT: Problem does not occur if I omit --bucket parameter.
> > make-bcache --bucket 2M -C /dev/sdb
>
> 2MB is quite large, maybe it exceeds the 256-bvec limit. I'm not sure if
> Ming Lei's patch got in to 4.6 yet, but try this:
> https://lkml.org/lkml/2016/4/5/1046
>
> and maybe Shaohua Li's patch too:
> http://www.spinics.net/lists/raid/msg51830.html
Trying these is still on my TODO list (thus the belated reply here) but based
on the responses from Tim Small I'm doubtful this will fix anything, as it
sounds like he has the same problem (symptoms sound exactly the same) and he
says the patches didn't help.
Like Tim, I also chose a large bucket size because the manual page told me to.
Based on the high-level description of bcache and my knowledge of how flash
works, it certainly sounds necessary.
Perhaps the union of people who read manpages and people who use LUKS like
this is very small. :)
James
next prev parent reply other threads:[~2016-05-18 17:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-08 18:39 bcache gets stuck flushing writeback cache when used in combination with LUKS/dm-crypt and non-default bucket size James Johnston
2016-05-11 1:38 ` Eric Wheeler
2016-05-15 9:08 ` Tim Small
2016-05-16 13:02 ` Tim Small
2016-05-16 13:53 ` Tim Small
2016-05-19 23:15 ` Eric Wheeler
2016-05-18 17:01 ` James Johnston [this message]
2016-05-16 16:08 ` Tim Small
2016-05-19 23:22 ` Eric Wheeler
2016-05-20 6:59 ` James Johnston
2016-05-20 21:37 ` 'Eric Wheeler'
2016-05-22 4:26 ` James Johnston
2016-05-27 14:47 ` [PATCH] dm-crypt: Fix error with too large bios (was: bcache gets stuck flushing writeback cache when used in combination with LUKS/dm-crypt and non-default bucket size) Mikulas Patocka
2016-06-01 4:19 ` James Johnston
2016-05-20 20:22 ` bcache gets stuck flushing writeback cache when used in combination with LUKS/dm-crypt and non-default bucket size Eric Wheeler
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='01df01d1b126$f1fe1810$d5fa4830$@codenest.com' \
--to=johnstonj.public@codenest.com \
--cc=agk@redhat.com \
--cc=bcache@lists.ewheeler.net \
--cc=dm-crypt@saout.de \
--cc=dm-devel@redhat.com \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=snitzer@redhat.com \
/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).