This is a note to let you know that I've just added the patch titled
xfs: fix periodic log flushing
to the 3.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xfs-fix-periodic-log-flushing.patch
and it can be found in the queue-3.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From [email protected] Fri Feb 1 11:36:39 2013
From: Ben Myers <[email protected]>
Date: Fri, 25 Jan 2013 12:45:07 -0600
Subject: xfs: fix periodic log flushing
To: [email protected]
Cc: [email protected], [email protected]
Message-ID: <[email protected]>
From: Dave Chinner <[email protected]>
[Please take this patch for -stable in kernels 3.5-3.7. It doesn't have an
equivalent upstream commit because the code was removed before the bug was
discovered. See f661f1e0bf50 and 7e18530bef6a.]
There is a logic inversion in xfssyncd_worker() which means that the
log is not periodically forced or idled correctly. This means that
metadata changes aggregated in memory do not get flushed in a timely
manner, and hence if filesystem is not cleanly unmounted those
changes can be lost. This loss can manifest itself even hours after
the changes were made if the filesystem is left to idle without a
sync() occurring between the last modification and the
crash/shutdown occuring.
Signed-off-by: Dave Chinner <[email protected]>
Reviewed-by: Ben Myers <[email protected]>
Signed-off-by: Ben Myers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/xfs/xfs_sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
If people agree the fix is correct, I'll post it to the -stable
list for inclusion...
--- a/fs/xfs/xfs_sync.c
+++ b/fs/xfs/xfs_sync.c
@@ -400,7 +400,7 @@ xfs_sync_worker(
* cancel_delayed_work_sync on this work queue before tearing down
* the ail and the log in xfs_log_unmount.
*/
- if (!(mp->m_super->s_flags & MS_ACTIVE) &&
+ if ((mp->m_super->s_flags & MS_ACTIVE) &&
!(mp->m_flags & XFS_MOUNT_RDONLY)) {
/* dgc: errors ignored here */
if (mp->m_super->s_writers.frozen == SB_UNFROZEN &&
Patches currently in stable-queue which might be from [email protected] are
queue-3.7/xfs-fix-possible-use-after-free-with-aio.patch
queue-3.7/xfs-fix-_xfs_buf_find-oops-on-blocks-beyond-the-filesystem-end.patch
queue-3.7/xfs-fix-periodic-log-flushing.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html