Why does xfsdump encounter "WARNING: could not get list of non-root attributes for nondir ino nnnn: Cannot allocate memory (12)"?
Dave Chinner
david at fromorbit.com
Wed Jan 11 04:03:16 CST 2012
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 at redhat.com>
> >
> > 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()...
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list