Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141371

::copy_file_range falsely(?) returns only TriStateResult::Failed on failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.10.0
    • Core: I/O
    • None
    • Linux/Wayland, Linux/X11, Linux/Other display system

      https://bbs.archlinux.org/viewtopic.php?pid=2268636#p2268636

      The gist is akonadi failing to copy an old error log on a somewhat exotic ecryptfs+xfs w/ a qt6-base update 6.9 to 6.10 (still works w/ ext4, not clear whether ecryptfs or xfs or the combination is the problem)

       

      strace shows that QFileSystemEngine::cloneFile used to fail FICLONE with ENOSUPP, then sendfile w/ EINVAL and then the file gets manually read/written into a qt_temp.HqmGfm tmpfile and the inode linked to Akonadi.error.old

      Now FICLONE is still ENOSUPP, then ::copy_file_range fails w/ EINVAL what in https://github.com/qt/qtbase/blob/58faca4e07011510388df94ddea2f95b56750bae/src/corelib/io/qfilesystemengine_unix.cpp#L1201 returns TriStateResult::Failed but from the below comment at https://github.com/qt/qtbase/blob/58faca4e07011510388df94ddea2f95b56750bae/src/corelib/io/qfilesystemengine_unix.cpp#L1217 this should probably be TriStateResult::NotSupported to resort to the upper layer copy as it probably used to w/ the previous ::sendfile failure (or even try sendfile first?)

        For Gerrit Dashboard: QTBUG-141371
        # Subject Branch Project Status CR V

            thiago Thiago Macieira
            lbkng Thomas Lübking
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change