All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Christoph Anton Mitterer <calestyo@scientia.net>,
	fdmanana@gmail.com, Chris Murphy <lists@colorremedies.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs trim erases bootloader area
Date: Fri, 8 Jan 2016 09:36:24 +0300	[thread overview]
Message-ID: <568F58E8.8020707@gmail.com> (raw)
In-Reply-To: <1452217455.6686.10.camel@scientia.net>

08.01.2016 04:44, Christoph Anton Mitterer пишет:
> Hey.
> 
> Just a followup on this:
> GPT and some others (e.g MD RAID) store data in the end of the device.
> 
> It's clear that when the fs is made inside a partition, this shouldn't
> be seen (and thus TRIMmed) anyway... but can btrfs be installed e.g.
> directly on the device while that continues to hold the GPT (by btrfs
> simply always starting at some byte offset)?

If btrfs size includes metadata at the end of device - arguably it is
user error; it should not happen.

If user explicitly excluded metadata (mkfs.btrfs -b <size>) but btrfs
still attempts to trim beyond end of filesystem - this is obviously bug
and should not happen. I do not understand much of btrfs internals to
know if this is possible.

Note that corner case is when filesystem size is not multiple of trim
units size. Then incomplete chunks(s) at the beginning and end should
always be skipped.

> If so, then one may possibly need to extend that patch for the end of
> the device.
> 
> Cheers,
> Chris.
> 


  reply	other threads:[~2016-01-08  6:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 19:11 btrfs trim erases bootloader area Andrei Borzenkov
2016-01-07 19:16 ` Filipe Manana
2016-01-07 22:05   ` Chris Murphy
2016-01-07 23:10     ` Filipe Manana
2016-01-07 23:39       ` Chris Murphy
2016-01-07 23:39         ` Chris Murphy
2016-01-08  1:44       ` Christoph Anton Mitterer
2016-01-08  6:36         ` Andrei Borzenkov [this message]
2016-01-07 19:19 ` Holger Hoffstätte

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=568F58E8.8020707@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=calestyo@scientia.net \
    --cc=fdmanana@gmail.com \
    --cc=grub-devel@gnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.