David Chinner wrote:
On Thu, Dec 07, 2006 at 01:17:32PM -0500, Geir A. Myrestrand wrote:
Geir A. Myrestrand wrote:
However, I run into issues with xfs_freeze as it often locks up when I
try to freeze a file system where there is I/O activity. Sometimes it
happen on the first xfs_freeze invocation to freeze the file system,
other times I have to unfreeze and then it happens on the second time I
freeze. xfs_freeze never returns when this happens.
Looks like xfs_io get stuck --see partial output from `ps auxf`:
strace -ff -o freeze.txt xfs_freeze -f /mnt/xfs
\_ /bin/sh -f /usr/sbin/xfs_freeze -f /mnt/xfs
\_ /usr/sbin/xfs_io -r -p xfs_freeze -x -c freeze /mnt/xfs
Anyone else encountering this issue?
Yes, and I fixed it about a 2 weeks ago. It's an ABBA deadlock between
lookup of multiple, already dirty, metadata buffers and synchronous buftarg
flushing (that occurs when trying to freeze a filesystem)
That is awesome news, mate! :-)
The problem is that during a freeze, the filesystem may
still be doing stuff - like flushing delalloc data buffers -
in the background and hence we can be trying to lock buffers
that were on the delwri list at the same time. Hence we can
get ABBA deadlocks between threads doing allocation and the
buftarg flush (freeze) thread.
That sounds like an accurate description of my test environment. I bet
this is the issue...
Fix it by skipping locked (and pinned) buffers as we traverse the
delwri buffer list.
Good to know that you're one step ahead!
And the diff was:
Excellent. I will try this tomorrow (it's late in the evening here in
New York now). I'll let you know how it works out.
Geir A. Myrestrand