From: Zhao Lei <zhaolei@cn.fujitsu.com>
To: <dsterba@suse.cz>
Cc: <linux-btrfs@vger.kernel.org>, <clm@fb.com>
Subject: RE: [PATCH] btrfs-progs: mkfs: Enable -d dup for single device
Date: Tue, 13 Oct 2015 21:13:17 +0800 [thread overview]
Message-ID: <003201d105b8$ed549600$c7fdc200$@cn.fujitsu.com> (raw)
In-Reply-To: <20151013123618.GI27761@twin.jikos.cz>
Hi, David Sterba
> -----Original Message-----
> From: David Sterba [mailto:dsterba@suse.cz]
> Sent: Tuesday, October 13, 2015 8:36 PM
> To: Zhao Lei <zhaolei@cn.fujitsu.com>
> Cc: dsterba@suse.cz; linux-btrfs@vger.kernel.org; clm@fb.com
> Subject: Re: [PATCH] btrfs-progs: mkfs: Enable -d dup for single device
>
> On Tue, Oct 13, 2015 at 07:40:30PM +0800, Zhao Lei wrote:
> > > What I remember from the comment is that "it's slightly offset that
> > > would lead to corruption".
> >
> > Before this patch, I had done git blame to search why the condition
> > was added, and hadn't found the exact reason.
>
> found it: commit bc3f116fec194f1d7329b160c266fe16b9266a1e and it was not
> aobut data/dup but mixed bgs with sectorisze != nodesize:
>
> 26 + nodesize = btrfs_super_nodesize(disk_super);
> 27 + leafsize = btrfs_super_leafsize(disk_super);
> 28 + sectorsize = btrfs_super_sectorsize(disk_super);
> 29 + stripesize = btrfs_super_stripesize(disk_super);
> 30 +
> 31 + /*
> 32 + * mixed block groups end up with duplicate but slightly offset
> 33 + * extent buffers for the same range. It leads to corruptions
> 34 + */
> 35 + if ((features & BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS)
> &&
> 36 + (sectorsize != leafsize)) {
> 37 + printk(KERN_WARNING "btrfs: unequal
> leaf/node/sector sizes "
> 38 + "are not allowed for mixed block
> groups on %s\n",
> 39 + sb->s_id);
> 40 + goto fail_alloc;
> 41 + }
> 42 +
>
Thanks for this information, I'll investigate is similar problem in non-mixed
with dup.
> > I will queue xfstests(btrfs/generic) at this profile with all mount
> > option for multi-times, to check is something wrong with this.
>
> Thanks. We need to cover more: the balance conversion forbids data/dup
> profile, I'm not sure if scrub handles that properly, and the ususal suspects in
> the rescue tools (fsck, restore, chunk-recover).
>
Agree, a new profile may be have potential problem because existing code
haven't check the support status.
IMHO, it is still necessary except we can prove this function should not exist.
But we'll need to do more works to confirm above potential problem.
Thanks
Zhaolei
next prev parent reply other threads:[~2015-10-13 13:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 10:29 [PATCH] btrfs-progs: mkfs: Enable -d dup for single device Zhao Lei
2015-10-13 11:28 ` David Sterba
2015-10-13 11:40 ` Zhao Lei
2015-10-13 12:36 ` David Sterba
2015-10-13 13:13 ` Zhao Lei [this message]
2015-10-27 14:20 ` David Sterba
2015-10-28 1:41 ` Zhao Lei
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='003201d105b8$ed549600$c7fdc200$@cn.fujitsu.com' \
--to=zhaolei@cn.fujitsu.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).