diff options
author | Tim Prouty <tprouty@samba.org> | 2009-02-23 14:51:17 -0800 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-02-25 13:57:11 -0800 |
commit | 01493737c88c0056ca3da5faf43b7bc9b9a2fbcb (patch) | |
tree | b4ccf1596f1537f5c9646eb327c143ad0222b6f6 /source3/modules/onefs_system.c | |
parent | 76ca297ecfd1086b38487ac8f53a8392a4a38ad6 (diff) | |
download | samba-01493737c88c0056ca3da5faf43b7bc9b9a2fbcb.tar.gz samba-01493737c88c0056ca3da5faf43b7bc9b9a2fbcb.tar.xz samba-01493737c88c0056ca3da5faf43b7bc9b9a2fbcb.zip |
s3 OneFS: Add .snapshot directory configuration handling
Diffstat (limited to 'source3/modules/onefs_system.c')
-rw-r--r-- | source3/modules/onefs_system.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/source3/modules/onefs_system.c b/source3/modules/onefs_system.c index 518a398154..43ebed8d44 100644 --- a/source3/modules/onefs_system.c +++ b/source3/modules/onefs_system.c @@ -656,3 +656,53 @@ out: return ret; } + +/** + * Set the per-process encoding, ignoring errors. + */ +void onefs_sys_config_enc(void) +{ + int ret; + + ret = enc_set_proc(ENC_UTF8); + if (ret) { + DEBUG(0, ("Setting process encoding failed: %s", + strerror(errno))); + } +} + +/** + * Set the per-process .snpashot directory options, ignoring errors. + */ +void onefs_sys_config_snap_opt(struct onefs_vfs_global_config *global_config) +{ + struct ifs_dotsnap_options dso; + int ret; + + dso.per_proc = 1; + dso.sub_accessible = global_config->dot_snap_child_accessible; + dso.sub_visible = global_config->dot_snap_child_visible; + dso.root_accessible = global_config->dot_snap_root_accessible; + dso.root_visible = global_config->dot_snap_root_visible; + + ret = ifs_set_dotsnap_options(&dso); + if (ret) { + DEBUG(0, ("Setting snapshot visibility/accessibility " + "failed: %s", strerror(errno))); + } +} + +/** + * Set the per-process flag saying whether or not to accept ~snapshot + * as an alternative name for .snapshot directories. + */ +void onefs_sys_config_tilde(struct onefs_vfs_global_config *global_config) +{ + int ret; + + ret = ifs_tilde_snapshot(global_config->dot_snap_tilde); + if (ret) { + DEBUG(0, ("Setting snapshot tilde failed: %s", + strerror(errno))); + } +} |