linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Filipe Manana <fdmanana@kernel.org>
To: "dsterba@suse.cz" <dsterba@suse.cz>,
	Filipe Manana <fdmanana@kernel.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] Btrfs-progs: add feature to get mininum size for resizing a fs/device
Date: Tue, 30 Jun 2015 16:20:48 +0100	[thread overview]
Message-ID: <CAL3q7H4yP20YKmB5PdqPkHqmn5VXeqMsYA7-707GanBdBkrU8A@mail.gmail.com> (raw)
In-Reply-To: <20150630151450.GH726@suse.cz>

On Tue, Jun 30, 2015 at 4:14 PM, David Sterba <dsterba@suse.cz> wrote:
> On Mon, Jun 29, 2015 at 05:15:12PM +0100, Filipe Manana wrote:
>> On Mon, Jun 29, 2015 at 4:42 PM, David Sterba <dsterba@suse.cz> wrote:
>> > On Wed, Jun 17, 2015 at 12:44:55PM +0100, fdmanana@kernel.org wrote:
>> > The test fails after I do this before unmount:
>> >
>> > $SUDO_HELPER $TOP/btrfs balance start -mconvert=single -sconvert=single -f $TEST_MNT
>> > shrink_test
>>
>> Where are you doing this exactly?
>>
>> Just tried the following:  https://friendpaste.com/2U7C4gBBLBjo4e2v1ZnJP2
>
> Like in the the first part of the diff.
>
>> > Output:
>> >
>> > ############### root_helper ../btrfs filesystem resize get_min_size ../tests/mnt
>> > 6480199680 bytes (6.04GiB)
>> > min size = 6480199680
>> > ############### root_helper ../btrfs filesystem resize 6480199680 ../tests/mnt
>> > ERROR: unable to resize '../tests/mnt' - No space left on device
>> > Resize '../tests/mnt' of '6480199680'
>> >
>> > Last successful resize before this was:
>> > Resize '../tests/mnt' of '7553941504'
>>
>> And it didn't fail for me on a 4.1 kernel at least. It produced those
>> 2 sizes as well, but it didn't fail for any of them.
>
> The test was run on 4.0.5, I'm building a clean 4.1 + integration to
> verify it there.

Nevermind, I managed to reproduce it but by placing the
balance/convert before the loop that tests the shrinking.
btrfs_can_relocate() returns 0, meaning relocation should succeed if
no other allocations happen in parallel, which is the case here, but
btrfs_relocate_block_group() fails with ENOSPC - one of this functions
isn't working as it should, I'll check what's going on soon.

thanks

  reply	other threads:[~2015-06-30 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 11:44 [PATCH] Btrfs-progs: add feature to get mininum size for resizing a fs/device fdmanana
2015-06-29 15:42 ` David Sterba
2015-06-29 16:15   ` Filipe Manana
2015-06-30 15:14     ` David Sterba
2015-06-30 15:20       ` Filipe Manana [this message]
2015-07-06 13:13 ` [PATCH v2] " fdmanana
2015-07-16 15:47   ` [PATCH v3] " fdmanana
2015-07-20 16:56     ` David Sterba

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=CAL3q7H4yP20YKmB5PdqPkHqmn5VXeqMsYA7-707GanBdBkrU8A@mail.gmail.com \
    --to=fdmanana@kernel.org \
    --cc=dsterba@suse.cz \
    --cc=fdmanana@suse.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).