On Thu, Aug 21, 2025 at 03:59:56PM +0200, Daniel Kiper wrote:
> On Fri, Jul 11, 2025 at 12:21:11PM +0800, Michael Chang via Grub-devel wrote:
> > On Btrfs, GRUB cannot update the environment block (grubenv) because
> > file based writes via blocklists are incompatible with Btrfs COW (Copy
> > On Write) design. Although GRUB’s filesystem drivers are read only,
> > environment updates rely on raw block access to fixed locations, which
> > is not safe on Btrfs due to its dynamic block relocation.
> >
> > To address this, we introduce support for storing the GRUB environment
> > block in a fixed block within Btrfs reserved bootloader area, an unused
> > region in the device header intended for bootloader use.
> >
> > This patch adds fs_envblk helpers to grub-editenv for accessing the
> > reserved area directly. Variables that require runtime write access
> > during boot, such as next_entry, will be mirrored into this external
> > block. Other variables will remain stored in the file based grubenv so
> > they can keep per snapshot.
> >
> > The embedding logic is also updated to mark the reserved area as used to
> > avoid conflicts with embedded core images.
> >
> > This enables support for runtime environment updates on Btrfs root
> > volumes, allowing tools like grub-reboot to boot an entry once.
> 
> The commit message suggests the patch should be split at least into two
> or more patches. So, please do that and rebase...

Thanks for the review. I'll split the patch into smaller chunks to
facilitate review in next version. 

Regards,
Michael

> 
> Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to