source4/torture/util_writetime.c
[metze/samba/wip.git] / durable.txt
1
2 - cleanup/add missing stuff to struct smbXsrv_open*
3   - create_guid, application_guid..., file_name
4     desired_access, granted_access, share_mode
5
6 - replace get_gen_count() by smbXsrv_open_hash()
7   smbXsrv_open_hash() should calculate the jenkins hash
8   over global->open_persistent_id global->open_volatile_id
9   and global->open_time
10   - in long run we should replace fsp->fh->gen_id with a dynamic
11     blob
12
13 - add NTSTATUS SMB_VFS_DURABLE_COOKIE(fsp, mem_ctx, &cookie_blob);
14   vfs_default => NT_STATUS_NOT_IMPLEMENTED
15   vfs_simple_durable => blob = data_blob(fsp->file_id + fsp->fh->gen_id)
16
17 - add NTSTATUS SMB_VFS_DURABLE_REOPEN(fsp, cookie_blob);
18   vfs_default => NT_STATUS_NOT_SUPPORTED
19   vfs_simple_durable => what we have currently...
20
21 - or three functions:
22    // called at open when durable is requested:
23    NTSTATUS SMB_VFS_DURABLE_COOKIE(fsp, mem_ctx, &cookie_blob);
24    // maybe pass persistent or resilient...
25    NTSTATUS SMB_VFS_DURABLE_COOKIE(fsp, in_flags, mem_ctx, &cookie_blob, &out_flags);
26    // called at disconnect:
27    NTSTATUS SMB_VFS_DURABLE_DISCONNECT(fsp, mem_ctx, old_cookie_blob, &new_cookie_blob);
28    // called at durable reconnect:
29    NTSTATUS SMB_VFS_DURABLE_RECONNECT(fsp, cookie_blob);
30
31 - remove file_find_fd()
32   - in oplocks_linux use a global linked list of
33     struct linux_oplock_fd_mapping {
34            struct linux_oplock_fd_mapping *prev, *next;
35            int fd;
36            struct files_struct *fsp;
37     };
38   - in smb_Dir_destructor() -- I don't know yet...
39