[PATCH] reduce bmv_count in xfs_vn_fiemap

Eric Sandeen sandeen at sandeen.net
Thu Jul 16 09:19:42 CDT 2009


Olaf Weber wrote:
> Eric Sandeen writes:
> 
>> commit 6321e3ed2acf3ee9643cdd403e1c88605d7944ba caused
>> the full bmv_count's worth of getbmapx structures to get
>> allocated; telling it to do MAXEXTNUM was a bit insane,
>> resulting in ENOMEM.
> 
>> Chop it down to something reasonable, the caller can
>> loop over this if the file has > 64 extents.
> 
> It does seem to me that this will result in an unusal case for the
> caller, in that it will get fewer extents than fit in the provided
> buffer, yet should loop.  Do current callers know that they can hit
> this case, detect it, and loop accordingly?  Or is this just pushing
> the problem/regression to userspace?

Well, userspace just keeps calling until it gets FIEMAP_LAST in the
flags.  But yeah, I forgot that we were given the nr of user extents,
I'll send a better V2.

-Eric




More information about the xfs mailing list