* [PATCH] Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap
@ 2015-05-19 14:44 Josef Bacik
2015-05-19 18:07 ` Chris Mason
0 siblings, 1 reply; 3+ messages in thread
From: Josef Bacik @ 2015-05-19 14:44 UTC (permalink / raw)
To: linux-btrfs
We should be doing this, it's weird we hadn't been doing this.
Signed-off-by: Josef Bacik <jbacik@fb.com>
---
fs/btrfs/extent_io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c32d226..428930b 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4492,6 +4492,8 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
}
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
flags |= FIEMAP_EXTENT_ENCODED;
+ if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
+ flags |= FIEMAP_EXTENT_UNWRITTEN;
free_extent_map(em);
em = NULL;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap
2015-05-19 14:44 [PATCH] Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap Josef Bacik
@ 2015-05-19 18:07 ` Chris Mason
2015-05-19 19:20 ` Josef Bacik
0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2015-05-19 18:07 UTC (permalink / raw)
To: Josef Bacik, linux-btrfs
On 05/19/2015 10:44 AM, Josef Bacik wrote:
> We should be doing this, it's weird we hadn't been doing this.
Isn't there an xfstest we should be failing because of this?
-chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap
2015-05-19 18:07 ` Chris Mason
@ 2015-05-19 19:20 ` Josef Bacik
0 siblings, 0 replies; 3+ messages in thread
From: Josef Bacik @ 2015-05-19 19:20 UTC (permalink / raw)
To: Chris Mason, linux-btrfs
On 05/19/2015 02:07 PM, Chris Mason wrote:
> On 05/19/2015 10:44 AM, Josef Bacik wrote:
>> We should be doing this, it's weird we hadn't been doing this.
>
> Isn't there an xfstest we should be failing because of this?
>
You'd think that but apparently the test that does my fiemap-tester
specifically disables using prealloc'ed extents, so I've added another
test to do the tester with prealloc, which we pass with this patch. Thanks,
Josef
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-19 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 14:44 [PATCH] Btrfs: set UNWRITTEN for prealloc'ed extents in fiemap Josef Bacik
2015-05-19 18:07 ` Chris Mason
2015-05-19 19:20 ` Josef Bacik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.