summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2025-01-21 10:46:27 -0800
committerThiago Macieira <thiago.macieira@intel.com>2025-01-27 12:11:23 -0800
commitfe75526542dd77afb3f8d0d32ad5f7d22b6c5fbb (patch)
treea2897bcb3647ac8515450872fa52f2770f7ca2af /src/corelib/kernel/qobject.cpp
parentbe2df3c6e099485f5bd805d8a1e775996684c9d2 (diff)
QFileSystemEngine/Linux: detect sendfile() permanent errors
sendfile(2) isn't always able to send to all file types, so current code only detected the ability to send by having sent something. This commit tries a little harder to detect permanent data-send problems on the first try. I'm unable to find a case where this fails on Linux, in particular because we don't enter this block if the source file isn't S_IFREG. Now, on Linux, there's no file-copy pump: openat(AT_FDCWD, "dummy.o", O_RDONLY|O_CLOEXEC) = 4 openat(AT_FDCWD, "/tmp/tmp", O_RDWR|O_CLOEXEC|O_TMPFILE, 0600) = 5 ioctl(5, BTRFS_IOC_CLONE or FICLONE, 4) = -1 EXDEV sendfile(5, 4, NULL, 2147479552) = -1 ENOSPC lseek(5, 0, SEEK_SET) = 0 close(5) = 0 write(2, "\"Could not copy to /tmp/tmp/f: No space left on device\"") = 56 close(4) = 0 Change-Id: I88ce23447b0d7341848cfffd2c469e15cb69f5a6 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
0 files changed, 0 insertions, 0 deletions