* compress-force mount option documentation is ambiguous
@ 2020-08-17 20:18 Peter Kese
2020-08-18 0:10 ` Andrew Skretvedt
2020-08-18 6:18 ` Nikolay Borisov
0 siblings, 2 replies; 5+ messages in thread
From: Peter Kese @ 2020-08-17 20:18 UTC (permalink / raw)
To: linux-btrfs
The `compress-force` mount option which states:
"If compress-force is specified, then compression will always be
attempted, but the data may end up uncompressed if the compression
would make them larger."
It is unclear whether that means that compress-force will really
ALWAYS attempt compression, or it will respect the +c / -c file
attributes?
Which one is it? Can we fix the documentation?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compress-force mount option documentation is ambiguous
2020-08-17 20:18 compress-force mount option documentation is ambiguous Peter Kese
@ 2020-08-18 0:10 ` Andrew Skretvedt
2020-08-18 6:39 ` Nikolay Borisov
2020-08-18 6:18 ` Nikolay Borisov
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Skretvedt @ 2020-08-18 0:10 UTC (permalink / raw)
To: linux-btrfs
On 8/17/20 3:18 PM, Peter Kese wrote:
> The `compress-force` mount option which states:
>
> "If compress-force is specified, then compression will always be
> attempted, but the data may end up uncompressed if the compression
> would make them larger."
>
Meanwhile, on my system (Linux Mint 18.3 Sylvia (tracks Ubuntu Xenial)),
the manpage for `mount` (July 2014 - util-linux 2.27.1), in the section
on btrfs-specific mount options says:
> If compress-force is specified, all files will be compressed,
> whether or not they compress well. If compression is enabled,
> nodatacow and nodata‐ sum are disabled.
While experience suggests to me I shouldn't necessarily consider `man 8
mount` authoritative for every filesystem supported, the reality that
inexperienced users will consult it for authoritative advice suggests
that every effort must be made to keep its information in-sync with
documentation published elsewhere. Alternatively, it's specific
authoritativeness could be called out and then refer the user to where
the most current details can be found, e.g. `man 5 btrfs`. This is kinda
done already, as `man 8 mount` does say, immediately under its
FILESYSTEM-SPECIFIC MOUNT OPTIONS header:
> What options are supported depends a bit on the running kernel.
> More info may be found in the kernel source subdirectory
> Documentation/filesystems.
as a catch-all. *shrug*
--
OpenPGP 0xC6901B2A6C976BB3 (https://keys.openpgp.org)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compress-force mount option documentation is ambiguous
2020-08-18 0:10 ` Andrew Skretvedt
@ 2020-08-18 6:39 ` Nikolay Borisov
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay Borisov @ 2020-08-18 6:39 UTC (permalink / raw)
To: Andrew Skretvedt, linux-btrfs
On 18.08.20 г. 3:10 ч., Andrew Skretvedt wrote:
> If compress-force is specified, all files will be compressed,
> whether or not they compress well. If compression is enabled,
> nodatacow and nodata‐ sum are disabled.
And this indeed has been the status quo for quite some time, judging by
the respective code in compress_file_range.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compress-force mount option documentation is ambiguous
2020-08-17 20:18 compress-force mount option documentation is ambiguous Peter Kese
2020-08-18 0:10 ` Andrew Skretvedt
@ 2020-08-18 6:18 ` Nikolay Borisov
2020-08-18 6:34 ` Nikolay Borisov
1 sibling, 1 reply; 5+ messages in thread
From: Nikolay Borisov @ 2020-08-18 6:18 UTC (permalink / raw)
To: Peter Kese, linux-btrfs
On 17.08.20 г. 23:18 ч., Peter Kese wrote:
> The `compress-force` mount option which states:
>
> "If compress-force is specified, then compression will always be
> attempted, but the data may end up uncompressed if the compression
> would make them larger."
So which part is ambiguous - it clearly states that so long as
compress-force is specified compression is _always_ attempted but it
might not always be performed because of heuristics present that check if
compressed size < original size. That heuristics is independent of
whether compression is enabled or not. I.e it is always performed if
compression is enabled. In this regard I think the text is clear, how
would you recommend changing the docs?
>
> It is unclear whether that means that compress-force will really
> ALWAYS attempt compression, or it will respect the +c / -c file
> attributes?
>
> Which one is it? Can we fix the documentation?
> Thanks
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compress-force mount option documentation is ambiguous
2020-08-18 6:18 ` Nikolay Borisov
@ 2020-08-18 6:34 ` Nikolay Borisov
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay Borisov @ 2020-08-18 6:34 UTC (permalink / raw)
To: Peter Kese, linux-btrfs
On 18.08.20 г. 9:18 ч., Nikolay Borisov wrote:
>
>
> On 17.08.20 г. 23:18 ч., Peter Kese wrote:
>> The `compress-force` mount option which states:
>>
>> "If compress-force is specified, then compression will always be
>> attempted, but the data may end up uncompressed if the compression
>> would make them larger."
>
> So which part is ambiguous - it clearly states that so long as
> compress-force is specified compression is _always_ attempted but it
> might not always be performed because of heuristics present that check if
> compressed size < original size. That heuristics is independent of
> whether compression is enabled or not. I.e it is always performed if
> compression is enabled. In this regard I think the text is clear, how
> would you recommend changing the docs?
Huhz I was wrong, indeed if force compress is enabled then even if the
file is made larger then btrfs will still "compress" it.
>
>>
>> It is unclear whether that means that compress-force will really
>> ALWAYS attempt compression, or it will respect the +c / -c file
>> attributes?
FORCE_COMPRESS disregards +/- c in this case.
>>
>> Which one is it? Can we fix the documentation?
>
>
>
>> Thanks
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-18 6:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-17 20:18 compress-force mount option documentation is ambiguous Peter Kese
2020-08-18 0:10 ` Andrew Skretvedt
2020-08-18 6:39 ` Nikolay Borisov
2020-08-18 6:18 ` Nikolay Borisov
2020-08-18 6:34 ` Nikolay Borisov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox