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 over 7 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 over 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit ff1e230c4ffc3fa5fc7a7da2d199d0362ed36068 Author: jilinxpd <firstname.lastname@example.org> Date: 2018-03-04T01:58:30.000Z 2552 smbfs: add support for NFS-like remove Portions contributed by: Gordon Ross <email@example.com> Reviewed by: Yuri Pankov <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Reviewed by: C Fraire <firstname.lastname@example.org> Approved by: Richard Lowe <email@example.com>