All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Anand Jain <anand.jain@oracle.com>,
	dsterba@suse.cz, David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: Re: [PATCH] btrfs-progs: convert, warn if converting a fs which won't mount
Date: Wed, 4 Mar 2020 10:55:36 +0800	[thread overview]
Message-ID: <6f9bf93f-30bf-2a1a-b345-f42c41ac4d1a@gmx.com> (raw)
In-Reply-To: <fc02b904-5af5-035f-bb62-a2982409ffbe@oracle.com>



On 2020/3/4 上午10:14, Anand Jain wrote:
>
>
> On 3/4/20 1:44 AM, David Sterba wrote:
>> On Fri, Feb 28, 2020 at 05:06:52PM +0800, Anand Jain wrote:
>>> On 2/28/20 4:27 PM, Qu Wenruo wrote:
>>>> On 2020/2/28 下午4:03, Anand Jain wrote:
>>>>> On aarch64 with pagesize 64k, btrfs-convert of ext4 is successful,
>>>>> but it won't mount because we don't yet support subpage blocksize/
>>>>> sectorsize.
>>>>>
>>>>>    BTRFS error (device vda): sectorsize 4096 not supported yet,
>>>>> only support 65536
>>>>>
>>>>> So in this case during convert provide a warning and a 10s delay to
>>>>> terminate the command.
>>>>
>>>> This is no different than calling mkfs.btrfs -s 64k on x86 system.
>>>> And I see no warning from mkfs.btrfs.
>>>>
>>>> Thus I don't see the point of only introducing such warning to
>>>> btrfs-convert.
>>>>
>>>
>>> I have equal weight-age on the choices if blocksize != pagesize viz..
>>>     delay and warn (this patch)
>>>     quit (Nikolay).
>>>     keep it as it is without warning (Qu).
>>>
>>>    Here we are dealing with already user data. Should it be different
>>>    from mkfs?
>>>    Quit is fine, but convert tool should it be system neutral?
>>
>> The delays should be used in exceptional cases, now we have it for check
>> --repair and for unfiltered balance. Both on user request because
>> expecting users to know everything in advance what the commands do has
>> shown to be too optimistic.
>>
>> Refusing to allow the conversion does not make much sense for usability,
>> mising the unmounted and mounted constraints.
>>
>> A warning might be in place but there's nothing wrong to let the user do
>> the conversion.
>>
>> I've tried mkfs.ext4 with 64k block size and it warns and in the
>> interactive session wants to confirm that by the user:
>>
>>    $ mkfs.ext4 -b 64k img
>>    Warning: blocksize 65536 not usable on most systems.
>>    mke2fs 1.45.5 (07-Jan-2020)
>>    img contains a ext4 file system
>>       created on Tue Mar  3 18:41:46 2020
>>    Proceed anyway? (y,N) y
>>    mkfs.ext4: 65536-byte blocks too big for system (max 4096)
>>    Proceed anyway? (y,N) y
>>    Warning: 65536-byte blocks too big for system (max 4096), forced to
>> continue
>>    Creating filesystem with 32768 64k blocks and 32768 inodes
>>
>>    Allocating group tables: done
>>    Writing inode tables: done
>>    Creating journal (4096 blocks): done
>>    Writing superblocks and filesystem accounting information: done
>>
>
> Just warn is reasonable. But I don't think you meant to introduce
> interactive part similar to mkfs.ext4 in btrfs-convert? we don't have it
> anywhere in btrfs-progs. As the btrfs-convert is not an exceptional case
> (though it deals with the user data) removing the delay makes sense,
> mover over the conversion and the rollback does not take much time in
> general.
>
> Thanks, Anand

+1 for warning only, especially when btrfs-convert is revertable, unlike
mkfs.

Thanks,
Qu

  reply	other threads:[~2020-03-04  2:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  8:03 [PATCH] btrfs-progs: convert, warn if converting a fs which won't mount Anand Jain
2020-02-28  8:13 ` Nikolay Borisov
2020-02-28 10:17   ` Roman Mamedov
2020-02-28  8:27 ` Qu Wenruo
2020-02-28  9:06   ` Anand Jain
2020-02-28  9:11     ` Qu Wenruo
2020-03-03 17:44     ` David Sterba
2020-03-04  2:14       ` Anand Jain
2020-03-04  2:55         ` Qu Wenruo [this message]
2020-03-04 13:32         ` David Sterba
2020-03-04 15:22           ` Anand Jain

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=6f9bf93f-30bf-2a1a-b345-f42c41ac4d1a@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.