linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: M G Berberich <btrfs@oss.m-berberich.de>
Cc: linux-btrfs@vger.kernel.org, Hubert Kario <kario@wit.edu.pl>
Subject: Re: “Bug”-report: inconsistency kernel <-> tools
Date: Fri, 31 Aug 2012 21:08:46 +0200	[thread overview]
Message-ID: <50410BBE.6030601@libero.it> (raw)
In-Reply-To: <503FAFF5.80204@libero.it>

On 08/30/2012 08:24 PM, Goffredo Baroncelli wrote:
>
> And magically the filesystem is now composed by three disks. However 4
> physical devices are show. This because the disk /dev/vdi superblock
> says that the disk is still valid (after the "btrfs device del" the disk
> is not touched any more)

I have to correct myself. When a device is removed its superblock is 
zero-ed (from btrfs_rm_device():

[...]
         /*
          * at this point, the device is zero sized.  We want to
          * remove it from the devices list and zero out the old super
          */
         if (clear_super) {
                 /* make sure this device isn't detected as part of
                  * the FS anymore
                  */
                 memset(&disk_super->magic, 0, sizeof(disk_super->magic));
                 set_buffer_dirty(bh);
                 sync_dirty_buffer(bh);
         }
[...]


clear_super is set to true when the device is writeable.



However making a test I found both the behaviours: sometime the removed 
disk disappears from the output of "btrfs fi show" and sometime not...

May be that there is a bug somewhere...


  parent reply	other threads:[~2012-08-31 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 19:52 “Bug”-report: inconsistency kernel <-> tools M G Berberich
2012-08-30 18:24 ` Goffredo Baroncelli
2012-08-30 18:37   ` Hugo Mills
2012-08-31 19:08   ` Goffredo Baroncelli [this message]
2012-08-31 21:37     ` [BTRFS-PROGS][BUG][PATCH] Incorrect detection of a removed device [was Re: “Bug”-report: inconsistency kernel <-> tools] Goffredo Baroncelli
2012-09-11 17:31     ` [RESPOST][BTRFS-PROGS][PATCH] btrfs_read_dev_super(): uninitialized variable Goffredo Baroncelli

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=50410BBE.6030601@libero.it \
    --to=kreijack@libero.it \
    --cc=btrfs@oss.m-berberich.de \
    --cc=kario@wit.edu.pl \
    --cc=kreijack@inwind.it \
    --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).