Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: li zhang <zhanglikernel@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH V4] btrfs-progs: fix btrfs resize failed.
Date: Thu, 28 Jul 2022 17:34:23 +0200	[thread overview]
Message-ID: <20220728153423.GG13489@twin.jikos.cz> (raw)
In-Reply-To: <c806c638-a02b-3bd6-f9cc-d3acb147cd63@gmx.com>

On Tue, Jul 26, 2022 at 01:04:39PM +0800, Qu Wenruo wrote:
> On 2022/7/26 12:56, li zhang wrote:
> > Hi, I have another question, issue 471, extending resizing to support
> > the parameter all to represent all devices, I agree this should
> > iterate over all devices in userspace as it works on older kernel
> > versions. But what happens if the command fails?
> 
> Just error out at the failed device, and print a proper error message.

Agreed, what device (id, maybe path), original size and target size so
the operation can be repeated or the other devices resized back.

If it's a one message per line like we have now then the error could
repeat some key information and that should be sufficient.

> 
> > For example, if the
> > filesystem contains 3 devices, 2 of them resize successfully and the
> > last one fails, in this case I mean the whole command should fail,
> 
> Yes, the command should fail, even if some devices have been resized
> successfully.
> 
> > which means it's better to put these 3 resize subcommands in a
> > transaction. So I'm stuck in a dilemma whether to implement all device
> > resizing in user space or kernel space.
> 
> I still prefer to do it inside user space.
> 
> I don't think there is anything wrong if we resized some devices but not
> all, we still return an error.
> 
> Sure, it's better to output some messages to indicate that some devices
> have been resized, other than that, I see no problem at all.

Agreed.

  reply	other threads:[~2022-07-28 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 16:46 [PATCH V4] btrfs-progs: fix btrfs resize failed Li Zhang
2022-07-26  1:28 ` Qu Wenruo
2022-07-26  4:56   ` li zhang
2022-07-26  5:04     ` Qu Wenruo
2022-07-28 15:34       ` David Sterba [this message]
2022-07-28 15:31 ` 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=20220728153423.GG13489@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=zhanglikernel@gmail.com \
    /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