summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-02-17 18:38:58 -0800
committerTim Prouty <tprouty@samba.org>2009-02-19 21:09:30 -0800
commit53bcd162ee4fd55fc5cc3293596f8733ce636b11 (patch)
tree1a629c1efeff669213a65d3aeb86d86f7a87abaa /source3/modules
parent04a7213eb6a2b776c17a5b56ba3b66e3c3444507 (diff)
downloadsamba-53bcd162ee4fd55fc5cc3293596f8733ce636b11.tar.gz
samba-53bcd162ee4fd55fc5cc3293596f8733ce636b11.tar.bz2
samba-53bcd162ee4fd55fc5cc3293596f8733ce636b11.zip
s3 OneFS: Add file_id_create implementation to take advantage of snapshots
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_onefs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 9667d86dba..522b94399d 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -194,6 +194,22 @@ static uint64_t onefs_get_alloc_size(struct vfs_handle_struct *handle,
return result;
}
+static struct file_id onefs_file_id_create(struct vfs_handle_struct *handle,
+ SMB_STRUCT_STAT *sbuf)
+{
+ struct file_id key;
+
+ /* the ZERO_STRUCT ensures padding doesn't break using the key as a
+ * blob */
+ ZERO_STRUCT(key);
+
+ key.devid = sbuf->st_dev;
+ key.inode = sbuf->st_ino;
+ key.extid = sbuf->st_snapid;
+
+ return key;
+}
+
static int onefs_statvfs(vfs_handle_struct *handle, const char *path,
vfs_statvfs_struct *statbuf)
{
@@ -342,6 +358,8 @@ static vfs_op_tuple onefs_ops[] = {
SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(onefs_chflags), SMB_VFS_OP_CHFLAGS,
SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(onefs_file_id_create), SMB_VFS_OP_FILE_ID_CREATE,
+ SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(onefs_streaminfo), SMB_VFS_OP_STREAMINFO,
SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(onefs_brl_lock_windows), SMB_VFS_OP_BRL_LOCK_WINDOWS,