[SCM] Samba Shared Repository - branch v3-6-test updated

Volker Lendecke vlendec at samba.org
Wed Apr 27 01:24:10 MDT 2011


The branch, v3-6-test has been updated
       via  89e7a97 s3:vfs use gpfs_lib_init
      from  b397f78 WHATSNEW: %i and %I no langer contain IPv4 mapped IPv6 addresses

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 89e7a97b3a9987e6c921b68335b554473f50cde2
Author: Christian Ambach <christian.ambach at de.ibm.com>
Date:   Mon Feb 21 18:25:36 2011 +0100

    s3:vfs use gpfs_lib_init
    
    With newer GPFS releases, libgpfs contains a function
    gpfs_lib_init(). It marks the pseudo-device the lib uses
    as interface to the GPFS kernel module to not be to
    destroyed after each call to GPFS.
    This saves us some microseconds creating and removing the device
    each time we do a call to libgpfs.
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Tue Apr 26 20:52:36 CEST 2011 on sn-devel-104
    (cherry picked from commit 7a4cff842d342d77631912fdcee05521506eec52)

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

Summary of changes:
 source3/modules/gpfs.c     |   18 ++++++++++++++++++
 source3/modules/vfs_gpfs.c |    3 +++
 source3/modules/vfs_gpfs.h |    1 +
 3 files changed, 22 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c
index ef77099..d690199 100644
--- a/source3/modules/gpfs.c
+++ b/source3/modules/gpfs.c
@@ -40,6 +40,7 @@ static int (*gpfs_set_winattrs_path_fn)(char *pathname, int flags, struct gpfs_w
 static int (*gpfs_get_winattrs_path_fn)(char *pathname, struct gpfs_winattr *attrs);
 static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs);
 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
+static int (*gpfs_lib_init_fn)(int flags);
 
 bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask,
 			uint32 share_access)
@@ -189,6 +190,17 @@ int set_gpfs_winattrs(char *pathname,int flags,struct gpfs_winattr *attrs)
         return gpfs_set_winattrs_path_fn(pathname,flags, attrs);
 }
 
+void smbd_gpfs_lib_init()
+{
+	if (gpfs_lib_init_fn) {
+		int rc = gpfs_lib_init_fn(0);
+		DEBUG(10, ("gpfs_lib_init() finished with rc %d "
+			   "and errno %d\n", rc, errno));
+	} else {
+		DEBUG(10, ("libgpfs lacks gpfs_lib_init\n"));
+	}
+}
+
 static bool init_gpfs_function_lib(void *plibhandle_pointer,
 				   const char *libname,
 				   void *pfn_pointer, const char *fn_name)
@@ -251,6 +263,7 @@ void init_gpfs(void)
         init_gpfs_function(&gpfs_set_winattrs_path_fn,"gpfs_set_winattrs_path");
         init_gpfs_function(&gpfs_get_winattrs_fn,"gpfs_get_winattrs");
 	init_gpfs_function(&gpfs_ftruncate_fn, "gpfs_ftruncate");
+        init_gpfs_function(&gpfs_lib_init_fn,"gpfs_lib_init");
 
 	gpfs_getrealfilename = lp_parm_bool(-1, "gpfs", "getrealfilename",
 					    True);
@@ -311,6 +324,11 @@ int get_gpfs_winattrs(char *pathname,struct gpfs_winattr *attrs)
         return -1;
 }
 
+void smbd_gpfs_lib_init()
+{
+	return;
+}
+
 void init_gpfs(void)
 {
 	return;
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index c38d7c2..b8bc1b2 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1232,6 +1232,9 @@ int vfs_gpfs_connect(struct vfs_handle_struct *handle, const char *service,
 			const char *user)
 {
 	struct gpfs_config_data *config;
+
+	smbd_gpfs_lib_init();
+
 	int ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
 
 	if (ret < 0) {
diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h
index 46cfdfe..8a314e1 100644
--- a/source3/modules/vfs_gpfs.h
+++ b/source3/modules/vfs_gpfs.h
@@ -36,3 +36,4 @@ int get_gpfs_winattrs(char * pathname,struct gpfs_winattr *attrs);
 int set_gpfs_winattrs(char * pathname,int flags,struct gpfs_winattr *attrs);
 int smbd_gpfs_ftruncate(int fd, gpfs_off64_t length);
 void init_gpfs(void);
+void smbd_gpfs_lib_init();


-- 
Samba Shared Repository


More information about the samba-cvs mailing list