Commit 5229a65
ext4: do not let fstrim block system suspend
Len Brown has reported that system suspend sometimes fail due to
inability to freeze a task working in ext4_trim_fs() for one minute.
Trimming a large filesystem on a disk that slowly processes discard
requests can indeed take a long time. Since discard is just an advisory
call, it is perfectly fine to interrupt it at any time and the return
number of discarded blocks until that moment. Do that when we detect the
task is being frozen.
Cc: [email protected]
Reported-by: Len Brown <[email protected]>
Suggested-by: Dave Chinner <[email protected]>
References: https://bugzilla.kernel.org/show_bug.cgi?id=216322
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>1 parent 45e4ab3 commit 5229a65
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
6916 | 6917 | | |
6917 | 6918 | | |
6918 | 6919 | | |
| 6920 | + | |
| 6921 | + | |
| 6922 | + | |
| 6923 | + | |
| 6924 | + | |
6919 | 6925 | | |
6920 | 6926 | | |
6921 | 6927 | | |
| |||
6949 | 6955 | | |
6950 | 6956 | | |
6951 | 6957 | | |
6952 | | - | |
6953 | | - | |
| 6958 | + | |
| 6959 | + | |
6954 | 6960 | | |
6955 | 6961 | | |
6956 | 6962 | | |
| |||
7072 | 7078 | | |
7073 | 7079 | | |
7074 | 7080 | | |
| 7081 | + | |
| 7082 | + | |
7075 | 7083 | | |
7076 | 7084 | | |
7077 | 7085 | | |
| |||
0 commit comments