Need advice about do we need this if condition
hello I am trying to fix https://bugzilla.kernel.org/show_bug.cgi?id=202935 I found cause https://github.com/torvalds/linux/blob/master/fs/cifs/cifsfs.c#L1076 not sure is it correct to remove such condition ? Thanks AK
On Wed, 17 Apr 2019 08:25:22 +0300 (Adding Al Viro and the linux-fsdevel lists, as at the very least, the manpage for the syscall needs some clarification...)
hello I am trying to fix https://bugzilla.kernel.org/show_bug.cgi?id=202935
So - convince us that it's in fact a "bug" and not a restriction.
I found cause https://github.com/torvalds/linux/blob/master/fs/cifs/cifsfs.c#L1076 not sure is it correct to remove such condition ?
Does the CIFS protocol support copying from a file to another location in the same file? Was it intended to work on *any* filesystem? (For that matter, the manpage for the syscall is unclear on whether having both file descriptors open on the same file is OK or not - for bonus ambiguity points, there's exactly zero discussion of what happens if source and destination overlap destructively).
On Wed, Apr 17, 2019 at 2:59 AM Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
On Wed, 17 Apr 2019 08:25:22 +0300
(Adding Al Viro and the linux-fsdevel lists, as at the very least, the manpage for the syscall needs some clarification...)
hello I am trying to fix https://bugzilla.kernel.org/show_bug.cgi?id=202935
So - convince us that it's in fact a "bug" and not a restriction.
I found cause https://github.com/torvalds/linux/blob/master/fs/cifs/cifsfs.c#L1076 not sure is it correct to remove such condition ?
Does the CIFS protocol support copying from a file to another location in the same file? Was it intended to work on *any* filesystem?
Looks like it should be allowed on the same file as long as the source and target file ranges do not overlap See https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/1ee611b... section 2.3.7.2 and 2.3.8 Server returns STATUS_NOT_SUPPORTED if "The source and target destination ranges overlap on the same file." and line 112 and following of smb2_ioctl_filesys.c in Samba code https://git.samba.org/?p=samba.git;a=blob;f=source3/smbd/smb2_ioctl_filesys....
(For that matter, the manpage for the syscall is unclear on whether having both file descriptors open on the same file is OK or not - for bonus ambiguity points, there's exactly zero discussion of what happens if source and destination overlap destructively).
-- Thanks, Steve
participants (3)
-
Steve French -
Valdis Klētnieks -
Саша Ковтуненко