From: "Richard W.M. Jones" <rjones@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: fstrim has no effect on a just-mounted filesystem
Date: Tue, 11 Mar 2014 23:07:15 +0000 [thread overview]
Message-ID: <20140311230715.GA19648@redhat.com> (raw)
In-Reply-To: <20140311225932.GW1346@redhat.com>
On Tue, Mar 11, 2014 at 10:59:32PM +0000, Richard W.M. Jones wrote:
> On Tue, Mar 11, 2014 at 05:08:19PM -0500, Eric Sandeen wrote:
> > blktrace is probably the place to start. Do you see discard
> > requests? then ext4 is doing its job. If not, we can trace
> > ext4 to see why it's not issuing them, assuming there really
> > is work to do.
>
> At the moment I can't get this to work. The script I'm using is:
>
> ----------------------------------------------------------------------
> set -e
> set -x
> trace-cmd record -e all -o /tmp/trace &
> pid=$!
> fstrim /sysroot
> kill $pid; sleep 2
> trace-cmd report -i /tmp/trace
> ----------------------------------------------------------------------
I got it to work by using:
----------------------------------------------------------------------
set -e
set -x
trace-cmd record -e all fstrim /sysroot
trace-cmd report
----------------------------------------------------------------------
The output is absolutely huge and I didn't capture it.
However just the act of doing the tracing *caused* the trim to happen
properly in the underlying disk.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
next prev parent reply other threads:[~2014-03-11 23:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 21:39 fstrim has no effect on a just-mounted filesystem Richard W.M. Jones
2014-03-11 21:47 ` Eric Sandeen
2014-03-11 22:00 ` Richard W.M. Jones
2014-03-11 22:04 ` Richard W.M. Jones
2014-03-11 22:08 ` Eric Sandeen
2014-03-11 22:59 ` Richard W.M. Jones
2014-03-11 23:07 ` Richard W.M. Jones [this message]
2014-03-11 23:09 ` Eric Sandeen
2014-03-11 23:30 ` Richard W.M. Jones
2014-03-12 10:17 ` Richard W.M. Jones
2014-03-12 13:42 ` Richard W.M. Jones
2014-03-12 18:10 ` Paolo Bonzini
2014-03-12 18:24 ` Richard W.M. Jones
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=20140311230715.GA19648@redhat.com \
--to=rjones@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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.