Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: kreijack@inwind.it, Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: GRUB writing to grubenv outside of kernel fs code
Date: Wed, 19 Sep 2018 15:34:42 -0400	[thread overview]
Message-ID: <3d755559-f25e-0e6d-b6eb-7e38732bed5f@gmail.com> (raw)
In-Reply-To: <ea52b0e3-9444-d1e0-a934-ad132998b23c@libero.it>

On 2018-09-19 15:08, Goffredo Baroncelli wrote:
> On 18/09/2018 19.15, Goffredo Baroncelli wrote:
>>> b. The bootloader code, would have to have sophisticated enough Btrfs
>>> knowledge to know if the grubenv has been reflinked or snapshot,
>>> because even if +C, it may not be valid to overwrite, and COW must
>>> still happen, and there's no way the code in GRUB can do full blow COW
>>> and update a bunch of metadata.
> 
>> And what if GRUB ignore the possibility of COWing and overwrite the data ? Is it a so big problem that the data is changed in all the snapshots ?
>> It would be interested if the same problem happens for a swap file.....
> 
> I gave a look to the Sandoval's patches about implementing swap on BTRFS. This patch set
> prevents the subvolume containing the swapfile to be snapshot-ted (and the file to be balanced and so on...); what if we would add the same constraint to the grubenv file ?
We would need to have a generalized mechanism of doing this then, 
because there's no way in hell a patch special-casing a single filename 
is going to make it into mainline.

Whatever mechanism is used, it should also:

* Force the file to not be inlined in metadata.
* Enforce the file having the NOCOW attribute being set.

  reply	other threads:[~2018-09-20  1:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  3:44 GRUB writing to grubenv outside of kernel fs code Chris Murphy
2018-09-18  4:21 ` Chris Murphy
2018-09-18  5:24   ` Andrei Borzenkov
2018-09-18  5:37     ` Chris Murphy
2018-09-18 18:16       ` Andrei Borzenkov
2018-09-18 18:25         ` Austin S. Hemmelgarn
2018-09-18 18:38           ` Andrei Borzenkov
2018-09-18 19:11             ` Austin S. Hemmelgarn
2018-09-19  5:10               ` Andrei Borzenkov
2018-09-18 19:00           ` Chris Murphy
2018-09-18 19:14             ` Austin S. Hemmelgarn
2018-09-18 18:57         ` Chris Murphy
2018-09-18 19:01           ` Andrei Borzenkov
2018-09-18 19:22             ` Chris Murphy
2018-09-18 19:13           ` Austin S. Hemmelgarn
2018-09-18 17:15   ` Goffredo Baroncelli
2018-09-18 18:52     ` Chris Murphy
2018-09-18 19:11       ` Goffredo Baroncelli
2018-09-18 19:34         ` Chris Murphy
2018-09-19  5:03           ` Duncan
2018-09-19 19:08     ` Goffredo Baroncelli
2018-09-19 19:34       ` Austin S. Hemmelgarn [this message]
2018-09-18 19:45 ` Chris Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d755559-f25e-0e6d-b6eb-7e38732bed5f@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox