hello, i have samba 3.5.4 on a debian (testing) i wrote a vfs-module, which (during the open()) moves a file on another disc in my server and places a symbolic link instead example: /samba/foo.bar becomes /samba/foo.bar -> /other/disc/foo.bar compiling and using from a pc through samba is no problem, except for editing a file, that was just created and not closed yet i guess, the file-descriptor defined in the files_struct is illegal after replacing the original file (as the inode changed) so can i open the moved file and exchange the file-descriptor, or do you have other ideas to solve this? TIA
i think i solved my problem. i change the filename right before calling SMB_VFS_NEXT_OPEN so Samba creates the file where i want it to be. after calling i create the symlink and everything works fine Am 16.09.2010 14:35, schrieb Hachi:> hello, > > i have samba 3.5.4 on a debian (testing) > i wrote a vfs-module, which (during the open()) moves a file on another > disc in my server and places a symbolic link instead > > example: > /samba/foo.bar > becomes > /samba/foo.bar -> /other/disc/foo.bar > > compiling and using from a pc through samba is no problem, except for > editing a file, that was just created and not closed yet > > i guess, the file-descriptor defined in the files_struct is illegal > after replacing the original file (as the inode changed) > so can i open the moved file and exchange the file-descriptor, or do you > have other ideas to solve this? > > TIA >
Hi This sort of question is probably best asked on samba-technical, I think. On 21 September 2010 12:36, Hachi <nutt at geotechnik.rwth-aachen.de> wrote:> i think i solved my problem. > > i change the filename right before calling SMB_VFS_NEXT_OPEN > so Samba creates the file where i want it to be. > after calling i create the symlink and everything works fine > > Am 16.09.2010 14:35, schrieb Hachi: >> >> hello, >> >> i have samba 3.5.4 on a debian (testing) >> i wrote a vfs-module, which (during the open()) moves a file on another >> disc in my server and places a symbolic link instead >> >> example: >> /samba/foo.bar >> becomes >> /samba/foo.bar -> /other/disc/foo.bar >> >> compiling and using from a pc through samba is no problem, except for >> editing a file, that was just created and not closed yet >> >> i guess, the file-descriptor defined in the files_struct is illegal >> after replacing the original file (as the inode changed) >> so can i open the moved file and exchange the file-descriptor, or do you >> have other ideas to solve this? >> >> TIA-- Michael Wood <esiotrot at gmail.com>