xfs
[Top] [All Lists]

Re: [PATCH] [XFS] Warn on transaction in flight on read-only remount

To: Felix Blyakher <felixb@xxxxxxx>
Subject: Re: [PATCH] [XFS] Warn on transaction in flight on read-only remount
From: Felix Blyakher <felixb@xxxxxxx>
Date: Thu, 22 Jan 2009 00:10:15 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1232578645-20213-1-git-send-email-felixb@xxxxxxx>
References: <1232578645-20213-1-git-send-email-felixb@xxxxxxx>
[resending after fixing xfs mailing list on oss]

Just wanted to point out to discussion on this topic:

http://oss.sgi.com/archives/xfs/2008-12/msg00019.html

I merely took a suggestion from it, and put it in a patch.

Felix

On Jan 21, 2009, at 4:57 PM, Felix Blyakher wrote:

Till VFS can correctly support read-only remount without racing,
use WARN_ON instead of BUG_ON on detecting transaction in flight
after quiescing filesystem.

Signed-off-by: Felix Blyakher <felixb@xxxxxxx>
---
 fs/xfs/linux-2.6/xfs_sync.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 2ed0353..d8373ee 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -371,7 +371,10 @@ xfs_quiesce_attr(
        /* flush inodes and push all remaining buffers out to disk */
        xfs_quiesce_fs(mp);

-       ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0);
+       /* Just warn here till VFS can correctly support
+        * read-only remount without racing.
+        */
+       WARN_ON(atomic_read(&mp->m_active_trans) == 0);

        /* Push the superblock and write an unmount record */
        error = xfs_log_sbcount(mp, 1);
--
1.6.1


<Prev in Thread] Current Thread [Next in Thread>