Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* bug? fstrim only trims unallocated space, not unused in bg's
@ 2017-11-19  6:17 Chris Murphy
  2017-11-19  6:27 ` Andrei Borzenkov
  2017-11-20  2:13 ` Qu Wenruo
  0 siblings, 2 replies; 30+ messages in thread
From: Chris Murphy @ 2017-11-19  6:17 UTC (permalink / raw)
  To: Btrfs BTRFS

fstrim should trim free space, but it only trims unallocated. This is
with kernel 4.14.0 and the entire 4.13 series. I'm pretty sure it
behaved this way with 4.12 also.


[root@f27h ~]# fstrim -v /
/: 39 GiB (41841328128 bytes) trimmed
[root@f27h ~]# btrfs fi us /
Overall:
    Device size:          70.00GiB
    Device allocated:          31.03GiB
    Device unallocated:          38.97GiB
    Device missing:             0.00B
    Used:              22.02GiB
    Free (estimated):          47.72GiB    (min: 47.72GiB)
    Data ratio:                  1.00
    Metadata ratio:              1.00
    Global reserve:          65.97MiB    (used: 0.00B)

Data,single: Size:30.00GiB, Used:21.25GiB
   /dev/nvme0n1p8      30.00GiB

Metadata,single: Size:1.00GiB, Used:791.58MiB
   /dev/nvme0n1p8       1.00GiB

System,single: Size:32.00MiB, Used:16.00KiB
   /dev/nvme0n1p8      32.00MiB

Unallocated:
   /dev/nvme0n1p8      38.97GiB


-- 
Chris Murphy

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

end of thread, other threads:[~2018-04-01 23:30 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-19  6:17 bug? fstrim only trims unallocated space, not unused in bg's Chris Murphy
2017-11-19  6:27 ` Andrei Borzenkov
2017-11-19 21:38   ` Chris Murphy
     [not found]     ` <3114a78e-485a-daea-f8b1-48cc330f4209@suse.com>
2017-11-20 20:01       ` Jeff Mahoney
2017-11-20 20:40         ` Jeff Mahoney
2017-11-20 21:56           ` Chris Murphy
2017-11-20 22:59           ` Chris Murphy
2017-11-21  1:46             ` Jeff Mahoney
2017-11-21  4:04               ` Chris Murphy
2017-11-21  4:13                 ` Jeff Mahoney
2017-11-21  4:15                   ` Chris Murphy
2017-11-20  2:13 ` Qu Wenruo
2017-11-20  2:24   ` Chris Murphy
2017-11-20  2:30     ` Chris Murphy
2017-11-20  2:42     ` Qu Wenruo
2017-11-20 22:23       ` Chris Murphy
2017-11-21  1:16         ` Qu Wenruo
2017-11-21  4:06           ` Chris Murphy
2017-11-21  4:09             ` Chris Murphy
2017-11-21  4:29             ` Qu Wenruo
2017-11-21  4:34               ` Chris Murphy
2017-11-21  4:43                 ` Qu Wenruo
2017-11-21  4:46                   ` Chris Murphy
2017-11-21  4:49                   ` Chris Murphy
2017-11-21  4:58                     ` Qu Wenruo
2017-11-21  5:58                       ` Chris Murphy
2017-11-21  6:10                         ` Qu Wenruo
2018-04-01  3:28                           ` Chris Murphy
2018-04-01 10:34                             ` Qu Wenruo
2018-04-01 23:30                               ` Chris Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox