Austin S Hemmelgarn posted on Wed, 17 Jun 2015 13:17:22 -0400 as
excerpted:

> On 2015-06-17 11:40, Christian wrote:
>> On 06/17/2015 11:28 AM, Chris Murphy wrote:
>>
>>
>>>> However, fstrim still gives me "0 B (0 bytes) trimmed, so that may be
>>>> another problem. Is there a way to check if trim works?
>>>
>>> That sounds like maybe your SSD is blacklisted for trim, is all I can
>>> think of. So trim shouldn't be the cause of the problem if it's being
>>> blacklisted. The recent problems appear to be around newer SSDs that
>>> support queue trim and newer kernels that issue queued trim. There
>>> have been some patches related to trim to the kernel, but the
>>> existence of blacklisting and claims of bugs in firmware make it
>>> difficult to test and isolate.
>>>
>>> http://techreport.com/news/28473/some-samsung-ssds-may-suffer-from-a-
buggy-trim-implementation
>>>
>>>
>> This is an Intel SSD in a Lenovo Thinkpad X1 Carbon. Trim worked until
>> a few weeks ago and still works for my small ext4 boot partition (just
>> ran it to check). I will keep looking for a solution. Thanks!
>>
> I'm seeing the same issue here, but with a Crucial brand SSD.  Somewhat
> interestingly, I don't see any issues like this with BTRFS on top of
> LVM's thin-provisioning volumes, or with any other filesystems, so I
> think it has something to do with how BTRFS is reporting unused space or
> how it is submitting the discard requests.

FWIW, there's a current btrfs patch in progress that relates to problems 
with btrfs trim.

But while I do have SSDs, I purposefully overprovisioned them by nearly 
100% (IOW I partitioned only about 55%, the rest is entirely unused), so 
trim isn't as critical here as it is for many.  I don't use the discard 
mount option, and have a systemd timer job setup to automate my fstrims 
and don't worry about the output too much, so I haven't been following 
the patch progress /that/ closely.

But I do know that recent kernel btrfs trims (either fstrim or discard 
mount option triggered) haven't been working as originally intended due 
to some bug, and this patch is supposed to fix it.

I'd thus conclude that you're very likely hitting this known issue, and 
that either for 4.1 or 4.2 (again, I'm not following progress that 
closely, and don't remember for sure if it's in 4.1, altho I've been 
running the rcs since rc6 or so), the problem should be fixed as that 
patch gets into mainline.

Anyone wishing to investigate further can of course check the list (and/
or possibly the kernel's git log) for discard/trim related patches and 
follow the progress once found.

... Actually, just checked myself.  Looks like the patches were first 
posted on March 30 @ 15:12:17 -0400 or so (that's the time for one of 
them).  There's one for the discard mount option, and another for FITRIM 
(which may or may not be a typo for FSTRIM, I'm not actually sure).  Jeff 
Mahoney <je...@suse.com> author.  That should be enough to find the 
threads.  And I don't see the patches in the late 4.1-rc I'm running so 
either my git log search foo is bad or it'll be (at least) 4.2.

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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to