* [PATCH 1/2] xfstests: fix fiemap-tester for fewer extents returned
@ 2011-02-24 22:02 Eric Sandeen
2011-02-25 20:47 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2011-02-24 22:02 UTC (permalink / raw)
To: xfs mailing list; +Cc: Josef Bacik
If the fiemap call returns fewer extents than asked for,
the fiemap tester gets confused. If this happens, advance,
and call fiemap again for the next offset.
XFS exposed this because if a file is all-delalloc, it was
only returning 1 mapped extent (this is probably also a buglet).
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/src/fiemap-tester.c b/src/fiemap-tester.c
index f6875af..53d7a64 100644
--- a/src/fiemap-tester.c
+++ b/src/fiemap-tester.c
@@ -467,8 +467,10 @@ compare_fiemap_and_map(int fd, char *map, int blocks, int blocksize)
for (i = cur_extent, c = 1; i < blocks; i++, c++) {
__u64 logical_offset = i * blocksize;
- if (c > blocks_to_map)
+ if (c > fiemap->fm_mapped_extents) {
+ i++;
break;
+ }
switch (map[i]) {
case 'D':
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] xfstests: fix fiemap-tester for fewer extents returned
2011-02-24 22:02 [PATCH 1/2] xfstests: fix fiemap-tester for fewer extents returned Eric Sandeen
@ 2011-02-25 20:47 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2011-02-25 20:47 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Josef Bacik, xfs mailing list
On Thu, 2011-02-24 at 16:02 -0600, Eric Sandeen wrote:
> If the fiemap call returns fewer extents than asked for,
> the fiemap tester gets confused. If this happens, advance,
> and call fiemap again for the next offset.
>
> XFS exposed this because if a file is all-delalloc, it was
> only returning 1 mapped extent (this is probably also a buglet).
Looks good. I presume you mean we should get back
an array of delalloc extents, right? I started
looking at why only one is returned but haven't
found it yet.
Reviewed-by: Alex Elder <aelder@sgi.com>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-25 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 22:02 [PATCH 1/2] xfstests: fix fiemap-tester for fewer extents returned Eric Sandeen
2011-02-25 20:47 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox