2552 smbfs: add support for NFS-like remove
Review Request #914 — Created Feb. 24, 2018 and submitted
Information | |
---|---|
gwr | |
illumos-gate | |
2552 | |
Reviewers | |
general | |
2552 smbfs: add support for NFS-like remove
This is (mostly) work from Jilin Xpd jilinxpd@gmail.com
done during the 2012 Google Summer of Code program.
I finished it up, did some debug and testing etc.Note that there remain several XXX marks and such in the code after this change.
I've postponed cleanup of those until after the mmap work to avoid making it
harder to merge that (much larger) work.
There are some STC-derived tests for this (to be integrated separately).
Description: |
|
---|
-
-
usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c (Diff revision 2) "we'll always rename the file ... and then set delete-on-close" — but below it seems only an attempt to rename is made.
-
usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c (Diff revision 2) Below it seems as if the rename may fail but the set-delete-on-close may succeed — and "undo everything" will not be done.
-
usr/src/uts/common/fs/smbclnt/smbfs/smbfs_vnops.c (Diff revision 2) If smbfs_smb_t2rename() might fail here, as the first call above might have done, then maybe a SMBVDEBUG() is worthy here too.
Change Summary:
After looking this over myself, there was a minor optimization in the previous code I think should be retained: In delete, we can skip the rename when we don't have the file open. I put that back in. Test results look fine (unchanged). I hope my reviewers are still happy :)
Diff: |
Revision 4 (+315 -205) |
---|