[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] i386-pc: build btrfs zstd support into separate module
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] i386-pc: build btrfs zstd support into separate module |
Date: |
Wed, 1 Sep 2021 18:38:22 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Aug 31, 2021 at 03:12:28PM +0800, Michael Chang via Grub-devel wrote:
> The zstd support in btrfs brings significant size increment to the
> on-disk image that it can no longer fit into btrfs bootloader area and
> short mbr gap.
>
> In order to support grub update on outstanding i386-pc setup with these
> size constraints remain in place, here we build the zstd suppprt of
> btrfs into a separate module, named btrfs_zstd, to alleviate the size
> change. Please note this only makes it's way to i386-pc, other
> architecture is not affected.
I am OK with extracting zstd code from btrfs code. However, I want that be
done for all architectures and platforms. No exceptions.
[...]
> diff --git a/grub-core/fs/btrfs_zstd.c b/grub-core/fs/btrfs_zstd.c
> new file mode 100644
> index 000000000..d5d1e013c
> --- /dev/null
> +++ b/grub-core/fs/btrfs_zstd.c
> @@ -0,0 +1,36 @@
> +/*
> + * GRUB -- GRand Unified Bootloader
> + * Copyright (C) 2008 Free Software Foundation, Inc.
> + *
> + * GRUB is free software: you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation, either version 3 of the License, or
> + * (at your option) any later version.
> + *
> + * GRUB is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <grub/types.h>
> +#include <grub/dl.h>
> +/* For NULL. */
> +#include <grub/mm.h>
> +#include <grub/btrfs.h>
> +#include <grub/lib/zstd.h>
> +
> +GRUB_MOD_LICENSE ("GPLv3+");
> +
> +GRUB_MOD_INIT (btrfs_zstd)
> +{
> + grub_btrfs_zstd_decompress_func = grub_zstd_decompress;
Please create a function in btrfs module which will do this for you.
> +}
> +
> +GRUB_MOD_FINI (btrfs_zstd)
> +{
> + grub_btrfs_zstd_decompress_func = NULL;
Ditto.
Last but not least, please CC original author of zstd support next time.
Daniel
- Re: [PATCH] i386-pc: build btrfs zstd support into separate module,
Daniel Kiper <=