Commit c16dcc7
authored
Fix the
* Fix the `fadvise` handling of large offsets on FreeBSD.
On FreeBSD, when a large `u64` converts to a negative offset, we add
some special-case behavior to hide the fact that this conversion is
happening. Clarify the comments, update the code to do a proper no-op
in the case of a negative offset, and use the correct length in the
case of an overflowing offset+length.
* It appears FreeBSD doesn't like it when offset+len is i64::MAX+1.
* Handle negative lengths.fadvise handling of large offsets on FreeBSD. (#1318)1 parent a876d83 commit c16dcc7
2 files changed
Lines changed: 29 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1221 | 1230 | | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1227 | 1245 | | |
1228 | | - | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1229 | 1249 | | |
1230 | 1250 | | |
1231 | 1251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments