From: Thomas Glanzmann Subject: Re: Data Deduplication with the help of an online filesystem check Date: Wed, 29 Apr 2009 17:26:14 +0200 Message-ID: <20090429152614.GJ22917@cip.informatik.uni-erlangen.de> References: <20090428205242.GA13112@cip.informatik.uni-erlangen.de> <1240952295.15136.73.camel@think.oraclecorp.com> <20090428211255.GB13112@cip.informatik.uni-erlangen.de> <1240953977.15136.76.camel@think.oraclecorp.com> <20090428221455.GA27794@cip.informatik.uni-erlangen.de> <1240960687.15136.88.camel@think.oraclecorp.com> <20090429120300.GG22917@cip.informatik.uni-erlangen.de> <1241010875.20099.2.camel@think.oraclecorp.com> <20090429135804.GI22917@cip.informatik.uni-erlangen.de> <1241015512.20099.30.camel@think.oraclecorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Heinz-Josef Claes , Edward Shishkin , Tomasz Chmielewski , linux-btrfs@vger.kernel.org To: Chris Mason Return-path: In-Reply-To: <1241015512.20099.30.camel@think.oraclecorp.com> List-ID: Hello Chris, > Your database should know, and the ioctl could check to see if the > source and destination already point to the same thing before doing > anything expensive. I see. > > So, if I only have file, offset, len and not the block number, is there > > a way from userland to tell if two blocks are already point to the same > > block? > You can use the fiemap ioctl. I see. One more question, in my dedup test VMs, I had a block that was often referenced these are the top block. The last one alone saves 3 Gbyte of data. My question is now, how often can a block in btrfs be refferenced? top 4 block counts for 8 Kbyte: 32055 59514 63606 415252 Thomas