linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: M G Berberich <btrfs@oss.m-berberich.de>
To: linux-btrfs@vger.kernel.org
Subject: fstrim problem/bug
Date: Thu, 7 Jul 2016 11:46:21 +0200	[thread overview]
Message-ID: <20160707094621.GB7153@invalid> (raw)

Hello,

On a filesystem with 40 G free space and 54 G used, ‘fstrim -v’ gave
this result:

    # fstrim -v /
    /: 0 B (0 bytes) trimmed

After running balance it gave a more sensible

    # fstrim -v /
    /: 37.3 GiB (40007368704 bytes) trimmed

As far as I understand, fstrim should report any unused block to the
disk, so its controller can reuse these blocks. I expected ’fstrim -v’
to report about 40 G trimmed. The fact, that after balance fstrim
reports a sensible amount of trimmed bytes leads to the conclusion,
that fstrim on btrfs does not report unused blocks to the disk (as it
should), but only the blocks of unused chunks. As the fstrim-command
only does a ‘ioctl(fd, FITRIM, &range))’ this seems to be a bug in the
fstrim kernel-code.
In the field this means, that without regularly running balance,
fstrim does not work on btrfs.

	MfG
	bmg

-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“          | mail@m-berberich.de
(SPD-Stadtrat Kurt Schindler; Regensburg)  | 

             reply	other threads:[~2016-07-07  9:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  9:46 M G Berberich [this message]
2016-07-07 16:24 ` fstrim problem/bug Henk Slager

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=20160707094621.GB7153@invalid \
    --to=btrfs@oss.m-berberich.de \
    --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).