linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: linux-ext4@vger.kernel.org,
	kernel list <linux-kernel@vger.kernel.org>,
	tytso@mit.edu, kent.overstreet@gmail.com,
	linux-bcache@vger.kernel.org
Subject: bcache with existing ext4 filesystem
Date: Mon, 24 Jul 2017 20:57:04 +0200	[thread overview]
Message-ID: <20170724185703.GA31422@amd> (raw)

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Hi!

Would it be feasible to run bcache (write-through) with existing ext4
filesystem?

I have 400GB of data I'd rather not move, and SSD I could use for
caching. Ok, SSD is connecte over USB2, but I guess it is still way
faster then seeking harddrive on random access... I have kernels on
that partition, so it would be nice if grub2 could still read it, and
it would be good if I could go back to old kernel.

IIRC ext* filesystems have first 1024 bytes reserved for the
bootloader. Unfortunately, cache_sb is bigger than that, and it is
normally at offset 4K in the disk.

Is cache_sb.d[] being used for backing devices? Could I just make
SB_JOURNAL_BUCKETS smaller?

Remaining problem is how to invalidate the cache when someone mounts
the filesystem without bcache; but I believe that should be possible
to check using "last mount time" field in ext4 superblock.

bache would save "last mount time" during shutdown, and would just
consider the cache stale if someone mounted it in between....

Does the plan look reasonable?

Thanks,

									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 --]

             reply	other threads:[~2017-07-24 18:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 18:57 Pavel Machek [this message]
2017-07-24 19:08 ` bcache with existing ext4 filesystem 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
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=20170724185703.GA31422@amd \
    --to=pavel@ucw.cz \
    --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 \
    /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).