From: lutz.euler@freenet.de (Lutz Euler)
To: Chris West <solo-btrfs@goeswhere.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: fstrim silently does nothing on dev add/dev rem'd filesystem
Date: Sun, 27 Sep 2015 20:46:04 +0200 [thread overview]
Message-ID: <22024.14700.482188.433115@localhost.localdomain> (raw)
In-Reply-To: <20150927175252.GA24990@blind.goeswhere.com>
Hi Chris,
> 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:
you probably suffer from the same problem I had a few years ago.
It is a bug in how btrfs implements fstrim. Adding and removing devices
is the way I got my btrfs filesystem into the same situation then.
See for the background:
http://comments.gmane.org/gmane.comp.file-systems.btrfs/15597
I wrote a patch, see here:
http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg40618.html
I understand that in kernel 4.3 there will be an extension so that
fstrim trims free space outside of allocated chunks. This is orthogonal;
my patch allows to trim free space inside allocated chunks (which,
somewhat accidentally, works for most btrfs filesystems since a long
time) even with filesystems like yours.
Kind regards,
Lutz Euler
next prev parent reply other threads:[~2015-09-27 19:01 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 [this message]
2015-09-28 2:45 ` Duncan
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=22024.14700.482188.433115@localhost.localdomain \
--to=lutz.euler@freenet.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=solo-btrfs@goeswhere.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.