Re: Current Samba master incorrectly returns STATUS_INVALID_HANDLE on copy_chunk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/8/24 6:55 AM, Steve French wrote:
Here are the logs from simple experiment (mounted with "linux") to
current Samba master. It gets NT_STATUS_INVALID_HANDLE (but works with
default mount - ie not mounting with "linux" (or equivalent "posix")

repro is simple:

xfstests-dev/src# ./cloner /mnt2/testfilesrc
/mnt2/clone-of-testfilesrc-mounted-with-linux

...
23:49:54.817143 openat(13, "clone-of-testfilesrcmntposix", O_RDWR|O_CREAT|O_EXCL|O_APPEND|O_NONBLOCK|O_NOFOLLOW, 0777) = 27
...
23:49:54.837786 copy_file_range(28, [0], 27, [0], 1048576, 0) = -1 EBADF (Bad file descriptor)

The problem is the O_APPEND on the destination file handle.

We pass that flag if

        if (posix_open && (access_mask & FILE_APPEND_DATA)) {
                flags |= O_APPEND;
        }

Is this on a posix mount? Otherwise it seems to be the clients fault passing FILE_APPEND_DATA.

-slow

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux