From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net ([212.227.15.15]:58749 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbdITXTu (ORCPT ); Wed, 20 Sep 2017 19:19:50 -0400 Subject: Re: WARNING: CPU: 3 PID: 439 at fs/btrfs/ctree.h:1559 btrfs_update_device+0x1c5/0x1d0 [btrfs] To: Rich Rauenzahn , Rich Rauenzahn , Btrfs BTRFS References: <69ee49ff-d2d6-bec9-055c-18697b71ec20@gmx.com> <1f8d39cd-a36a-6b4d-dea8-7a9acd9f9396@shroop.net> <8df27746-487b-c5f2-59a0-8eb24b95571a@gmx.com> <417135a6-2cba-578b-e2a2-264f8cd53ce5@shroop.net> From: Qu Wenruo Message-ID: Date: Thu, 21 Sep 2017 07:19:39 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 2017年09月21日 02:10, Rich Rauenzahn wrote: > > On 9/20/2017 9:58 AM, Rich Rauenzahn wrote: >> >> What's the most direct way to do that?  (Was about to risk breaking >> the mirror and repartitioning!  I'd rather not!) >> >> Hmm -- maybe this worked: >> >> $ sudo btrfs filesystem resize -1m /.MEDIA/ >> Resize '/.MEDIA/' of '-1m' > No, doesn't seem to have worked.  I used btrfs fi show --raw /.MEDIA to > see the size in bytes, and then ... > > sudo btrfs filesystem resize N:SIZE /.MEDIA/ > Yes, this is what I did to my fs. While in fact you can do it better by using: btrfs fi resize N:max Or btrfs fi resize N:-1 The first one will resize the devid N to its max size. The 2nd one will resize the devid N to current size - 1 (byte). Both will go through shrink routine, which will do the round_down. Thanks, Qu > Where N was the disk number in the show output, and SIZE was the number > of bytes to set it to that was a multiple of 4k. > > Rich