xfs: wait for the write the superblock on unmount
authorMark Tinguely <tinguely@sgi.com>
Tue, 24 Jul 2012 15:59:19 +0000 (10:59 -0500)
committerBen Myers <bpm@sgi.com>
Sun, 29 Jul 2012 21:34:19 +0000 (16:34 -0500)
commit9a57fa8ee7c29e11c2a29ce058573ba99157eda7
tree3fc564a3ad53b16a6604aa89ae3d4d26e07e2d38
parent8375f922aaa6e7a880022529202fb486315568c3
xfs: wait for the write the superblock on unmount

v2: Add the xfs_buf_lock to xfs_quiesce_attr().
    Add explaination why xfs_buf_lock() is used to wait for write.

xfs_wait_buftarg() does not wait for the completion of the write of the
uncached superblock. This write can race with the shutdown of the log
and causes a panic if the write does not win the race.

During the log write, xfsaild_push() will lock the buffer and set the
XBF_ASYNC flag. Because the XBF_FLAG is set, complete() is not performed
on the buffer's iowait entry, we cannot call xfs_buf_iowait() to wait
for the write to complete. The buffer's lock is held until the write is
complete, so we can block on a xfs_buf_lock() request to be notified
that the write is complete.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_mount.c
fs/xfs/xfs_sync.c
This page took 0.02853 seconds and 5 git commands to generate.