linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fstrim on BTRFS
@ 2011-12-28 16:57 Martin Steigerwald
  2011-12-29  4:02 ` Li Zefan
  2011-12-29  4:29 ` Fajar A. Nugraha
  0 siblings, 2 replies; 15+ messages in thread
From: Martin Steigerwald @ 2011-12-28 16:57 UTC (permalink / raw)
  To: linux-btrfs

Hi!

With 3.2-rc4 (probably earlier), Ext4 seems to remember what areas it 
trimmed:

merkaba:~> fstrim -v /boot
/boot: 224657408 bytes were trimmed
merkaba:~> fstrim -v /boot
/boot: 0 bytes were trimmed


But BTRFS does not:

merkaba:~> fstrim -v /
/: 4431613952 bytes were trimmed
merkaba:~> fstrim -v /    
/: 4341846016 bytes were trimmed


Is it planned to add this feature to BTRFS as well?


I wish you a relaxed between Christmas and new year time,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

^ permalink raw reply	[flat|nested] 15+ messages in thread
* fstrim on BTRFS
@ 2014-10-31  0:21 Noah Massey
  0 siblings, 0 replies; 15+ messages in thread
From: Noah Massey @ 2014-10-31  0:21 UTC (permalink / raw)
  To: linux-btrfs

Hello,

I am looking for some clarification on TRIM / SSD maintenance.
The wiki [1] suggests periodic fstrim, but fstrim does not discard
unallocated blocks[2].
Which makes sense, given that mkfs issues a device wide trim, so they
shouldn't have data.

But it seems like both a balance, and a pending patch
( 47ab2a6 Btrfs: remove empty block groups automatically )
can deallocate block groups without TRIM, leading to the SSD retaining
data it doesn't need to.

Is there a bitter way to trigger a more thorough discard than
fallocate, rm, fstrim, balance -dusage=0 ?
And are there plans to support trimming unallocated space, or is this
not possible with current FS format?

Thank you,
Noah

[1] https://btrfs.wiki.kernel.org/index.php/FAQ#Does_Btrfs_support_TRIM.2Fdiscard.3F
[2] https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg14195.html

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

end of thread, other threads:[~2014-10-31  0:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-28 16:57 fstrim on BTRFS Martin Steigerwald
2011-12-29  4:02 ` Li Zefan
2011-12-29  4:21   ` Fajar A. Nugraha
2011-12-29  4:32     ` Fajar A. Nugraha
2011-12-29  4:37     ` Roman Mamedov
2011-12-29  4:42       ` Fajar A. Nugraha
2011-12-29  5:29         ` cwillu
2011-12-29 10:52   ` Martin Steigerwald
2012-01-03 21:05   ` Chris Mason
2011-12-29  4:29 ` Fajar A. Nugraha
2011-12-29  9:39   ` Li Zefan
2011-12-29  9:52     ` Fajar A. Nugraha
2011-12-30  6:19       ` Li Zefan
2011-12-30  6:35         ` Fajar A. Nugraha
  -- strict thread matches above, loose matches on Subject: below --
2014-10-31  0:21 Noah Massey

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