summaryrefslogtreecommitdiffstats
path: root/source3/smbd/durable.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd:smb2: fix durable reconnect: set fsp->fnum from the smbXsrv_open->local_idMichael Adam2014-01-301-0/+1
| | | | | | | Originally, fsp->fnum was left at the INVALID fnum value. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Remove separate oplock_type parameter from set_file_oplockVolker Lendecke2013-10-241-1/+1
| | | | | | | | This avoids the question where it could happen that something else but fsp->oplock_type might be useful as an argument here. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Unify parameters to set_oplock_typeVolker Lendecke2013-10-241-1/+1
| | | | | | | | | | Some lines above we set fsp->oplock_type = e->op_type. I don't see how this might have changed. This change will unify both callers of set_file_oplock. In the next step the second parameter to set_file_oplock will be removed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3:smbd: remove old comment about scavenger timer from ↵Michael Adam2013-06-041-14/+0
| | | | | | | | | | vfs_default_durable_reconnect() scavenger functionality belongs to the smb layer (and is meanwhile implemented there). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove the unused fsp->pending_break_messages arrayVolker Lendecke2013-04-261-4/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Convert vfs_default_durable_reconnect to synthetic_smb_fnameVolker Lendecke2013-04-171-6/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd:durable: remove a TODO comment about write time updatesMichael Adam2012-10-291-2/+0
| | | | | | | | | | This has been done. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Oct 29 20:12:18 CET 2012 on sn-devel-104
* s3:smbd:durable: factor stat checks out into ↵Michael Adam2012-10-251-392/+261
| | | | | | | | | | | | | | vfs_default_durable_reconnect_check_stat() This makes vfs_default_durable_reconnect() simpler to read and it reduces code duplication in the failure case handling. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Oct 25 23:03:13 CEST 2012 on sn-devel-104
* s3:smbd:durable: store stat info for disconnected durables and check at ↵Michael Adam2012-10-191-0/+456
| | | | | | | | | | | | | | | | | | reconnect. At durable reconnect, we check the stat info stored in the cookie against the current stat data from the file we just opened. If any detail differs, we deny the durable reconnect, because in that case it is very likely that someone opened the file while the handle was disconnected, which has to be interpreted as an oplock break. Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Oct 19 18:56:19 CEST 2012 on sn-devel-104
* s3:smbd/durable: remove an extra blank line from vfs_default_durable_reconnect()Michael Adam2012-10-191-1/+0
| | | | | | | Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbd/durable: add write_time specific stuff to vfs_default_durable_cookieStefan Metzmacher2012-10-191-0/+12
| | | | | | | | | | metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Oct 19 17:12:29 CEST 2012 on sn-devel-104
* s3:smbd/durable: update the low level write_time before disconnecting the file.Stefan Metzmacher2012-10-191-0/+19
| | | | | | | | | | | | | | | | | If we close the low level FD, we should better update the write_time if needed. It's not unlikely that the client doesn't reclaim the durable handle, in that case we may not close the after the durable timeout. In such a case we should make sure that we at least update the write time on disconnect, this makes sure backup applications notice that the file was changed. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd/durable: trigger pending write_time updates before disconnecting the ↵Stefan Metzmacher2012-10-191-0/+8
| | | | | | | | | | | | | file We need to call the pending write time update handler immediately. Which means we don't wait exactly 2 seconds before updating the write time after the first write. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smbd:smb2: initialize variable in vfs_default_durable_reconnect()Michael Adam2012-09-221-1/+1
| | | | Found by Ambi's state-of-the-art compiler!
* s3:vfs_default: add basic support for durable handle request and reconnectMichael Adam2012-09-081-0/+569
We only grant durable handles for CIFS/SMB2 only access, that means "kernel oplocks", "kernel share modes" and "posix locking" need to be set to "no". For now we also don't grant durable handles if delete on close is active on the handle. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Volker Lendecke <vl@samba.org>