linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>,
	linux-btrfs@vger.kernel.org
Subject: Re: call trace: WARNING: at /build/linux-uwVqDp/linux-4.16.16/fs/btrfs/ctree.h:1565 btrfs_update_device
Date: Thu, 28 Jun 2018 22:58:01 +0800	[thread overview]
Message-ID: <43a3fb8f-d8a8-7e2f-a143-207bd3ba8c74@gmx.com> (raw)
In-Reply-To: <f86948875cb746c6a8c74526913017052153d1bf.camel@scientia.net>


[-- Attachment #1.1: Type: text/plain, Size: 1366 bytes --]



On 2018年06月28日 22:17, Christoph Anton Mitterer wrote:
> On Thu, 2018-06-28 at 22:09 +0800, Qu Wenruo wrote:
>>> [   72.168662] WARNING: CPU: 0 PID: 242 at /build/linux-
>>> uwVqDp/linux-4.16.16/fs/btrfs/ctree.h:1565
>>> btrfs_update_device+0x1b2/0x1c0It
>> looks like it's the old WARN_ON() for unaligned device size.
>> Would you please verify if it is the case?
> 
> # blockdev --getsize64 /dev/sdb2 /dev/sda2
> 999131127296
> 999131127296
> 
> 
> Since getsize64 returns bytes and not sectors, I suppose it would need
> to be aligned to 1024 by the least?
> 
> 999131127296 / 1024 = 975713991,5
> 
> So it's not.

So it's the case.

> 
> 
>> If so, "btrfs rescue fix-device-size" should handle it pretty well.
> 
> I guess this needs to be done with the fs unmounted?

Yep.

> Anything to consider since I have RAID1 (except from running it on both
> devices)?

Nothing special. Btrfs-progs will handle it pretty well.

> 
> 
> Also, it's a bit strange that this error occurred never before (though
> the btrfs-restore manpage says the kernel would check for this since
> 4.11).

Because the WARN_ON() is newly added.

> 
> It would further be nice if btrfs-check would warn about this.

Yep, latest will warn about it, and --repair can also fix it too.

Thanks,
Qu

> 
> 
> Thanks,
> Chris.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2018-06-28 14:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 13:19 call trace: WARNING: at /build/linux-uwVqDp/linux-4.16.16/fs/btrfs/ctree.h:1565 btrfs_update_device Christoph Anton Mitterer
2018-06-28 13:25 ` Nikolay Borisov
2018-06-28 14:09 ` Qu Wenruo
2018-06-28 14:17   ` Christoph Anton Mitterer
2018-06-28 14:25     ` Nikolay Borisov
2018-06-28 14:58     ` Qu Wenruo [this message]
2018-06-29  1:05       ` Christoph Anton Mitterer
2018-06-29  1:10         ` Qu Wenruo
2018-06-29 12:55           ` Christoph Anton Mitterer

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=43a3fb8f-d8a8-7e2f-a143-207bd3ba8c74@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=calestyo@scientia.net \
    --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).