A small patch to expose init_stat_ex_from_stat to get ready for the Ceph userspace client Samba VFS

Richard Sharpe realrichardsharpe at gmail.com
Mon Jun 6 11:57:50 MDT 2011


Hi folks,

attached is a small, hopefully uncontroversial, patch that exposes
int_stat_ex_from_stat to get ready for the Ceph userspace client Samba
VFS that we have been developing. That VFS basically seems to work (in
concert with vfs_xattr and so forth) but I want to do more testing
before pushing anything.

This patch is against v3-5-test from reasonably recently. Is that
acceptable or should I also or instead send one based on v3-6-test or
whatever.

The patch (also attached):

signed-off-by: Richard Sharpe <realrichardsharpe at gmail.com>

diff --git a/source3/lib/system.c b/source3/lib/system.c
index 1ce635f..7c3b4db 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -513,13 +513,13 @@ void update_stat_ex_create_time(struct stat_ex *dst,
 }

 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)
&& defined(HAVE_STAT64)
-static void init_stat_ex_from_stat (struct stat_ex *dst,
-                                   const struct stat64 *src,
-                                   bool fake_dir_create_times)
+void init_stat_ex_from_stat (struct stat_ex *dst,
+                           const struct stat64 *src,
+                           bool fake_dir_create_times)
 #else
-static void init_stat_ex_from_stat (struct stat_ex *dst,
-                                   const struct stat *src,
-                                   bool fake_dir_create_times)
+void init_stat_ex_from_stat (struct stat_ex *dst,
+                           const struct stat *src,
+                           bool fake_dir_create_times)
 #endif
 {
        dst->st_ex_dev = src->st_dev;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 6ff0882..e3dce02 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1006,6 +1006,16 @@ int sys_getnameinfo(const struct sockaddr *psa,
                        int flags);
 int sys_connect(int fd, const struct sockaddr * addr);

+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)
&& defined(HAVE_STAT64)
+void init_stat_ex_from_stat (struct stat_ex *dst,
+                           const struct stat64 *src,
+                           bool fake_dir_create_times);
+#else
+void init_stat_ex_from_stat (struct stat_ex *dst,
+                           const struct stat *src,
+                           bool fake_dir_create_times);
+#endif
+
 /* The following definitions come from lib/system_smbd.c  */

 bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,

-- 
Regards,
Richard Sharpe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-vfs-fix-stat_ex.patch
Type: application/octet-stream
Size: 1644 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110606/20227561/attachment.obj>


More information about the samba-technical mailing list