Commit 9a45022
btrfs: allow swap activation to be interruptible
During swap activation we iterate over the extents of a file, then do
several checks for each extent, some of which may take some significant
time such as checking if an extent is shared. Since a file can have
many thousands of extents, this can be a very slow operation and it's
currently not interruptible. I had a bug during development of a previous
patch that resulted in an infinite loop when iterating the extents, so
a core was busy looping and I couldn't cancel the operation, which is very
annoying and requires a reboot. So make the loop interruptible by checking
for fatal signals at the end of each iteration and stopping immediately if
there is one.
CC: [email protected] # 5.4+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 03018e5 commit 9a45022
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10073 | 10073 | | |
10074 | 10074 | | |
10075 | 10075 | | |
| 10076 | + | |
| 10077 | + | |
| 10078 | + | |
| 10079 | + | |
| 10080 | + | |
10076 | 10081 | | |
10077 | 10082 | | |
10078 | 10083 | | |
| |||
0 commit comments