Received: with ECARTIS (v1.0.0; list xfs); Mon, 25 Aug 2008 16:14:57 -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.1 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.3.0-r574664 Received: from cuda.sgi.com ([192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m7PNEthI032437 for ; Mon, 25 Aug 2008 16:14:55 -0700 X-ASG-Debug-ID: 1219706177-198702ec0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 6662D1A478FB for ; Mon, 25 Aug 2008 16:16:17 -0700 (PDT) Received: from sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id 0DyGWs45AkPo4idO for ; Mon, 25 Aug 2008 16:16:17 -0700 (PDT) Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id A6794AC3591; Mon, 25 Aug 2008 18:16:16 -0500 (CDT) Message-ID: <48B33D40.6020104@sandeen.net> Date: Mon, 25 Aug 2008 18:16:16 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 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? References: <48B32E36.7060305@houseofnate.net> In-Reply-To: <48B32E36.7060305@houseofnate.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: sandeen.net[209.173.210.139] X-Barracuda-Start-Time: 1219706178 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 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.3716 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: 17714 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs 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? > > nate > > > /* > * If the ordered flag has been removed by a lower > * 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)) { > l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER; > xfs_fs_cmn_err(CE_WARN, l->l_mp, > "xlog_iodone: Barriers are no longer > supported" > " by device. Disabling barriers\n"); > xfs_buftrace("XLOG_IODONE BARRIERS OFF", bp); > } > > wow, I think you're right. Fortunately I dont' think this does much harm in most cases - the buffer is usually ordered here anyway, and we're re-setting it instead of testing it, as you noticed. But it's making this whole dynamic-lack-of-barrier detection pointless/broken. modest proposal: change the macro (and friends) to XFS_BUF_SETORDERED or somesuch. :) -Eric