All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris West <solo-btrfs@goeswhere.com>
To: linux-btrfs@vger.kernel.org
Subject: fstrim silently does nothing on dev add/dev rem'd filesystem
Date: Sun, 27 Sep 2015 18:52:52 +0100	[thread overview]
Message-ID: <20150927175252.GA24990@blind.goeswhere.com> (raw)

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.
Currently, it's a single-device setup, but with weird devids because of
its history:

% sudo btrfs f show
Label: none  uuid: 672510b8-afb9-425f-a58d-bd325f7c987a
    Total devices 1 FS bytes used 226.86GiB
        devid    2 size 475.94GiB used 237.03GiB path /dev/sda2
[..]

% mount | fgrep sda2
/dev/sda2 on / type btrfs
(rw,relatime,compress=lzo,ssd,space_cache,user_subvol_rm_allowed,subvolid=257,subvol=/@)
/dev/sda2 on /home type btrfs
(rw,relatime,compress=lzo,ssd,space_cache,user_subvol_rm_allowed,subvolid=258,subvol=/@home)

% uname -a
Linux a 4.2.0-10-generic #12-Ubuntu SMP Tue Sep 15 19:43:01 UTC
2015 x86_64 x86_64 x86_64 GNU/Linux
(Ubuntu Wily pre-release.)

While fstrimming probably has minimal value for such an idle/empty
volume, I'd still be interested in working out what's wrong (if anything
is wrong).

Any suggestions?

Chris (Faux on IRC).


             reply	other threads:[~2015-09-27 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-27 17:52 Chris West [this message]
2015-09-27 18:46 ` fstrim silently does nothing on dev add/dev rem'd filesystem Lutz Euler
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=20150927175252.GA24990@blind.goeswhere.com \
    --to=solo-btrfs@goeswhere.com \
    --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 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.