linux-stable/fs/xfs/linux-2.6
Eric Sandeen 97db39a1f6 xfs: reduce bmv_count in xfs_vn_fiemap
commit 6321e3ed2a 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>
2009-07-31 00:56:58 -05:00
..
kmem.c [XFS] kmem_free and kmem_realloc to use const void * 2008-07-28 16:58:43 +10:00
kmem.h xfs: prevent deadlock in xfs_qm_shake() 2009-06-01 22:59:45 -05:00
mrlock.h [XFS] shrink mrlock_t 2008-04-29 15:54:02 +10:00
sv.h remove dead code from sv_t implementation 2008-12-04 15:39:21 +11:00
time.h
xfs_acl.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_aops.c xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
xfs_aops.h xfs: prevent unwritten extent conversion from blocking I/O completion 2009-04-06 18:42:11 +02:00
xfs_buf.c block: Do away with the notion of hardsect_size 2009-05-22 23:22:54 +02:00
xfs_buf.h xfs: only issues a cache flush on unmount if barriers are enabled 2009-03-06 17:35:12 -06:00
xfs_cred.h [XFS] Fix merge failures 2008-12-29 16:47:18 +11:00
xfs_dmapi_priv.h
xfs_export.c [XFS] pass XFS_IGET_BULKSTAT to xfs_iget for handle operations 2009-01-09 15:17:17 +11:00
xfs_export.h xfs: new export ops 2007-10-22 08:13:20 -07:00
xfs_file.c mm: page_mkwrite change prototype to match fault 2009-04-01 08:59:14 -07:00
xfs_fs_subr.c xfs: use xfs_sync_inodes() for device flushing 2009-04-06 18:44:54 +02:00
xfs_fs_subr.h [XFS] decontaminate vnode operations from behavior details 2007-10-15 16:54:29 +10:00
xfs_globals.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_globals.h CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
xfs_ioctl.c Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfs 2009-06-11 16:56:49 -05:00
xfs_ioctl.h xfs: fix dentry aliasing issues in open_by_handle 2009-01-19 14:43:18 +11:00
xfs_ioctl32.c xfs: use memdup_user() 2009-04-20 23:02:51 -04:00
xfs_ioctl32.h [XFS] fix compile on 32 bit systems 2008-12-04 13:07:29 +11:00
xfs_iops.c xfs: reduce bmv_count in xfs_vn_fiemap 2009-07-31 00:56:58 -05:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: kill mutex_t typedef 2009-03-29 09:51:00 +02:00
xfs_lrw.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00
xfs_lrw.h [XFS] remove sendfile leftovers 2008-04-29 16:08:14 +10:00
xfs_quotaops.c xfs: split xfs_sync_inodes 2009-06-08 15:35:48 +02:00
xfs_stats.c [XFS] fix spurious gcc warnings 2008-12-01 11:07:37 +11:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus 2009-06-12 21:28:59 -05:00
xfs_super.h xfs: get rid of indirections in the quotaops implementation 2009-02-09 08:47:34 +01:00
xfs_sync.c xfs: remove SYNC_BDFLUSH 2009-06-08 15:37:16 +02:00
xfs_sync.h xfs: remove SYNC_BDFLUSH 2009-06-08 15:37:16 +02:00
xfs_sysctl.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_version.h
xfs_vnode.h xfs: kill VN_BAD 2009-03-16 08:25:25 +01:00
xfs_xattr.c xfs: use generic Posix ACL code 2009-06-10 17:07:47 +02:00