diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-25 07:18:46 -0700 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-03-02 18:39:21 +0100 |
commit | 73ce3e156e52fdc42e8e16114ed2f436878ced05 (patch) | |
tree | ff8c840215b1b9f6cab6ecadf8afd693a6f82806 /source3 | |
parent | cf7dac6fbccca6667e5ed20b199e80701b8a6bd4 (diff) | |
download | samba-73ce3e156e52fdc42e8e16114ed2f436878ced05.tar.gz samba-73ce3e156e52fdc42e8e16114ed2f436878ced05.tar.bz2 samba-73ce3e156e52fdc42e8e16114ed2f436878ced05.zip |
s3: Announce HSM in the gpfs module
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_gpfs.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index d36cdbe2a9..4ee826b71b 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -34,6 +34,7 @@ struct gpfs_config_data { bool sharemodes; bool leases; + bool hsm; }; @@ -1211,6 +1212,9 @@ int vfs_gpfs_connect(struct vfs_handle_struct *handle, const char *service, config->leases = lp_parm_bool(SNUM(handle->conn), "gpfs", "leases", true); + config->hsm = lp_parm_bool(SNUM(handle->conn), "gpfs", + "hsm", false); + SMB_VFS_HANDLE_SET_DATA(handle, config, NULL, struct syncops_config_data, return -1); @@ -1218,9 +1222,28 @@ int vfs_gpfs_connect(struct vfs_handle_struct *handle, const char *service, return 0; } +static uint32_t vfs_gpfs_capabilities(struct vfs_handle_struct *handle, + enum timestamp_set_resolution *p_ts_res) +{ + struct gpfs_config_data *config; + uint32_t next; + + next = SMB_VFS_NEXT_FS_CAPABILITIES(handle, p_ts_res); + + SMB_VFS_HANDLE_GET_DATA(handle, config, + struct gpfs_config_data, + return next); + + if (config->hsm) { + next |= FILE_SUPPORTS_REMOTE_STORAGE; + } + return next; +} + static struct vfs_fn_pointers vfs_gpfs_fns = { .connect_fn = vfs_gpfs_connect, + .fs_capabilities = vfs_gpfs_capabilities, .kernel_flock = vfs_gpfs_kernel_flock, .linux_setlease = vfs_gpfs_setlease, .get_real_filename = vfs_gpfs_get_real_filename, |