Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751423AbdGZUBc (ORCPT ); Wed, 26 Jul 2017 16:01:32 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39440 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbdGZUBa (ORCPT ); Wed, 26 Jul 2017 16:01:30 -0400 Date: Wed, 26 Jul 2017 22:01:28 +0200 From: Pavel Machek To: Eric Wheeler Cc: Vojtech Pavlik , "Theodore Ts'o" , Reindl Harald , linux-ext4@vger.kernel.org, kernel list , kent.overstreet@gmail.com, linux-bcache@vger.kernel.org Subject: Re: bcache with existing ext4 filesystem Message-ID: <20170726200128.GB26445@amd> References: <20170724191548.GA32425@amd> <20170724192718.t7n5zgualz5lillg@thunk.org> <20170724200451.GA4318@amd> <20170725045156.kbyaxj4mmi75yyt5@thunk.org> <20170725064304.GA11723@amd> <20170725103248.GA12869@suse.com> <20170725111210.GA5667@amd> <20170725220221.GA32240@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SkvwRMAIpAhPCcCJ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2656 Lines: 81 --SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 w= ith > > > > > > grub2 etc (and avoid 400GB move): > > > > >=20 > > > > > The common way to do that is to move the beginning of the partiti= on, > > > > > assuming your ext4 lives in a partition. > > > >=20 > > > > Well... if I move the partition, grub2 (etc) will be unable to acce= ss > > > > data on it. (Plus I do not have free space before some of the > > > > partitions I'd like to be cached). > > >=20 > > > Why not use dm-linear and prepend space for the bcache superblock? I= f=20 > > > this is your boot device, then you would need to write a custom=20 > > > initrd hook too. > >=20 > > Thanks for a pointer. That would actually work, but I'd have to be > > very, very careful using it... > >=20 > > ...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). >=20 > Sigh. Gone are the days when distributions would only mount filesystems= =20 > if you ask them to. =20 >=20 > 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=3D"true"= in=20 > /etc/sysconfig/grub). If this was LVM, then I would suggest also setting= =20 > global_filter in lvm.conf. If you find other places that need poked to= =20 > prevent automounting then please let me know! >=20 > As for ext4 feature bits, can they be arbitrarily named? (I think they ar= e=20 > 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 --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAll49RgACgkQMOfwapXb+vLQhACgjaZfHPlSYwonv0xAmxC4sz9c 1lMAnRfZvA13ZUBLCD5HB8lJhFgMe+oH =2ipz -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--