Project

General

Profile

Actions

Feature #2552

closed

smbfs: add support for NFS-like remove.

Added by jilin xpd about 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cifs - CIFS server and client
Start date:
2012-03-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

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.

code review:
https://github.com/jilinxpd/illumos-gate/commit/f93afd34e374950b47c35dc0afd22106bf6bc067

Actions #1

Updated by jilin xpd about 11 years ago

Hi all,
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:
http://cr.illumos.org/view/0ijh9moi/

Actions #2

Updated by Electric Monk over 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit ff1e230c4ffc3fa5fc7a7da2d199d0362ed36068

commit  ff1e230c4ffc3fa5fc7a7da2d199d0362ed36068
Author: jilinxpd <jilinxpd@gmail.com>
Date:   2018-03-04T01:58:30.000Z

    2552 smbfs: add support for NFS-like remove
    Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF