9 Commits

Author SHA1 Message Date
Tor Arne Vestbø
d6fb55b81f Fix CodeFactor issue 2021-07-07 16:59:52 +02:00
Tor Arne Vestbø
e5354e8841 Fix CodeFactor issue 2021-06-30 23:27:38 +02:00
Tor Arne Vestbø
00a45b9edc Keep files open for non-zero-copy reads as well
Opening and closing files is bad for performance, so now that
we accurately track the situation of hitting too many open files
we can keep the band files open, even for the non-readbuf code
path.

This unifies the logic of opening (and caching file descriptors)
between the readbuf and non-readbuf code paths.
2021-06-30 22:50:32 +02:00
Tor Arne Vestbø
b5398b1958 Catch EMFILE instead of trying to compute when we'll hit max open files
The previous logic was flawed anyways, as reading a range could
potentially span multiple bands, but we only checked if we were
just below the max limit.
2021-06-30 22:28:50 +02:00
Tor Arne Vestbø
fab4ea622e Add test for hitting max open files 2021-06-30 22:28:13 +02:00
Tor Arne Vestbø
a4ad1d74c5 Pass mount dir and DMG file out of mount_sparsebundle 2021-06-30 18:23:20 +02:00
Tor Arne Vestbø
3a95b0cd73 Return dmg path and filename from mount_sparsebundle 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
a5ad123db1 Look for sparsebundle.dmg when setting up tests 2021-06-27 22:07:56 +02:00
Tor Arne Vestbø
fef3aeadfa Share test code between test suites 2021-06-27 22:07:56 +02:00