X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n0M6BUZ0050873 for ; Thu, 22 Jan 2009 00:11:31 -0600 Received: from [IPv6:::1] (unknown [198.149.20.12]) by relay3.corp.sgi.com (Postfix) with ESMTP id AAE7DAC015; Wed, 21 Jan 2009 22:10:43 -0800 (PST) In-Reply-To: <1232578645-20213-1-git-send-email-felixb@sgi.com> References: <1232578645-20213-1-git-send-email-felixb@sgi.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <0AC805F5-C30E-4439-A32B-2625D7FBEDFD@sgi.com> Cc: xfs@oss.sgi.com Content-Transfer-Encoding: 7bit From: Felix Blyakher Subject: Re: [PATCH] [XFS] Warn on transaction in flight on read-only remount Date: Thu, 22 Jan 2009 00:10:15 -0600 To: Felix Blyakher X-Mailer: Apple Mail (2.753.1) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean [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 > --- > 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 >