summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2009-04-06 18:42:59 +0200
committerChristoph Hellwig <hch@brick.lst.de>2009-04-06 18:42:59 +0200
commit9d7fef74b23fe57803c5f71fab11630d9ec2cb4b (patch)
treee196c150f77c9c45d9dc0b5e2c06ae867c9bc2a4 /fs/xfs/xfs_mount.h
parentc626d174cfe38e7f0545d074c299527892cd8c45 (diff)
xfs: inform the xfsaild of the push target before sleeping
When trying to reserve log space, we find the amount of space we need, then go to sleep waiting for space. When we are woken, we try to push the tail of the log forward to make sure we have space available. Unfortunately, this means that if there is not space available, and everyone who needs space goes to sleep there is no-one left to push the tail of the log to make space available. Once we have a thread waiting for space to become available, the others queue up behind it in a FIFO, and none of them push the tail of the log. This can result in everyone going to sleep in xlog_grant_log_space() if the first sleeper races with the last I/O that moves the tail of the log forward. With no further I/O tomove the tail of the log, there is nothing to wake the sleepers and hence all transactions just stop. Fix this by making sure the xfsaild will create enough space for the transaction that is about to sleep by moving the push target far enough forwards to ensure that that the curent proceeees will have enough space available when it is woken. That is, we push the AIL before we go to sleep. Because we've inserted the log ticket into the queue before we've pushed and gone to sleep, subsequent transactions will wait behind this one. Hence we are guaranteed to have space available when we are woken. Signed-off-by: Dave Chinner <david@fromorbit.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_mount.h')
0 files changed, 0 insertions, 0 deletions