remarkable-linux/fs/xfs
David Chinner 585e6d8856 [XFS] Fix a synchronous buftarg flush deadlock when freezing.
At the last stage of a freeze, we flush the buftarg synchronously over and
over again until it succeeds twice without skipping any buffers.

The delwri list flush skips pinned buffers, but tries to flush all others.
It removes the buffers from the delwri list, then tries to lock them one
at a time as it traverses the list to issue the I/O. It holds them locked
until we issue all of the I/O and then unlocks them once we've waited for
it to complete.

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.

Fix it by skipping locked (and pinned) buffers as we traverse the delwri
buffer list.

SGI-PV: 957195
SGI-Modid: xfs-linux-melb:xfs-kern:27535a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
2007-02-10 18:32:29 +11:00
..
linux-2.6 [XFS] Fix a synchronous buftarg flush deadlock when freezing. 2007-02-10 18:32:29 +11:00
quota [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms. 2006-09-28 11:04:43 +10:00
support [XFS] rename uio_read() to xfs_uio_read() 2006-11-11 18:04:41 +11:00
Kbuild
Kconfig [PATCH] BLOCK: Make it possible to disable the block layer [try #6] 2006-09-30 20:52:31 +02:00
Makefile
Makefile-linux-2.6 [XFS] 956618: Linux crashes on boot with XFS-DMAPI filesystem when 2006-11-11 18:03:49 +11:00
xfs.h [XFS] 956618: Linux crashes on boot with XFS-DMAPI filesystem when 2006-11-11 18:03:49 +11:00
xfs_acl.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_acl.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_ag.h [XFS] endianess annotation for xfs_agfl_t. Trivial, xfs_agfl_t is always 2006-09-28 10:56:51 +10:00
xfs_alloc.c [XFS] Minor code rearranging and cleanup to prevent some coverity false 2006-09-28 11:03:44 +10:00
xfs_alloc.h [XFS] Prevent free space oversubscription and xfssyncd looping. 2006-09-07 14:26:50 +10:00
xfs_alloc_btree.c [XFS] Reduce endian flipping in alloc_btree, same as was done for 2006-09-28 11:05:40 +10:00
xfs_alloc_btree.h
xfs_arch.h
xfs_attr.c [XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespace 2006-09-28 11:01:37 +10:00
xfs_attr.h [XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespace 2006-09-28 11:01:37 +10:00
xfs_attr_leaf.c [XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespace 2006-09-28 11:01:37 +10:00
xfs_attr_leaf.h [XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespace 2006-09-28 11:01:37 +10:00
xfs_attr_sf.h
xfs_behavior.c [XFS] remove bhv_lookup, _range version works aswell and has more useful 2006-09-28 10:58:52 +10:00
xfs_behavior.h [XFS] remove bhv_lookup, _range version works aswell and has more useful 2006-09-28 10:58:52 +10:00
xfs_bit.c
xfs_bit.h
xfs_bmap.c [XFS] Fix uninitialized br_state and br_startoff in 2006-11-21 18:55:16 +11:00
xfs_bmap.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_bmap_btree.c [XFS] use NULL for pointer initialisation instead of zero-cast-to-ptr 2006-09-28 10:58:40 +10:00
xfs_bmap_btree.h [XFS] endianess annotations for xfs_bmbt_key Trivial as there are no 2006-09-28 10:58:17 +10:00
xfs_btree.c [XFS] endianess annotations for xfs_bmbt_key Trivial as there are no 2006-09-28 10:58:17 +10:00
xfs_btree.h [XFS] endianess annotate XFS_BMAP_BROOT_PTR_ADDR Make sure it returns a 2006-09-28 10:58:06 +10:00
xfs_buf_item.c [XFS] Remove unused iop_abort log item operation 2006-09-28 11:02:44 +10:00
xfs_buf_item.h
xfs_cap.h [XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters. 2006-06-09 17:00:52 +10:00
xfs_clnt.h [XFS] Implement the silent parameter to fill_super, previously ignored. 2006-03-31 13:04:17 +10:00
xfs_da_btree.c [XFS] Minor code rearranging and cleanup to prevent some coverity false 2006-09-28 11:03:44 +10:00
xfs_da_btree.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dfrag.c [PATCH] xfs: change uses of f_{dentry,vfsmnt} to use f_path 2006-12-08 08:28:43 -08:00
xfs_dfrag.h [XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them report 2006-06-09 14:48:12 +10:00
xfs_dinode.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2.c [XFS] rename uio_read() to xfs_uio_read() 2006-11-11 18:04:41 +11:00
xfs_dir2.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_block.h
xfs_dir2_data.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_data.h [XFS] endianess annotations for xfs_dir2_data_entry_t 2006-06-09 14:48:37 +10:00
xfs_dir2_leaf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_leaf.h
xfs_dir2_node.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_node.h
xfs_dir2_sf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_sf.h
xfs_dir2_trace.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_dir2_trace.h
xfs_dmapi.h [XFS] Remove KERNEL_VERSION macros from xfs_dmapi.h 2006-11-11 18:05:06 +11:00
xfs_dmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_error.h [XFS] Make quiet mounts quiet 2007-02-10 18:27:56 +11:00
xfs_extfree_item.c [XFS] Remove unused iop_abort log item operation 2006-09-28 11:02:44 +10:00
xfs_extfree_item.h [XFS] cleanup the field types of some item format structures 2006-09-28 10:55:43 +10:00
xfs_fs.h [XFS] Remove several macros that are no longer used anywhere 2006-09-28 11:02:57 +10:00
xfs_fsops.c [XFS] Prevent free space oversubscription and xfssyncd looping. 2006-09-07 14:26:50 +10:00
xfs_fsops.h
xfs_ialloc.c [XFS] Remove last bulkstat false-positives with debug kernels. 2006-09-28 11:02:23 +10:00
xfs_ialloc.h
xfs_ialloc_btree.c [XFS] use NULL for pointer initialisation instead of zero-cast-to-ptr 2006-09-28 10:58:40 +10:00
xfs_ialloc_btree.h [XFS] endianess annotations for xfs_inobt_rec_t / xfs_inobt_key_t 2006-09-28 10:57:04 +10:00
xfs_iget.c [XFS] Prevent a deadlock when xfslogd unpins inodes. 2006-11-11 18:05:00 +11:00
xfs_imap.h
xfs_inode.c [XFS] Stale the correct inode when freeing clusters. 2006-11-21 18:55:33 +11:00
xfs_inode.h [XFS] Clean up i_flags and i_flags_lock handling. 2006-11-11 18:04:54 +11:00
xfs_inode_item.c [XFS] Remove unused iop_abort log item operation 2006-09-28 11:02:44 +10:00
xfs_inode_item.h [XFS] cleanup the field types of some item format structures 2006-09-28 10:55:43 +10:00
xfs_inum.h
xfs_iocore.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_iomap.c [XFS] Improve error handling for the zero-fsblock extent detection code. 2006-09-28 11:03:20 +10:00
xfs_iomap.h
xfs_itable.c [XFS] 955947: Infinite loop in xfs_bulkstat() on formatter() error 2006-09-28 11:06:21 +10:00
xfs_itable.h [XFS] pv 956241, author: nathans, rv: vapo - make ino validation checks 2006-09-28 11:06:15 +10:00
xfs_log.c [XFS] Fixes the leak in reservation space because we weren't ungranting 2006-09-28 11:04:16 +10:00
xfs_log.h [XFS] Remove several macros that are no longer used anywhere 2006-09-28 11:02:57 +10:00
xfs_log_priv.h [XFS] Fixes the leak in reservation space because we weren't ungranting 2006-09-28 11:04:16 +10:00
xfs_log_recover.c [XFS] Rework code snippets slightly to remove remaining recent-gcc 2006-06-28 10:13:52 +10:00
xfs_log_recover.h
xfs_mac.h
xfs_mount.c [XFS] Prevent free space oversubscription and xfssyncd looping. 2006-09-07 14:26:50 +10:00
xfs_mount.h [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms. 2006-09-28 11:04:43 +10:00
xfs_qmops.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_quota.h [XFS] Remove several macros that are no longer used anywhere 2006-09-28 11:02:57 +10:00
xfs_refcache.h
xfs_rename.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rtalloc.c [XFS] Fix a porting botch on the realtime subvol growfs code path. 2006-09-28 11:03:53 +10:00
xfs_rtalloc.h
xfs_rw.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_rw.h [XFS] Push some common code out of write path into core XFS code for 2006-06-19 08:39:53 +10:00
xfs_sb.h [XFS] Remove several macros that are no longer used anywhere 2006-09-28 11:02:57 +10:00
xfs_trans.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans.h [XFS] Remove unused iop_abort log item operation 2006-09-28 11:02:44 +10:00
xfs_trans_ail.c [XFS] Add lock annotations to xfs_trans_update_ail and 2006-09-28 11:04:07 +10:00
xfs_trans_buf.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_extfree.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_inode.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_trans_item.c [XFS] Portability changes: remove prdev, stick to one diagnostic 2006-06-09 15:29:40 +10:00
xfs_trans_priv.h [XFS] Add lock annotations to xfs_trans_update_ail and 2006-09-28 11:04:07 +10:00
xfs_trans_space.h [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_types.h
xfs_utils.c [XFS] Remove version 1 directory code. Never functioned on Linux, just 2006-06-20 13:04:51 +10:00
xfs_utils.h [XFS] Resolve a namespace collision on remaining vtypes for FreeBSD 2006-06-09 17:07:12 +10:00
xfs_vfsops.c [XFS] Fix kmem_zalloc_greedy warnings on 64 bit platforms. 2006-09-28 11:04:43 +10:00
xfs_vnodeops.c [XFS] Prevent a deadlock when xfslogd unpins inodes. 2006-11-11 18:05:00 +11:00