All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz
Cc: zab@redhat.com, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2 v2] btrfs: btrfs_rm_device() should zero mirror SB as well
Date: Sun, 06 Apr 2014 12:59:42 +0800	[thread overview]
Message-ID: <5340DF3E.2070601@oracle.com> (raw)
In-Reply-To: <20140404123925.GS29256@twin.jikos.cz>



On 04/04/2014 20:39, David Sterba wrote:
> On Mon, Mar 31, 2014 at 10:13:56PM +0800, Anand Jain wrote:
>> From: Anand Jain <anand.jain@oracle.com>
>>
>> This fix will ensure all SB copies on the disk is zeroed
>> when the disk is intentionally removed. This helps to
>> better manage disks in the user land.
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>>
>> btrfs: don't double brelse on device rm
>>
>> Device removal currently causes bdev removal to try to double free a bh
>> in the bdev:
>>
>> [   55.714833] WARNING: at fs/buffer.c:1160 __brelse+0x36/0x40()
>> [   55.714833] VFS: brelse: Trying to free free buffer
>>
>> Commit 7e3d9ebb1 added a double release of the bh for a device being
>> removed when all the supers don't fit in the device.  In that case it
>> releases the bh assuming that it's going to read a new one, finds that
>> it won't read, and goes to a label that releases the bh again.
>>
>> All it needed to do was only brelse() right before overwriting the
>> current bh with __bread().
>>
>> Signed-off-by: Zach Brown <zab@redhat.com>
>
> This is a bit confusing, two changelogs, one patch, the referenced
> commit id does not in fact exist. To keep all due credits, 2 patches
> would make sense but ... up to you.

  Sorry to know it was confusing. I have sent out V3 hope that's better.

-Anand


> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2014-04-06  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 14:13 [PATCH 1/2 v2] btrfs: btrfs_rm_device() should zero mirror SB as well Anand Jain
2014-03-31 14:13 ` [PATCH 2/2 v2] Btrfs: all super blocks of the replaced disk must be scratched Anand Jain
2014-04-04 12:39 ` [PATCH 1/2 v2] btrfs: btrfs_rm_device() should zero mirror SB as well David Sterba
2014-04-06  4:59   ` Anand Jain [this message]
2014-04-06  4:59 ` [PATCH v3] " Anand Jain

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=5340DF3E.2070601@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zab@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.