linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fusionio.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: Josef Bacik <JBacik@fusionio.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: set the free space control unit properly
Date: Wed, 29 May 2013 08:59:16 -0400	[thread overview]
Message-ID: <20130529125916.GB10043@localhost.localdomain> (raw)
In-Reply-To: <51A5794B.2030107@cn.fujitsu.com>

On Tue, May 28, 2013 at 09:43:07PM -0600, Miao Xie wrote:
> On 	tue, 28 May 2013 14:50:25 -0400, Josef Bacik wrote:
> > Stefan pointed out that xfstests generic/013 was failing because the free space
> > cache checker was complaining with leafsize of 16k.  Turns out this is because
> > we were unconditionally using root->sectorsize as the free space ctl unit in the
> > kernel, which doesn't work out if leafsize != sectorsize.  This caused the in
> > memory free space cache to get screwed up which translated to a wrong space
> > cache on disk.  This patch fixes the problem by not carrying the sectorsize in
> > the block group since we have the ctl->unit, and we set the ctl->unit according
> > to the type of block group we are.  This made generic/013 pass with 16k
> > leafsize, whereas before it failed every single time.  Thanks,
> 
> But this patch will make the old filesystem be corrupted because one bit in it
> equals one sector(4K), not 16K.
> 

Balls you're right, I'll fix progs and think about how to fix this at some point
in the future.  Thanks,

Josef

      reply	other threads:[~2013-05-29 12:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 18:50 [PATCH] Btrfs: set the free space control unit properly Josef Bacik
2013-05-29  3:43 ` Miao Xie
2013-05-29 12:59   ` Josef Bacik [this message]

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=20130529125916.GB10043@localhost.localdomain \
    --to=jbacik@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=miaox@cn.fujitsu.com \
    /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).