public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reduce bmv_count in xfs_vn_fiemap
@ 2009-07-15 19:33 Eric Sandeen
  2009-07-16 10:56 ` Olaf Weber
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Sandeen @ 2009-07-15 19:33 UTC (permalink / raw)
  To: xfs mailing list

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.

(this is a regression, FWIW)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

iff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c
index 58973bb..370e9a7 100644
--- a/fs/xfs/linux-2.6/xfs_iops.c
+++ b/fs/xfs/linux-2.6/xfs_iops.c
@@ -680,8 +680,12 @@ xfs_vn_fiemap(
 	else
 		bm.bmv_length = BTOBB(length);
 
-	/* our formatter will tell xfs_getbmap when to stop. */
-	bm.bmv_count = MAXEXTNUM;
+	/*
+	 * xfs_getbmap allocates based on that; pick a count that's
+	 * not too outragous.
+	 * Our formatter will tell xfs_getbmap when to stop.
+	 */
+	bm.bmv_count = 64;
 	bm.bmv_iflags = BMV_IF_PREALLOC;
 	if (fieinfo->fi_flags & FIEMAP_FLAG_XATTR)
 		bm.bmv_iflags |= BMV_IF_ATTRFORK;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-07-27  7:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 19:33 [PATCH] reduce bmv_count in xfs_vn_fiemap Eric Sandeen
2009-07-16 10:56 ` Olaf Weber
2009-07-16 14:19   ` Eric Sandeen
2009-07-16 14:48   ` [PATCH V2] " Eric Sandeen
2009-07-16 15:18     ` Olaf Weber
2009-07-16 19:11     ` [PATCH V3] " Eric Sandeen
2009-07-17 11:46       ` Olaf Weber
2009-07-18 14:25       ` Christoph Hellwig
2009-07-27  2:52       ` [PATCH V4] " Eric Sandeen
2009-07-27  7:55         ` Olaf Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox