From: Pavel Machek <pavel@ucw.cz>
To: Eric Wheeler <bcache@lists.ewheeler.net>
Cc: Vojtech Pavlik <vojtech@ucw.cz>, Theodore Ts'o <tytso@mit.edu>,
Reindl Harald <h.reindl@thelounge.net>,
linux-ext4@vger.kernel.org,
kernel list <linux-kernel@vger.kernel.org>,
kent.overstreet@gmail.com, linux-bcache@vger.kernel.org
Subject: Re: bcache with existing ext4 filesystem
Date: Wed, 26 Jul 2017 22:01:28 +0200 [thread overview]
Message-ID: <20170726200128.GB26445@amd> (raw)
In-Reply-To: <alpine.LRH.2.11.1707261728460.9683@mail.ewheeler.net>
[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]
Hi!
> > > > > > Unfortunately, that would mean shifting 400GB data 8KB forward, and
> > > > > > compatibility problems. So I'd prefer adding bcache superblock into
> > > > > > the reserved space, so I can have caching _and_ compatibility with
> > > > > > grub2 etc (and avoid 400GB move):
> > > > >
> > > > > The common way to do that is to move the beginning of the partition,
> > > > > assuming your ext4 lives in a partition.
> > > >
> > > > Well... if I move the partition, grub2 (etc) will be unable to access
> > > > data on it. (Plus I do not have free space before some of the
> > > > partitions I'd like to be cached).
> > >
> > > Why not use dm-linear and prepend space for the bcache superblock? If
> > > this is your boot device, then you would need to write a custom
> > > initrd hook too.
> >
> > Thanks for a pointer. That would actually work, but I'd have to be
> > very, very careful using it...
> >
> > ...because if I, or systemd or some kind of automounter sees the
> > underlying device (sda4) and writes to it (it is valid ext4 after
> > all), I'll have inconsistent base device and cache ... and that will
> > be asking for major problems (even in writethrough mode).
>
> Sigh. Gone are the days when distributions would only mount filesystems
> if you ask them to.
>
> If this is a desktop, then I'm not sure what to suggest. But for
This is a desktop.
> with no GUI, turn off the grub2 osprober (GRUB_DISABLE_OS_PROBER="true" in
> /etc/sysconfig/grub). If this was LVM, then I would suggest also setting
> global_filter in lvm.conf. If you find other places that need poked to
> prevent automounting then please let me know!
>
> As for ext4 feature bits, can they be arbitrarily named? (I think they are
> bits, so maybe not). Maybe propose a patch to ext4 to provide a
Hmm. I guess I could just set "read-only compatible" bit "this device
has a cache"... but last time I checked, ext3 still replayed log
during read-only mount...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-07-26 20:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-24 18:57 bcache with existing ext4 filesystem Pavel Machek
2017-07-24 19:08 ` Reindl Harald
2017-07-24 19:15 ` Pavel Machek
2017-07-24 19:27 ` Theodore Ts'o
2017-07-24 20:04 ` Pavel Machek
2017-07-25 4:51 ` Theodore Ts'o
2017-07-25 6:43 ` Pavel Machek
2017-07-25 10:32 ` Vojtech Pavlik
2017-07-25 11:12 ` Pavel Machek
2017-07-25 16:10 ` Theodore Ts'o
2017-07-25 18:13 ` Eric Wheeler
2017-07-25 22:02 ` Pavel Machek
2017-07-26 17:41 ` Eric Wheeler
2017-07-26 18:59 ` Austin S. Hemmelgarn
2017-07-26 19:16 ` Eric Wheeler
2017-07-26 20:01 ` Pavel Machek [this message]
2017-07-25 13:46 ` Pavel Machek
2017-07-25 18:02 ` Theodore Ts'o
2017-07-25 20:55 ` Pavel Machek
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=20170726200128.GB26445@amd \
--to=pavel@ucw.cz \
--cc=bcache@lists.ewheeler.net \
--cc=h.reindl@thelounge.net \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=vojtech@ucw.cz \
/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).