aboutsummaryrefslogtreecommitdiffstats
path: root/lib/iomap.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2009-07-26 22:52:01 -0400
committerFelix Blyakher <felixb@sgi.com>2009-07-27 00:21:39 -0400
commit5c04c78afba4805846519f29f0b55ac8759e0d48 (patch)
tree21809071214d1c6cc7e1ff6f9cfc9aa36b3c1c99 /lib/iomap.c
parentb56063453881a6d94cf5718c6769de6e35e67753 (diff)
xfs: reduce bmv_count in xfs_vn_fiemap
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@sandeen.net> Reviewed-by: Olaf Weber <olaf@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Felix Blyakher <felixb@sgi.com>
Diffstat (limited to 'lib/iomap.c')
0 files changed, 0 insertions, 0 deletions