xfs
[Top] [All Lists]

Re: xfs_db 2.9.8: coredump

To: Justin Piszcz <jpiszcz@xxxxxxxxxxxxxxx>
Subject: Re: xfs_db 2.9.8: coredump
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 29 Dec 2008 09:39:17 +1100
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, Alan Piszcz <ap@xxxxxxxxxxxxx>, esandeen@xxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <alpine.DEB.1.10.0812261251520.18703@xxxxxxxxxxxxxxxx>
Mail-followup-to: Justin Piszcz <jpiszcz@xxxxxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxx>, Alan Piszcz <ap@xxxxxxxxxxxxx>, esandeen@xxxxxxxxxx, xfs@xxxxxxxxxxx
References: <alpine.DEB.1.10.0812260931490.11656@xxxxxxxxxxxxxxxx> <49551073.5090704@xxxxxxxxxx> <alpine.DEB.1.10.0812261243550.18703@xxxxxxxxxxxxxxxx> <alpine.DEB.1.10.0812261251520.18703@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>