xfs
[Top] [All Lists]

Re: Review: Don't use kmap() in xfs_iozero().

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: Review: Don't use kmap() in xfs_iozero().
From: David Chinner <dgc@xxxxxxx>
Date: Sat, 3 Feb 2007 00:39:41 +1100
Cc: David Chinner <dgc@xxxxxxx>, xfs-dev@xxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20070202114830.GB23187@xxxxxxxxxxxxx>
References: <20070202054044.GO33919298@xxxxxxxxxxxxxxxxx> <20070202114830.GB23187@xxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Fri, Feb 02, 2007 at 11:48:30AM +0000, Christoph Hellwig wrote:
> On Fri, Feb 02, 2007 at 04:40:44PM +1100, David Chinner wrote:
> > kmap is inefficient and does scale well. kmap_atomic() is a better
> > choice. Use the generic wrapper function instead of open coding the
> > kmap-memset-dcache flush-kumap stuff.  Suggested by Andrew Morton.
> > 
> > Comments?
> 
> Looks good.
> 
> > +           memclear_highpage_flush(page, (unsigned int)offset, bytes);
> 
> Do you need the cast here?  An unsigned long should be automatically
> demoted to an unsigned int when passing it as an argument.

Even on 64 bit platforms? I just added an explicit cast as a matter
of avoiding potential gcc warnings on other platforms/compiler
versions. Maybe I'm just being paranoid and I can remove it?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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