mirror of
https://github.com/systemd/systemd.git
synced 2025-03-11 20:58:27 +03:00
mkfs-util: Add support for btrfs compression
Corresponding PR in btrfs-progs: https://github.com/kdave/btrfs-progs/pull/882
This commit is contained in:
parent
480f72c0a3
commit
42839efb10
@ -877,6 +877,12 @@
|
||||
<entry>lz4, lz4hc, lzma, deflate, libdeflate, zstd</entry>
|
||||
<entry><member><citerefentry project='man-pages'><refentrytitle>mkfs.erofs</refentrytitle><manvolnum>1</manvolnum></citerefentry></member></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><constant>btrfs</constant></entry>
|
||||
<entry>zlib, lzo, zstd</entry>
|
||||
<entry><member><citerefentry project='man-pages'><refentrytitle>mkfs.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry></member></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -461,6 +461,20 @@ int make_filesystem(
|
||||
if (quiet && strv_extend(&argv, "-q") < 0)
|
||||
return log_oom();
|
||||
|
||||
if (compression) {
|
||||
_cleanup_free_ char *c = NULL;
|
||||
|
||||
c = strdup(compression);
|
||||
if (!c)
|
||||
return log_oom();
|
||||
|
||||
if (compression_level && !strextend(&c, ":", compression_level))
|
||||
return log_oom();
|
||||
|
||||
if (strv_extend_many(&argv, "--compress", c) < 0)
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
/* mkfs.btrfs unconditionally warns about several settings changing from v5.15 onwards which
|
||||
* isn't silenced by "-q", so let's redirect stdout to /dev/null as well. */
|
||||
if (quiet)
|
||||
|
Loading…
x
Reference in New Issue
Block a user