[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Fri Mar 14 05:52:15 MDT 2014


The branch, master has been updated
       via  1b7f387 docs: Add gpfs:recalls parameter to vfs_gpfs manpage
       via  9debea5 s3:modules/vfs_gpfs add gpfs:recalls option
      from  61b9788 dsdb: Ensure to sort replPropertyMetaData as UNSIGNED, not SIGNED quantities

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1b7f3878b512a1c1e231cfb558f6b74397b2c968
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Mar 13 09:26:44 2014 -0700

    docs: Add gpfs:recalls parameter to vfs_gpfs manpage
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Mar 14 12:49:56 CET 2014 on sn-devel-104

commit 9debea56c8ad95e44355d8ed2a08ef42a8d0237e
Author: Christian Ambach <ambi at samba.org>
Date:   Wed Mar 20 15:16:37 2013 +0100

    s3:modules/vfs_gpfs add gpfs:recalls option
    
    When this option is set to no, an attempt to open an offline file will
    be rejected with access denied.  This helps preventing recall storms
    triggered by careless applications like Finder and Explorer.
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    Reviewed-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/vfs_gpfs.8.xml |   22 ++++++++++++++++++++++
 source3/modules/vfs_gpfs.c       |   13 +++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_gpfs.8.xml b/docs-xml/manpages/vfs_gpfs.8.xml
index 4ba1b25..3fb9896 100644
--- a/docs-xml/manpages/vfs_gpfs.8.xml
+++ b/docs-xml/manpages/vfs_gpfs.8.xml
@@ -138,6 +138,28 @@
 		</varlistentry>
 
 		<varlistentry>
+		<term>gpfs:recalls = [ yes | no ]</term>
+		<listitem>
+		<para> When this option is set to no, an attempt to
+		open an offline file will be rejected with access
+		denied.  This helps preventing recall storms triggered
+		by careless applications like Finder and
+		Explorer.</para>
+
+		<itemizedlist>
+		<listitem><para><command>yes(default)</command> - Open
+		files that are offline. This will recall the files
+		from HSM.</para></listitem>
+		<listitem><para><command>no</command> - Reject access
+		to offline files with access denied. This will prevent
+		recalls of files from HSM. Using this setting also
+		requires gpfs:hsm to be set to yes.</para></listitem>
+		</itemizedlist>
+
+		</listitem>
+		</varlistentry>
+
+		<varlistentry>
 
 		<term>gpfs:getrealfilename = [ yes | no ]</term>
 		<listitem>
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 760d27f..73ab4a4 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -49,6 +49,7 @@ struct gpfs_config_data {
 	bool prealloc;
 	bool acl;
 	bool settimes;
+	bool recalls;
 };
 
 
@@ -1810,6 +1811,8 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
 
 	config->settimes = lp_parm_bool(SNUM(handle->conn), "gpfs",
 					"settimes", true);
+	config->recalls = lp_parm_bool(SNUM(handle->conn), "gpfs",
+				       "recalls", true);
 
 	SMB_VFS_HANDLE_SET_DATA(handle, config,
 				NULL, struct gpfs_config_data,
@@ -2015,6 +2018,16 @@ static int vfs_gpfs_open(struct vfs_handle_struct *handle,
 				struct gpfs_config_data,
 				return -1);
 
+	if (config->hsm && !config->recalls) {
+		if (VALID_STAT(smb_fname->st) &&
+		    (smb_fname->st.vfs_private & GPFS_WINATTR_OFFLINE)) {
+			DEBUG(10, ("Refusing access to offline file %s\n",
+				  fsp_str_dbg(fsp)));
+			errno = EACCES;
+			return -1;
+		}
+	}
+
 	if (config->syncio) {
 		flags |= O_SYNC;
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list