[Top] [All Lists]

Re: Why does xfsdump encounter "WARNING: could not get list of non-root

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: Why does xfsdump encounter "WARNING: could not get list of non-root attributes for nondir ino nnnn: Cannot allocate memory (12)"?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 11 Jan 2012 21:03:16 +1100
Cc: Michael Lueck <mlueck@xxxxxxxxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <20120111095513.GA26958@xxxxxxxxxxxxx>
References: <jdo01m$62j$1@xxxxxxxxxxxxxxx> <20120102213706.GQ23662@dastard> <20120111095513.GA26958@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Jan 11, 2012 at 04:55:14AM -0500, Christoph Hellwig wrote:
> On Tue, Jan 03, 2012 at 08:37:06AM +1100, Dave Chinner wrote:
> > xfs: handle kmalloc failure when reading attrs
> > 
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > xfsdump uses for a large buffer for extended attributes, which has a
> > kmalloc'd shadow buffer in the kernel. This can fail after the
> > system has been running for some time as it is a high order
> > allocation. Convert this to a vmalloc so that it doesn't require
> > contiguous memory and so won't randomly fail while xfsdump is
> > running.
> I think this should use kmalloc for allocation smaller than a page to
> avoid the vmalloc overhead for the usual case of small attributes.
> Also the fs/xattr.c code for the normal xattr system calls needs the
> same treatment.

Sounds like a generic kvmalloc()/kvfree() call pair is the answer
then. i.e. if kmalloc fails, then use vmalloc()...


Dave Chinner

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