projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33a86cf
)
btrfs: allow fiemap to be interruptible
author
Filipe Manana
<fdmanana@suse.com>
Thu, 1 Sep 2022 13:18:26 +0000
(14:18 +0100)
committer
David Sterba
<dsterba@suse.com>
Mon, 26 Sep 2022 10:28:00 +0000
(12:28 +0200)
Doing fiemap on a file with a very large number of extents can take a very
long time, and we have reports of it being too slow (two recent examples
in the Link tags below), so make it interruptible.
Link:
https://lore.kernel.org/linux-btrfs/21dd32c6-f1f9-f44a-466a-e18fdc6788a7@virtuozzo.com/
Link:
https://lore.kernel.org/linux-btrfs/Ysace25wh5BbLd5f@atmark-techno.com/
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/extent_io.c
b/fs/btrfs/extent_io.c
index 8f143c10d81b7d8344c179400bc2f2a94f61854f..28e49a4a9eb9841901355c1872a58774e3e28c33 100644
(file)
--- a/
fs/btrfs/extent_io.c
+++ b/
fs/btrfs/extent_io.c
@@
-5623,6
+5623,11
@@
int extent_fiemap(struct btrfs_inode *inode, struct fiemap_extent_info *fieinfo,
ret = 0;
goto out_free;
}
+
+ if (fatal_signal_pending(current)) {
+ ret = -EINTR;
+ goto out_free;
+ }
}
out_free:
if (!ret)