Received: with ECARTIS (v1.0.0; list xfs); Mon, 25 Aug 2008 19:08:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-r574664 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m7Q289YB014363 for ; Mon, 25 Aug 2008 19:08:09 -0700 X-ASG-Debug-ID: 1219716572-545d035d0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail01.adl6.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 39A64FBBE61 for ; Mon, 25 Aug 2008 19:09:32 -0700 (PDT) Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by cuda.sgi.com with ESMTP id z2jjpBHDieHbqICW for ; Mon, 25 Aug 2008 19:09:32 -0700 (PDT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtACAFwAs0h5LD0wiGdsb2JhbACSLAEBAQ8gpC2Baw X-IronPort-AV: E=Sophos;i="4.32,267,1217773800"; d="scan'208";a="180308912" Received: from ppp121-44-61-48.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.61.48]) by ipmail01.adl6.internode.on.net with ESMTP; 26 Aug 2008 11:39:30 +0930 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1KXnzr-0006Fp-T4; Tue, 26 Aug 2008 12:09:27 +1000 Date: Tue, 26 Aug 2008 12:09:27 +1000 From: Dave Chinner To: "Nathaniel W. Turner" Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: XFS_BUF_ORDERED instead of XFS_BUF_ISORDERED? Subject: Re: XFS_BUF_ORDERED instead of XFS_BUF_ISORDERED? Message-ID: <20080826020927.GV5706@disturbed> Mail-Followup-To: "Nathaniel W. Turner" , xfs@oss.sgi.com References: <48B32E36.7060305@houseofnate.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48B32E36.7060305@houseofnate.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail01.adl6.internode.on.net[203.16.214.146] X-Barracuda-Start-Time: 1219716573 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0002 1.0000 -2.0200 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.3729 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV 0.91.2/8088/Mon Aug 25 13:49:45 2008 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 17720 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: david@fromorbit.com Precedence: bulk X-list: xfs On Mon, Aug 25, 2008 at 06:12:06PM -0400, Nathaniel W. Turner wrote: > Hi folks, > > While doing a little light reading, I noticed the following in > fs/xfs/xfs_log.c:1011 (in the 2.6.26.3 Linux kernel tree). Am I missing > something, or should XFS_BUF_ORDERED be replaced with XFS_BUF_ISORDERED > in this check? Yes, it is wrong. Well spotted. I guess this shows that I was right when I complained about needing this untestable barrier handling code in every filesystem.... Patch below. Cheers, Dave. -- Dave Chinner david@fromorbit.com XFS: Fix barrier status change detection The current code in xlog_iodone() uses the wrong macro to check if the barrier has been cleared due to an EOPNOTSUPP error form the lower layer. Signed-off-by: Dave Chinner --- fs/xfs/xfs_log.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index ccba14e..ff2ac20 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1009,7 +1009,7 @@ xlog_iodone(xfs_buf_t *bp) * layer, it means the underlyin device no longer supports * barrier I/O. Warn loudly and turn off barriers. */ - if ((l->l_mp->m_flags & XFS_MOUNT_BARRIER) && !XFS_BUF_ORDERED(bp)) { + if ((l->l_mp->m_flags & XFS_MOUNT_BARRIER) && !XFS_BUF_ISORDERED(bp)) { l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER; xfs_fs_cmn_err(CE_WARN, l->l_mp, "xlog_iodone: Barriers are no longer supported"