linux-stable-rt/fs/xfs
Dave Chinner 9d7fef74b2 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>
2009-04-06 18:42:59 +02:00
..
linux-2.6 xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
quota xfs: kill mutex_t typedef 2009-03-29 09:51:00 +02:00
support xfs: cleanup uuid handling 2009-03-30 10:21:31 +02:00
Kconfig xfs: fix dentry aliasing issues in open_by_handle 2009-01-19 02:02:57 +01:00
Makefile xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs.h
xfs_acl.c
xfs_acl.h Revert "xfs: increase the maximum number of supported ACL entries" 2009-03-31 00:23:37 -05:00
xfs_ag.h xfs: remove uchar_t/ushort_t/uint_t/ulong_t types 2009-02-09 08:37:39 +01:00
xfs_alloc.c xfs: factor out code to find the longest free extent in the AG 2009-03-16 08:29:46 +01:00
xfs_alloc.h xfs: factor out code to find the longest free extent in the AG 2009-03-16 08:29:46 +01:00
xfs_alloc_btree.c [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_alloc_btree.h
xfs_arch.h
xfs_attr.c [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_attr.h
xfs_attr_leaf.c xfs: remove m_attroffset 2009-03-29 19:26:46 +02:00
xfs_attr_leaf.h
xfs_attr_sf.h
xfs_bit.c
xfs_bit.h
xfs_bmap.c xfs: remove m_attroffset 2009-03-29 19:26:46 +02:00
xfs_bmap.h xfs: remove m_attroffset 2009-03-29 19:26:46 +02:00
xfs_bmap_btree.c [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_bmap_btree.h [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_btree.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_btree.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_btree_trace.c
xfs_btree_trace.h
xfs_buf_item.c
xfs_buf_item.h
xfs_da_btree.c xfs: remove uchar_t/ushort_t/uint_t/ulong_t types 2009-02-09 08:37:39 +01:00
xfs_da_btree.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_dfrag.c xfs: reject swapext ioctl on swapfiles 2009-02-12 19:56:00 +01:00
xfs_dfrag.h
xfs_dinode.h xfs: remove m_litino 2009-03-29 09:51:14 +02:00
xfs_dir2.c xfs: move declaration to header file 2009-03-06 17:20:15 -06:00
xfs_dir2.h
xfs_dir2_block.c xfs: kill ino64 mount option 2009-03-29 09:51:08 +02:00
xfs_dir2_block.h
xfs_dir2_data.c
xfs_dir2_data.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_dir2_leaf.c xfs: kill ino64 mount option 2009-03-29 09:51:08 +02:00
xfs_dir2_leaf.h
xfs_dir2_node.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_dir2_node.h
xfs_dir2_sf.c xfs: kill ino64 mount option 2009-03-29 09:51:08 +02:00
xfs_dir2_sf.h
xfs_dir2_trace.c
xfs_dir2_trace.h
xfs_dmapi.h
xfs_dmops.c
xfs_error.c
xfs_error.h
xfs_extfree_item.c
xfs_extfree_item.h [XFS] remove always-true #ifndef HAVE_FORMAT32 tests 2009-01-22 14:07:31 +11:00
xfs_filestream.c xfs: factor out code to find the longest free extent in the AG 2009-03-16 08:29:46 +01:00
xfs_filestream.h
xfs_fs.h filesystem freeze: remove XFS specific ioctl interfaces for freeze feature 2009-01-09 16:54:42 -08:00
xfs_fsops.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_fsops.h filesystem freeze: add error handling of write_super_lockfs/unlockfs 2009-01-09 16:54:42 -08:00
xfs_ialloc.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_ialloc.h [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_ialloc_btree.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_ialloc_btree.h xfs: remove superflous inobt macros 2009-02-09 08:37:14 +01:00
xfs_iget.c xfs: fix double free of inode 2009-04-06 18:40:17 +02:00
xfs_inode.c xfs: sanity check attr fork size 2009-01-19 02:04:16 +01:00
xfs_inode.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_inode_item.c
xfs_inode_item.h [XFS] remove always-true #ifndef HAVE_FORMAT32 tests 2009-01-22 14:07:31 +11:00
xfs_inum.h
xfs_iomap.c [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_iomap.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_itable.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_itable.h
xfs_log.c xfs: inform the xfsaild of the push target before sleeping 2009-04-06 18:42:59 +02:00
xfs_log.h xfs: cleanup log unmount handling 2009-03-16 08:19:29 +01:00
xfs_log_priv.h xfs: cleanup xlog_bread 2009-03-16 08:24:13 +01:00
xfs_log_recover.c xfs: cleanup xlog_bread 2009-03-16 08:24:13 +01:00
xfs_log_recover.h
xfs_mount.c xfs: cleanup uuid handling 2009-03-30 10:21:31 +02:00
xfs_mount.h xfs: remove m_attroffset 2009-03-29 19:26:46 +02:00
xfs_mru_cache.c
xfs_mru_cache.h
xfs_qmops.c xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs_quota.h xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs_refcache.h
xfs_rename.c [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_rtalloc.c xfs: make sure to free the real-time inodes in the mount error path 2009-02-04 09:33:58 +01:00
xfs_rtalloc.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_rw.c
xfs_rw.h [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_sb.h [XFS] Remove the rest of the macro-to-function indirections. 2009-01-16 17:10:42 +11:00
xfs_trans.c
xfs_trans.h xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_trans_ail.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_trans_buf.c
xfs_trans_extfree.c
xfs_trans_inode.c
xfs_trans_item.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_trans_priv.h
xfs_trans_space.h xfs: remove superflous inobt macros 2009-02-09 08:37:14 +01:00
xfs_types.h xfs: remove uchar_t/ushort_t/uint_t/ulong_t types 2009-02-09 08:37:39 +01:00
xfs_utils.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_utils.h
xfs_vnodeops.c xfs: fix various typos 2009-03-29 09:55:42 +02:00
xfs_vnodeops.h xfs: merge xfs_mkdir into xfs_create 2009-02-09 08:38:02 +01:00