smbfs: add support for NFS-like remove.
Hi, I added support for NFS-like vop_remove in smbfs.
Currently smbfs doesn't support deleting an open file, nor renaming another file to an open file, so I reference the code of NFS and implement NFS-like vop_remove/vop_rename in smbfs.
The basic process is:
when remove an open file, just rename it to a tmpname, others can continue use it, when the last reference closed, remove it then.
Updated by jilin xpd almost 10 years ago
I have updated the implementation of NFS-like remove in smbfs.
the basic work flow is similar, except that:
1. use SMB_TRANS2_SET_FILE_INFORMATION with SMB_SFILEINFO_RENAME_INFORMATION to send a rename request, instead of SMB_COM_RENAME.
2. use SMB_TRANS2_SET_FILE_INFORMATION with SMB_SFILEINFO_DISPOSITION_INFORMATION to send a delete request, instead of SMB_COM_DELETE.
3. add name cache prune before remove a file.
here is the webrev:
Updated by Electric Monk almost 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit ff1e230c4ffc3fa5fc7a7da2d199d0362ed36068 Author: jilinxpd <email@example.com> Date: 2018-03-04T01:58:30.000Z 2552 smbfs: add support for NFS-like remove Portions contributed by: Gordon Ross <firstname.lastname@example.org> Reviewed by: Yuri Pankov <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: C Fraire <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>