linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix missing s_id setting
Date: Wed, 6 Apr 2016 09:26:35 +0200	[thread overview]
Message-ID: <20160406092635.05f6c857@jupiter.sol.kaishome.de> (raw)
In-Reply-To: 57037CD8.2020804@jp.fujitsu.com

Am Tue, 5 Apr 2016 17:52:40 +0900
schrieb Tsutomu Itoh <t-itoh@jp.fujitsu.com>:

> On 2016/04/05 16:56, Anand Jain wrote:
> > On 04/05/2016 08:08 AM, Tsutomu Itoh wrote:  
> >> When fs_devices->latest_bdev is deleted or is replaced, sb->s_id
> >> has not been updated.
> >> As a result, the deleted device name is displayed by btrfs_printk.
> >>
> >> [before fix]
> >>   # btrfs dev del /dev/sdc4 /mnt2
> >>   # btrfs dev add /dev/sdb6 /mnt2
> >>
> >>   [  217.458249] BTRFS info (device sdc4): found 1 extents
> >>   [  217.695798] BTRFS info (device sdc4): disk deleted /dev/sdc4
> >>   [  217.941284] BTRFS info (device sdc4): disk added /dev/sdb6
> >>
> >> [after fix]
> >>   # btrfs dev del /dev/sdc4 /mnt2
> >>   # btrfs dev add /dev/sdb6 /mnt2
> >>
> >>   [   83.835072] BTRFS info (device sdc4): found 1 extents
> >>   [   84.080617] BTRFS info (device sdc3): disk deleted /dev/sdc4
> >>   [   84.401951] BTRFS info (device sdc3): disk added /dev/sdb6  
> >
> >
> >   [PATCH 05/13] Btrfs: fix fs logging for multi device
> >
> >   any comments ?
> >
> >   We would want to maintain the logging prefix as constant, so that
> >   troubleshooters with filters/scripts will find it helpful.  
> 
> I think it is good to make the identifier constant for the
> troubleshooting. However, fsid(uuid) is a little long for the print
> purpose, I think. (But an appropriate value isn't found...)

How about setting this to a CRC16 of the fsid(uuid)?

Or a value which is increased at every new mount, then logging which
devices belong to this value if the devices change?

Like:

BTRFS info: pool id 1 has (/dev/sdc4, /dev/sdb6)
BTRFS info (pool 1): found 1 extents
...
 
I think the way btrfs magically assigns any member device to the pool
somehow feels uncomfortable anyways. Btrfs better should expose the
compound devices as single device nodes like maybe /dev/btrfs/pool0
etc.

Every time I boot my multi-device btrfs, according to mount, the
associated device changes (sometimes mount says /dev/sda1 is mounted,
the next time it's /dev/sdb1). This is not deterministic - and that is
almost always bad some way or another.

-- 
Regards,
Kai

Replies to list-only preferred.


      parent reply	other threads:[~2016-04-06  7:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  0:08 [PATCH] Btrfs: fix missing s_id setting Tsutomu Itoh
2016-04-05  7:56 ` Anand Jain
2016-04-05  8:52   ` Tsutomu Itoh
2016-04-05 23:56     ` Tsutomu Itoh
2016-04-06  7:26     ` Kai Krakow [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=20160406092635.05f6c857@jupiter.sol.kaishome.de \
    --to=hurikhan77@gmail.com \
    --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).