[PATCH V4] reduce bmv_count in xfs_vn_fiemap
Olaf Weber
olaf at sgi.com
Mon Jul 27 02:55:56 CDT 2009
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 every time.
> Chop it down to something reasonable, the number of slots
> in the caller's input buffer. If this is too large the
> caller may get ENOMEM but the reason should not be a
> mystery, and they can try again with something smaller.
> We add 1 to the value because in the normal getbmap
> world, bmv_count includes the header and xfs_getbmap does:
> nex = bmv->bmv_count - 1;
> if (nex <= 0)
> return XFS_ERROR(EINVAL);
> Signed-off-by: Eric Sandeen <sandeen at sandeen.net>
Reviewed-By: Olaf Weber <olaf at sgi.com>
Thanks,
Olaf
--
Olaf Weber SGI Phone: +31(0)30-6696752
Veldzigt 2b Fax: +31(0)30-6696799
Technical Lead 3454 PW de Meern Vnet: 955-7151
Storage Software The Netherlands Email: olaf at sgi.com
More information about the xfs
mailing list