[Top] [All Lists]

Re: xfs_bmap Cannot allocate memory

To: Michael Weissenbacher <mw@xxxxxxxxxxxx>
Subject: Re: xfs_bmap Cannot allocate memory
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 5 Jul 2011 20:32:17 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4E129B00.4020709@xxxxxxxxxxxx>
References: <4E129B00.4020709@xxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Jul 05, 2011 at 07:02:56AM +0200, Michael Weissenbacher wrote:
> Hi List!
> I've got a file here on which i cannot use xfs_bmap to determine it's
> fragments. All that i know is that it must have a really great number of
> them. It was the result of running a smbd without strict allocate. The
> machine itself has 8GiB of RAM and 10GiB of swap available, so that
> shouldn't be the problem. I guess this is some bug in xfs_bmap. Or is it
> a known limitation?

Sounds like your memory is fragmented. IIRC, bmap tries to map all
the extents in a single buffer, and that might cause problems for
files with large numbers of extents. ENOMEM can occur if an
internal buffer cannot be allocated to hold all the extents to be
mapped in one call.

Try using the "-n <num_extents>" option to reduce the number of
extents gathered per ioctl call and see if that makes the
issue go away.


Dave Chinner

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