From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Adam Borowski <kilobyte@angband.pl>, Marat Khalili <mkh@rqc.ru>,
Dave <davestechshop@gmail.com>,
Linux fs Btrfs <linux-btrfs@vger.kernel.org>,
Fred Van Andel <vanandel@gmail.com>
Subject: Re: Problem with file system
Date: Mon, 6 Nov 2017 14:12:20 -0500 [thread overview]
Message-ID: <01e731bf-8831-b7de-81a9-e0ce2f7d3f88@gmail.com> (raw)
In-Reply-To: <CAJCQCtS80P2Fa80162xMdYO3+JfkqX9YX75i+H8gLUkteVvYAQ@mail.gmail.com>
On 2017-11-06 13:45, Chris Murphy wrote:
> On Mon, Nov 6, 2017 at 6:29 AM, Austin S. Hemmelgarn
> <ahferroin7@gmail.com> wrote:
>
>>
>> With ATA devices (including SATA), except on newer SSD's, TRIM commands
>> can't be queued,
>
> SATA spec 3.1 includes queued trim. There are SATA spec 3.1 products
> on the market claiming to do queued trim. Some of them fuck up, and
> have been black listed in the kernel for queued trim.
>
Yes, but some still work, and they are invariably very new devices by
most people's definitions.
>>> Anyway right now I consider discard mount option fundamentally broken
>>> on Btrfs for SSDs. I haven't tested this on LVM thinp, maybe it's
>>> broken there too.
>>
>> For LVM thinp, discard there deallocates the blocks, and unallocated regions
>> read back as zeroes, just like in a sparse file (in fact, if you just think
>> of LVM thinp as a sparse file with reflinking for snapshots, you get
>> remarkably close to how it's actually implemented from a semantic
>> perspective), so it is broken there. In fact, it's guaranteed broken on any
>> block device that has the discard_zeroes_data flag set, and theoretically
>> broken on many things that don't have that flag (although block devices that
>> don't have that flag are inherently broken from a security perspective
>> anyway, but that's orthogonal to this discussion).
>
> So this is really only solvable by having Btrfs delay, possibly
> substantially, the discarding of metadata blocks. Aside from physical
> device trim, there are benefits in thin provisioning for trim and some
> use cases will require file system discard, being unable to rely on
> periodic fstrim.
Yes. However, from a simplicity of implementation perspective, it makes
more sense to keep some number of old trees instead of keeping old trees
for some amount of time. That would remove the need to track timing
info in the filesystem, provide sufficient protection, and probably be a
bit easier to explain in the documentation. Such logic could also be
applied to regular block devices that don't support discard to provide a
better guarantee that you won't overwrite old trees that might be useful
for recovery.
next prev parent reply other threads:[~2017-11-06 19:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 15:27 Problem with file system Fred Van Andel
2017-04-24 17:02 ` Chris Murphy
2017-04-25 4:05 ` Duncan
2017-04-25 0:26 ` Qu Wenruo
2017-04-25 5:33 ` Marat Khalili
2017-04-25 6:13 ` Qu Wenruo
2017-04-26 16:43 ` Fred Van Andel
2017-10-30 3:31 ` Dave
2017-10-30 21:37 ` Chris Murphy
2017-10-31 5:57 ` Marat Khalili
2017-10-31 11:28 ` Austin S. Hemmelgarn
2017-11-03 7:42 ` Kai Krakow
2017-11-03 11:33 ` Austin S. Hemmelgarn
2017-11-03 22:03 ` Chris Murphy
2017-11-04 4:46 ` Adam Borowski
2017-11-04 12:00 ` Marat Khalili
2017-11-04 17:14 ` Chris Murphy
2017-11-06 13:29 ` Austin S. Hemmelgarn
2017-11-06 18:45 ` Chris Murphy
2017-11-06 19:12 ` Austin S. Hemmelgarn [this message]
2017-11-04 7:26 ` Dave
2017-11-04 17:25 ` Chris Murphy
2017-11-07 7:01 ` Dave
2017-11-07 13:02 ` Austin S. Hemmelgarn
2017-11-08 4:50 ` Chris Murphy
2017-11-08 12:13 ` Austin S. Hemmelgarn
2017-11-08 17:17 ` Chris Murphy
2017-11-08 17:22 ` Hugo Mills
2017-11-08 17:54 ` Chris Murphy
2017-11-08 18:10 ` Austin S. Hemmelgarn
2017-11-08 18:31 ` Chris Murphy
2017-11-08 19:29 ` Austin S. Hemmelgarn
2017-10-31 1:58 ` Duncan
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=01e731bf-8831-b7de-81a9-e0ce2f7d3f88@gmail.com \
--to=ahferroin7@gmail.com \
--cc=davestechshop@gmail.com \
--cc=kilobyte@angband.pl \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=mkh@rqc.ru \
--cc=vanandel@gmail.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.