Commit 00ce451
authored
Check if qgroup exists before attempting to destroy it (#484)
When a btrfs subvolume is deleted, its associated qgroup is often
automatically destroyed by btrfs. Timeshift would then attempt to
explicitly destroy the qgroup and fail with an error message, even
though the operation was successful.
This change checks if the qgroup still exists before attempting to
destroy it, eliminating the spurious error message. If the qgroup
is already gone (auto-destroyed with the subvolume), we log a debug
message instead. If the qgroup still exists, we attempt to destroy
it and handle any race condition gracefully.
Fixes the "Failed to destroy qgroup" error that occurs during
snapshot deletion when quotas are enabled.
Related: #354, #4371 parent 61aaa19 commit 00ce451
1 file changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | | - | |
202 | | - | |
203 | 202 | | |
204 | | - | |
205 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
206 | 219 | | |
207 | 220 | | |
208 | | - | |
209 | | - | |
210 | 221 | | |
211 | 222 | | |
212 | 223 | | |
| |||
0 commit comments