linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: fstrim reports different value 1 minute later
Date: Thu, 13 Feb 2020 11:51:33 +0500	[thread overview]
Message-ID: <20200213115133.6a109d69@natsu> (raw)
In-Reply-To: <CAJCQCtT6QwBeB79jWGoOtpT+GLLEQAdVHrYvMRZhFz4Th_xYNw@mail.gmail.com>

On Wed, 12 Feb 2020 23:37:26 -0700
Chris Murphy <lists@colorremedies.com> wrote:

> I have fstrim.timer set to run fstrim.service once per week, and that
> reports sane (expected) values each time. But, it also tends to happen
> soon after a fresh boot or wake from S3.

I believe Btrfs now[1] tracks which areas have been trimmed already during the
current mount and does not re-trim them again, like ext4 does since a long
time ago. In case of ext4, for your scenario the first trim would return 91GB,
and the subsequent ones (assuming no FS activity) would trim 0 bytes.

But if the above is indeed the cause, then I'm not sure why it still always
retrims about 3.6 GB or 11 GB for your other machine, even with no writes or
deletions.

[1] https://patchwork.kernel.org/patch/11254859/


-- 
With respect,
Roman

      reply	other threads:[~2020-02-13  6:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  6:08 5.6-rc1, fstrim reports different value 1 minute later Chris Murphy
2020-02-13  6:21 ` Roman Mamedov
2020-02-13  6:28   ` 5.5-5.6-rc1, " Chris Murphy
2020-02-13  6:37   ` Chris Murphy
2020-02-13  6:51     ` Roman Mamedov [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=20200213115133.6a109d69@natsu \
    --to=rm@romanrm.net \
    --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;
as well as URLs for NNTP newsgroup(s).