X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q2R6BXMM206626 for ; Tue, 27 Mar 2012 01:11:33 -0500 X-ASG-Debug-ID: 1332828690-04bdf04a9d59bbb0001-NocioJ Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by cuda.sgi.com with ESMTP id AWONrAvNQRUs5YGe for ; Mon, 26 Mar 2012 23:11:31 -0700 (PDT) X-Barracuda-Envelope-From: david@fromorbit.com X-Barracuda-Apparent-Source-IP: 150.101.137.129 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAF1ZcU95LOJU/2dsb2JhbABEuESBCIIJAQEFOhwjEAgDDgouFCUDIROICblLE5B8BJVgiVCGXoJ7 Received: from ppp121-44-226-84.lns20.syd7.internode.on.net (HELO dastard) ([121.44.226.84]) by ipmail06.adl2.internode.on.net with ESMTP; 27 Mar 2012 16:41:30 +1030 Received: from dave by dastard with local (Exim 4.76) (envelope-from ) id 1SCPcv-00067v-TC; Tue, 27 Mar 2012 17:11:29 +1100 Date: Tue, 27 Mar 2012 17:11:29 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 4/5] xfs: push the ilock into xfs_zero_eof Message-ID: <20120327061129.GY5091@dastard> X-ASG-Orig-Subj: Re: [PATCH 4/5] xfs: push the ilock into xfs_zero_eof References: <20120326211421.518374058@bombadil.infradead.org> <20120326211603.654869525@bombadil.infradead.org> <20120327011540.GS5091@dastard> <20120327054827.GA11976@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120327054827.GA11976@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Barracuda-Connect: ipmail06.adl2.internode.on.net[150.101.137.129] X-Barracuda-Start-Time: 1332828690 X-Barracuda-URL: http://192.48.157.11:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.3 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.92369 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Mar 27, 2012 at 01:48:27AM -0400, Christoph Hellwig wrote: > On Tue, Mar 27, 2012 at 12:15:40PM +1100, Dave Chinner wrote: > > > + xfs_ilock(ip, XFS_ILOCK_EXCL); > > > error = xfs_bmapi_read(ip, last_fsb, 1, &imap, &nimaps, 0); > > > + xfs_iunlock(ip, XFS_ILOCK_EXCL); > > > > Does that even need to be an exclusive lock? a shared lock is all > > that is needed to do a lookup, and this is just a lookup... > > It has to be a xfs_ilock_map_shared - but given that we hold the iolock > exclusive anyway I didn't bother to optimize this further. Ok, makes sense. Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com