linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fstrim problem/bug
@ 2016-07-07  9:46 M G Berberich
  2016-07-07 16:24 ` Henk Slager
  0 siblings, 1 reply; 2+ messages in thread
From: M G Berberich @ 2016-07-07  9:46 UTC (permalink / raw)
  To: linux-btrfs

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)  | 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-07 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07  9:46 fstrim problem/bug M G Berberich
2016-07-07 16:24 ` Henk Slager

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).