An updated Samba VFS for Ceph using the libceph user-space interface

Richard Sharpe realrichardsharpe at gmail.com
Tue Aug 23 14:45:18 MDT 2011


On Tue, Aug 23, 2011 at 11:59 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Fri, Aug 19, 2011 at 1:51 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>> Hi,
>>
>> Attached is a slightly cleaned up Ceph VFS patch plus a couple of
>> other misc ones.
>>
>> The clean-ups to the Ceph VFS are:
>>
>> 1. Remove C++ style comments
>> 2. Fix the OpenDir routine to set errno when an error occurs
>> 3. Remove some unused code and other cruft.
>>
>> The code has been tested via Windows 2K03 to ensure that it can create
>> files and folders and that we can view folders. It has also been
>> tested to ensure that reads and writes to files work, with several
>> megabyte plus copies done via smbclient. Other testing continues.
>>
>> I think it is functional at this point.
>>
>> I have added Brian so he can respond with a Signed-Off-By as well.
>>
>> Signed-Off-By: Richard Sharpe <realrichardsharpe at gmail.com>
>
> One problem I can foresee is that if /usr/include/ceph/libceph.h is
> not on the system when the builder runs make the build will fail when
> vfs_ceph.c fails to compile. That would be a pain most people who, I
> imagine, are simply not interested in Ceph.
>
> It would probably be wise to add a test to configure.in for the
> presence of libceph.h and only add the ceph VFS to the list of modules
> to be built if it is.
>
> I guess I can make that change in the next few days and resubmit :-)

This might do the trick:

diff --git a/source3/configure.in b/source3/configure.in
index 8bdf2c8..e9278a9 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6941,7 +6941,14 @@ SMB_MODULE(vfs_scannedonly,
\$(VFS_SCANNEDONLY_OBJ), "bin/scannedonly.$SHLIBEXT", VFS)
 SMB_MODULE(vfs_crossrename, \$(VFS_CROSSRENAME_OBJ),
"bin/crossrename.$SHLIBEXT", VFS)
 SMB_MODULE(vfs_linux_xfs_sgid, \$(VFS_LINUX_XFS_SGID_OBJ),
"bin/linux_xfs_sgid.$SHLIBEXT", VFS)
 SMB_MODULE(vfs_time_audit, \$(VFS_TIME_AUDIT_OBJ),
"bin/time_audit.$SHLIBEXT", VFS)
-SMB_MODULE(vfs_ceph, \$(VFS_CEPH_OBJ), "bin/ceph.$SHLIBEXT", VFS)
+
+################################################
+# Check for libceph.h before forcing the CEPH VFS to build
+AC_CHECK_HEADER(ceph/libceph.h)
+
+if test x"$ac_cv_header_ceph_libceph_h" = x"yes" ; then
+       SMB_MODULE(vfs_ceph, \$(VFS_CEPH_OBJ), "bin/ceph.$SHLIBEXT", VFS)
+fi

 SMB_SUBSYSTEM(VFS,smbd/vfs.o)


-- 
Regards,
Richard Sharpe


More information about the samba-technical mailing list