linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: fstrim silently does nothing on dev add/dev rem'd filesystem
Date: Mon, 28 Sep 2015 02:45:10 +0000 (UTC)	[thread overview]
Message-ID: <pan$73c0$b0528a34$f375bb55$bda81535@cox.net> (raw)
In-Reply-To: 20150927175252.GA24990@blind.goeswhere.com

Chris West posted on Sun, 27 Sep 2015 18:52:52 +0100 as excerpted:

> I have a filesystem for which fstrim won't do anything.
> The filesystem has a history of abuse; dev add, dev remove, dding, ...
> 
> There's nothing wrong with the kernel or the disc; other btrfs volumes
> on the same disc trim fine, and the volume used to trim fine.
> 
> By "won't trim", I mean that it always, instantly returns 0 bytes
> trimmed:
> 
> % time sudo fstrim -v .
> .: 0 B (0 bytes) trimmed sudo fstrim -v .  0.00s user 0.00s system 0%
> cpu 0.004 total
> 
> It used to, as expected, take a while, then report a trimmed size.

[replying to list and OP both]

As lutz suggests, fstrim on btrfs is known to be buggy at present.  
Solutions are in general known and patches available, but they aren't in 
4.2, and while 4.3 will be better, AFAIK the patch there is only a 
partial solution.

As I overprovisioned my SSDs such that they're only something like 55% 
partitioned at all, leaving the other ~45% entirely unpartitioned empty 
space, there's plenty of room for the FTL to do its thing there and while 
I know fstrim is scheduled to run weekly, I've not personally worried too 
much about it beyond seeing the on-list discussion, but I understand why 
others with much tighter provisioning/partitioning would be more worried 
about it.

But I think part of reasoning behind the relatively low priority this 
issue has received is that it's a low visibility issue not really 
affecting most people running btrfs, either because they're not running 
on ssd or because they simply don't have a particularly high awareness of 
what trim does and thus about how it's failing to work here and what that 
means to them.  If we get a rash of people posting on-list that it's 
affecting them, that relative priority is likely to go up, and with it 
the patch testing and integration schedule for the affected patches.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  parent reply	other threads:[~2015-09-28  2:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 17:52 fstrim silently does nothing on dev add/dev rem'd filesystem Chris West
2015-09-27 18:46 ` Lutz Euler
2015-09-28  2:45 ` Duncan [this message]
2015-09-28  3:08   ` Rich Freeman
2015-09-28  7:52     ` Duncan

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='pan$73c0$b0528a34$f375bb55$bda81535@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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).