Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: fix ->write_inode return values
xfs: fix xfs_mark_inode_dirty during umount
xfs: deprecate the nodelaylog mount option

+30 -28
+8
Documentation/feature-removal-schedule.txt
··· 592 592 interface that was used by acer-wmi driver. It will replaced by 593 593 information log when acer-wmi initial. 594 594 Who: Lee, Chun-Yi <jlee@novell.com> 595 + 596 + ---------------------------- 597 + What: The XFS nodelaylog mount option 598 + When: 3.3 599 + Why: The delaylog mode that has been the default since 2.6.39 has proven 600 + stable, and the old code is in the way of additional improvements in 601 + the log code. 602 + Who: Christoph Hellwig <hch@lst.de>
+11 -3
fs/xfs/xfs_iops.c
··· 70 70 } 71 71 72 72 /* 73 - * If the linux inode is valid, mark it dirty. 74 - * Used when committing a dirty inode into a transaction so that 75 - * the inode will get written back by the linux code 73 + * If the linux inode is valid, mark it dirty, else mark the dirty state 74 + * in the XFS inode to make sure we pick it up when reclaiming the inode. 76 75 */ 77 76 void 78 77 xfs_mark_inode_dirty_sync( ··· 81 82 82 83 if (!(inode->i_state & (I_WILL_FREE|I_FREEING))) 83 84 mark_inode_dirty_sync(inode); 85 + else { 86 + barrier(); 87 + ip->i_update_core = 1; 88 + } 84 89 } 85 90 86 91 void ··· 95 92 96 93 if (!(inode->i_state & (I_WILL_FREE|I_FREEING))) 97 94 mark_inode_dirty(inode); 95 + else { 96 + barrier(); 97 + ip->i_update_core = 1; 98 + } 99 + 98 100 } 99 101 100 102 /*
+11 -25
fs/xfs/xfs_super.c
··· 356 356 mp->m_flags |= XFS_MOUNT_DELAYLOG; 357 357 } else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) { 358 358 mp->m_flags &= ~XFS_MOUNT_DELAYLOG; 359 + xfs_warn(mp, 360 + "nodelaylog is deprecated and will be removed in Linux 3.3"); 359 361 } else if (!strcmp(this_char, MNTOPT_DISCARD)) { 360 362 mp->m_flags |= XFS_MOUNT_DISCARD; 361 363 } else if (!strcmp(this_char, MNTOPT_NODISCARD)) { ··· 879 877 struct xfs_trans *tp; 880 878 int error; 881 879 882 - xfs_iunlock(ip, XFS_ILOCK_SHARED); 883 880 tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS); 884 881 error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0); 885 - 886 882 if (error) { 887 883 xfs_trans_cancel(tp, 0); 888 - /* we need to return with the lock hold shared */ 889 - xfs_ilock(ip, XFS_ILOCK_SHARED); 890 884 return error; 891 885 } 892 886 893 887 xfs_ilock(ip, XFS_ILOCK_EXCL); 894 - 895 - /* 896 - * Note - it's possible that we might have pushed ourselves out of the 897 - * way during trans_reserve which would flush the inode. But there's 898 - * no guarantee that the inode buffer has actually gone out yet (it's 899 - * delwri). Plus the buffer could be pinned anyway if it's part of 900 - * an inode in another recent transaction. So we play it safe and 901 - * fire off the transaction anyway. 902 - */ 903 - xfs_trans_ijoin(tp, ip); 888 + xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL); 904 889 xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); 905 - error = xfs_trans_commit(tp, 0); 906 - xfs_ilock_demote(ip, XFS_ILOCK_EXCL); 907 - 908 - return error; 890 + return xfs_trans_commit(tp, 0); 909 891 } 910 892 911 893 STATIC int ··· 904 918 trace_xfs_write_inode(ip); 905 919 906 920 if (XFS_FORCED_SHUTDOWN(mp)) 907 - return XFS_ERROR(EIO); 921 + return -XFS_ERROR(EIO); 922 + if (!ip->i_update_core) 923 + return 0; 908 924 909 925 if (wbc->sync_mode == WB_SYNC_ALL) { 910 926 /* ··· 917 929 * of synchronous log foces dramatically. 918 930 */ 919 931 xfs_ioend_wait(ip); 920 - xfs_ilock(ip, XFS_ILOCK_SHARED); 921 - if (ip->i_update_core) { 922 - error = xfs_log_inode(ip); 923 - if (error) 924 - goto out_unlock; 925 - } 932 + error = xfs_log_inode(ip); 933 + if (error) 934 + goto out; 935 + return 0; 926 936 } else { 927 937 /* 928 938 * We make this non-blocking if the inode is contended, return