android_kernel_samsung_msm8976/fs/xfs
David Chinner 2823945fda [XFS] Ensure a frozen filesystem has a clean log before writing the dummy
record.

The current Linux XFS freeze code is a mess. We flush the metadata buffers
out while we are still allowing new transactions to start and then fail to
flush the dirty buffers back out before writing the unmount and dummy
records to the log.

This leads to problems when the frozen filesystem is used for snapshots -
we do log recovery on a readonly image and often it appears that the log
image in the snapshot is not correct. Hence we end up with hangs, oops and
mount failures when trying to mount a snapshot image that has been created
when the filesystem has not been correctly frozen.

To fix this, we need to move th metadata flush to after we wait for all
current transactions to complete in teh second stage of the freeze. This
means that when we write the final log records, the log should be clean
and recovery should never occur on a snapshot image created from a frozen
filesystem.

SGI-PV: 959267
SGI-Modid: xfs-linux-melb:xfs-kern:28010a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
2007-02-10 18:36:40 +11:00
..
linux-2.6 [XFS] Ensure a frozen filesystem has a clean log before writing the dummy 2007-02-10 18:36:40 +11:00
quota [XFS] remove unused xflags parameter from sync routines 2007-02-10 18:35:33 +11:00
support [XFS] use struct kvec in struct uio 2007-02-10 18:35:21 +11:00
Kbuild kbuild/xfs: introduce fs/xfs/Kbuild 2006-01-09 20:48:03 +01:00
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] Merge in trivial changes, sync up headers with userspace 2006-01-12 10:29:53 +11:00
xfs_attr.c [XFS] Fix attr2 corruption with btree data extents 2007-02-10 18:35:58 +11: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] Fix attr2 corruption with btree data extents 2007-02-10 18:35:58 +11: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] endianess annotations for xfs_attr_shortform_t 2006-03-17 17:29:25 +11:00
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] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_bit.h
xfs_bmap.c [XFS] Make growfs work for amounts greater than 2TB 2007-02-10 18:36:10 +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] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11: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] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11:00
xfs_buf_item.h [XFS] Get rid of old 5.3/6.1 v1 log items. Cleanup patch sent in by Eric 2007-02-10 18:35:02 +11:00
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] fix sparse warning in xfs_da_btree.c 2007-02-10 18:35:27 +11: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] endianess annotations for xfs_dir2_block_tail_t 2006-03-17 17:27:56 +11:00
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] endianess annotations for xfs_dir2_leaf_entry_t 2006-03-17 17:28:18 +11:00
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] endianess annotations for xfs_dir2_free_hdr_t 2006-03-17 17:27:07 +11:00
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] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11: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] Fix block reservation mechanism. 2007-02-10 18:36:17 +11:00
xfs_fsops.h [XFS] Write log dummy record when freezing filesystem 2006-01-11 15:30:08 +11:00
xfs_ialloc.c [XFS] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11: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] Fix inode log item use-after-free on forced shutdown 2007-02-10 18:36:04 +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] Keep stack usage down for 4k stacks by using noinline. 2007-02-10 18:34:56 +11: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] Fix potential overflow in xfs_iomap_t delta for very large extents 2005-11-25 16:41:33 +11:00
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] Re-initialize the per-cpu superblock counters after recovery. 2007-02-10 18:36:29 +11:00
xfs_log_recover.h
xfs_mac.h
xfs_mount.c [XFS] Re-initialize the per-cpu superblock counters after recovery. 2007-02-10 18:36:29 +11:00
xfs_mount.h [XFS] Re-initialize the per-cpu superblock counters after recovery. 2007-02-10 18:36:29 +11: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] Cleanup cosmetic differences between source trees. 2005-11-03 16:14:31 +11:00
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] Make growfs work for amounts greater than 2TB 2007-02-10 18:36:10 +11:00
xfs_trans.h [XFS] Make growfs work for amounts greater than 2TB 2007-02-10 18:36:10 +11:00
xfs_trans_ail.c [XFS] Workaround log space issue by increasing XFS_TRANS_PUSH_AIL_RESTARTS 2007-02-10 18:35:52 +11: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] Ensure a frozen filesystem has a clean log before writing the dummy 2007-02-10 18:36:40 +11:00
xfs_vnodeops.c [XFS] Prevent a deadlock when xfslogd unpins inodes. 2006-11-11 18:05:00 +11:00