public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: Eric Sandeen <sandeen@redhat.com>, Alan Piszcz <ap@solarrain.com>,
	esandeen@redhat.com, xfs@oss.sgi.com
Subject: Re: xfs_db 2.9.8: coredump
Date: Mon, 29 Dec 2008 09:39:17 +1100	[thread overview]
Message-ID: <20081228223917.GC22525@disturbed> (raw)
In-Reply-To: <alpine.DEB.1.10.0812261251520.18703@p34.internal.lan>

On Fri, Dec 26, 2008 at 12:52:10PM -0500, Justin Piszcz wrote:
> On Fri, 26 Dec 2008, Justin Piszcz wrote:
> > On Fri, 26 Dec 2008, Eric Sandeen wrote:
> >> Justin Piszcz wrote:
> >>> # xfs_db -V
> >>> xfs_db version 2.9.8
> >>> 
> >>> p34:~# xfs_db -c frag -f /dev/sda1
> >>> Segmentation fault (core dumped)
> >>> p34:~# xfs_db -c frag -r /dev/sda1
> >>> Segmentation fault (core dumped)
> >>> 
> >>> (It was working BEFORE I ran xfs_fsr on it, it was at 16% fragmentation).
> >>> 
> >>> Now it can no longer check it?

xfs_db works on the block device under the filesystem, not the
filesystem. Also, the block device on linux caches blocks, so
after running xfs_fsr the filesystem layout has changed but the
underlying block device now has a stale cache. hence xfs_db is
probably being pointed off into la-la land by the stale block
device cache.

# echo 3 > /proc/sys/vm/drop_caches

Is your friend whenever you want to use xfs_db on a mounted
filesystem.

> p34:~# umount /r1
> p34:~# sync

And now the block device is coherent....

> p34:~# xfs_db -c frag -r /dev/sda1
> actual 365758, ideal 358711, fragmentation factor 1.93%

> p34:~# mount -a
> p34:~# xfs_db -c frag -r /dev/sda1
> actual 365758, ideal 358711, fragmentation factor 1.93%
> p34:~# mount -a ; dmesg | tail -n 2
> p34:~# xfs_fsr /dev/sda1
> /r1 start inode=0
> p34:~# xfs_db -c frag -r /dev/sda1
> actual 365751, ideal 358711, fragmentation factor 1.92%
> p34:~#

And this resulted in very little change  so the block device
cache wasn't completely wacked....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2008-12-28 22:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 14:36 xfs_db 2.9.8: coredump Justin Piszcz
2008-12-26 17:10 ` Eric Sandeen
2008-12-26 17:12 ` Eric Sandeen
2008-12-26 17:45   ` Justin Piszcz
2008-12-26 17:52     ` Justin Piszcz
2008-12-28 22:39       ` Dave Chinner [this message]
2008-12-28 22:44         ` Justin Piszcz
2008-12-29  4:48         ` Eric Sandeen
2008-12-26 19:18     ` Eric Sandeen

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=20081228223917.GC22525@disturbed \
    --to=david@fromorbit.com \
    --cc=ap@solarrain.com \
    --cc=esandeen@redhat.com \
    --cc=jpiszcz@lucidpixels.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox