Sorry for my poor english. In smbd/vfs-wrap.c/vfswrap_rename(), if rename(2) return EXDEV error,then call copy_reg() to emulate rename accross different device by copy and unlink. --------------------------------------------------------------------------- int vfswrap_rename(vfs_handle_struct *handle, connection_struct *conn, const char *old, const char *new) { int result; START_PROFILE(syscall_rename); result = rename(old, new); if (errno == EXDEV) { /* Rename across filesystems needed. */ result = copy_reg(old, new); } END_PROFILE(syscall_rename); return result; } --------------------------------------------------------------------------- But, if the file is very large(ex. 2GB), copy_reg() is a long time in copying file by tranfer_file(). So, client PC is session-timeout. In case of Windows Server with NTFS junction-point mounted volume, rename (SMBmv) request accross different volumes is failed and returned error is NTStatus STATUS_NOT_SAME_DEVICE(0xc00000d4) or DosStatus ERRdiffdevice (0x0011). When windows client receive the error, windows client emulate rename by open both(new and old) files, and copy data from old file to new one ,and unlink old file,and adjust timestamp. So, I think if rename(2) in vfswrap_rename() return EXDEV, should just return EXDEV without copy_reg() as below. --------------------------------------------------------------------------- int vfswrap_rename(vfs_handle_struct *handle, connection_struct *conn, const char *old, const char *new) { int result; START_PROFILE(syscall_rename); result = rename(old, new); #if 0 if (errno == EXDEV) { /* Rename across filesystems needed. */ result = copy_reg(old, new); } #endif END_PROFILE(syscall_rename); return result; } --------------------------------------------------------------------------- Because libsmb/errormap.c/unix_dos_nt_errmap have below definition. error EXDEV is translated to NT_STATUS_NOT_SAME_DEVICE or ERRdiffdevice. ------------------------------------------------------------------------ #ifdef EXDEV { EXDEV, ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE }, #endif ------------------------------------------------------------------------
database cleanup
please reopen if the bug still exists in a current release.