Thread (19 messages) 19 messages, 6 authors, 2017-07-26

Re: bcache with existing ext4 filesystem

From: Pavel Machek <hidden>
Date: 2017-07-25 11:12:14
Also in: linux-bcache, lkml

On Tue 2017-07-25 12:32:48, Vojtech Pavlik wrote:
On Tue, Jul 25, 2017 at 08:43:04AM +0200, Pavel Machek wrote:
quoted
On Tue 2017-07-25 00:51:56, Theodore Ts'o wrote:
quoted
On Mon, Jul 24, 2017 at 10:04:51PM +0200, Pavel Machek wrote:
quoted
Question for you was... Is the first 1KiB of each ext4 filesystem still
free and "reserved for a bootloader"?
Yes.
Thanks.
quoted
quoted
If I needed more for bcache superblock (8KiB, IIRC), would that be
easy to accomplish on existing filesystem?
Huh?  Why would the bcache superblock matter when you're talking about
the ext4 layout?  The bcache superblock will be on the bcache
device/partition, and the ext4 superblock will be on the ext4
device/partition.
I'd like to enable bcache on already existing ext4 partition. AFAICT
normal situation, even on the backing device, is:

| 8KiB bcache superblock | 1KiB reserved | ext4 superblock | 400GB data |

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).
I don't see how overlapping the ext4 and the bcache backing device
starts would give you what you want, because bcache assumes the
backing device data starts with an offset.
My plan is to make offset 0. AFAICT bcache superblock can be shrunk.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help