All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org,
	Austin S Hemmelgarn <ahferroin7@gmail.com>
Cc: Qu Wenruo <quwenruo.btrfs@gmx.com>
Subject: Re: [PATCH v2 7/7] btrfs-progs: Doc/mkfs: Add extra condition for rootdir option
Date: Tue, 12 Sep 2017 19:50:19 +0200	[thread overview]
Message-ID: <0a949fd9-f0cf-22c5-4e91-ebb1bfad1355@libero.it> (raw)
In-Reply-To: <20170912170304.GD29043@twin.jikos.cz>

On 09/12/2017 07:03 PM, David Sterba wrote:
> Say I want to prepare a minimal image but will provide a large file 
                                                ^^^^^^^^^^^^^^^^^^^^^^

I think that if the target is a file AND --minimize is passed, it is a reasonable expectation that the file is created "on the fly" and grown up to what needed.  

What I mean is that "--minimize" is passed (and a file is passed), mkfs.btrfs should 
a) create the file if it doesn't exist, and avoid any check about its length
b) truncate the file at the end

unfortunately the checks are in more places, so removing these checks is a quite intrusive change...

> at
> the beginning because I don't know what's the resulting size going to
> be. In this case, something like
> 
> $ mkfs.btrfs --rootdir dir/ --minimize image

BR
G.Baroncelli

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  reply	other threads:[~2017-09-12 17:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11  6:36 [PATCH v2 0/7] Mkfs: Rework --rootdir to a more generic behavior Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 1/7] btrfs-progs: Refactor find_next_chunk() to get rid of parameter root and objectid Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 2/7] btrfs-progs: Fix one-byte overlap bug in free_block_group_cache Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 3/7] btrfs-progs: mkfs: Rework rootdir option to avoid custom chunk layout Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 4/7] btrfs-progs: mkfs: Update allocation info before verbose output Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 5/7] btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 6/7] btrfs-progs: mkfs: Workaround BUG_ON caused by rootdir option Qu Wenruo
2017-09-11  6:36 ` [PATCH v2 7/7] btrfs-progs: Doc/mkfs: Add extra condition for " Qu Wenruo
2017-09-12 17:03   ` David Sterba
2017-09-12 17:50     ` Goffredo Baroncelli [this message]
2017-09-12 18:07       ` David Sterba
2017-09-13  0:32         ` Qu Wenruo
2017-09-15 12:56           ` David Sterba
2017-09-15 13:24             ` Qu Wenruo
2017-09-15 15:48               ` David Sterba
2017-09-16  1:15                 ` Qu Wenruo

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=0a949fd9-f0cf-22c5-4e91-ebb1bfad1355@libero.it \
    --to=kreijack@libero.it \
    --cc=ahferroin7@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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.