From: Eric Sandeen <sandeen@redhat.com>
To: Emil Karlson <jekarlson@gmail.com>
Cc: Duncan <1i5t5.duncan@cox.net>, Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BUG relating to fstrim on btrfs partitions
Date: Fri, 11 Oct 2013 10:21:35 -0500 [thread overview]
Message-ID: <5258177F.7080003@redhat.com> (raw)
In-Reply-To: <CAELSAVYqeoj=SoaqtVENxfVjv10ZmFOruHNe6pGCjtkTGy8=WQ@mail.gmail.com>
On 10/11/13 10:14 AM, Emil Karlson wrote:
>> If the filesystem is clever enough to know that the range in question has
>> not been written to since the last discard, then it takes no action, and
>> reports zero bytes.
>
> File system images can be rewritten on a new media so there is a
> drawback to that.
It's in-memory for the mounted filesystem, not on disk.
It checks the EXT4_GROUP_INFO_WAS_TRIMMED_BIT flag stored in bb_state
in the ext4_group_info structure.
So when you mount a dd'd copy, it takes a fresh look, and DTRT.
-Eric
> Best Regards
> -Emil
>
prev parent reply other threads:[~2013-10-11 15:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 10:20 BUG relating to fstrim on btrfs partitions Mike Audia
2013-10-10 11:39 ` Duncan
2013-10-11 14:44 ` Eric Sandeen
2013-10-11 15:14 ` Emil Karlson
2013-10-11 15:21 ` Eric Sandeen [this message]
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=5258177F.7080003@redhat.com \
--to=sandeen@redhat.com \
--cc=1i5t5.duncan@cox.net \
--cc=jekarlson@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).