[Top] [All Lists]

Re: review: allocate bmapi args

To: David Chinner <dgc@xxxxxxx>
Subject: Re: review: allocate bmapi args
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Thu, 19 Apr 2007 17:51:02 +1000
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070419072505.GS48531920@xxxxxxxxxxxxxxxxx>
Organization: Aconex
References: <20070419072505.GS48531920@xxxxxxxxxxxxxxxxx>
Reply-to: nscott@xxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
On Thu, 2007-04-19 at 17:25 +1000, David Chinner wrote:
> +       bma = kmem_zalloc(sizeof(xfs_bmalloca_t), KM_SLEEP);
> +       if (!bma)
> +               return XFS_ERROR(ENOMEM); 

I guess you meant KM_NOSLEEP?  Are you sure this is legit though?
(are all callers going to be able to handle this?)  I'm thinking
of the writeout paths where we're doing space allocation (unwritten
extent conversion comes through here too) in order to free up some
page cache so other memory allocs elsewhere can proceed.  I don't
see any other memory allocations in this area of the code, so I
guess I'd be treading really carefully here..

(Oh, and why the _zalloc?  Could just do an _alloc, since previous
code was using non-zeroed memory - so, should have been filling in
all fields).



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