[PATCH 1/1] Fix tracking of open files so that oplock-breaks will
propagate
Amin Azez
azez at ufomechanic.net
Wed Nov 28 11:05:10 GMT 2007
[Please excuse this being the 3rd time I send this patch; the last time it had
a fragment missing and wouldn't compile. Now I'm getting the hang of git and
this patch has all the bits and has just compiled]
vfs_cifs has oplock-break propagation in oplock_handler, but it doesn't work
opened files aren't actually added to the list at cvfs_private->files
This patch adds tracking of opened files.
Loose ends:
I guess there are implications for the test suite too, as far as oplock
tests, and tracking of open files? And closing non-existent files, I
guess file-close has been failing too (not finding the f).
Also, does cvfs_exit need to update this file list with closures?
We may want to review the DLIST_REMOVE use in cvfs_close in this patch,
I'm not sure if I should do it in the async callback instead of before.
I also don't know who should be free-ing the f and it's h, I suspect
they should be free'd here.
I haven't yet tracked down the ntvfs_handle creator for vfs_cifs, but a
cursory look suggests that the h is owned by the f, so free-ing the f
may be all that is required?
Maybe we also need to track created files as well as open files?
Signed-off-by: Amin Azez <azez at ufomechanic.net>
---
source/ntvfs/cifs/vfs_cifs.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: edcc78a79bcfc673a0e8d5a0e8e217029680b90e.diff
Type: text/x-patch
Size: 2065 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20071128/e3edd35c/edcc78a79bcfc673a0e8d5a0e8e217029680b90e.bin
More information about the samba-technical
mailing list