From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Warr Subject: Re: bcache vs enhanceio? Date: Tue, 19 Feb 2013 11:42:14 -0600 Message-ID: <5123B976.6050400@warr.net> References: <1514139.9.1361276600610.JavaMail.root@zimbra> <5123AB2B.9020209@warr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Joseph Glanville Cc: Roy Sigurd Karlsbakk , Kent Overstreet , Andrew Thrift , linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-bcache@vger.kernel.org On 02/19/2013 11:17 AM, Joseph Glanville wrote: > I am not Kent.. but I can answer your questions. > > 8<--- snip ---->8 >> A question for Kent, once you have bcache and it's tools built, >> installed and running, is there anything to stop a user from always >> tagging devices of whatever type you choose from having the superblock >> info to accept a cache dynamically? Example, if I create an MD RAID >> device and before I pvcreate or anything else with it I prep it for >> bcache but don't actually attach a cache device, is there any negative >> effects that can come from that? Can I then at anytime attach a cache >> device to it? I realize that once attached in writeback it becomes >> non-detachable. Same question for raw sd devices and LVM volumes. > In short yes, there are no detrimental effects for having backing > devices with superblocks that don't have associated cache sets. That's what I thought. This could be an argument for integration with DM or MD. Up-rev the superblock or metadata version and have the bcache bits in it by default. > > To touch on the second point about writeback - it's not so much that > it's non-detachable it's that you don't want the backing device to be > used while the cache is not attached and is dirty (contains unflushed > data). > > You can detach the cache safely from a writeback device by first > switching the cache to writethrough (or none from memory) and waiting > for the data to flush to the backing device. > Once that is done you can either continue to use it in writethrough > mode or you can detach it completely. > :) Typing faster than I am thinking. I should have said non-detachable while in writeback mode, or rather while it contains "dirty" blocks.