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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html