[PATCH] VFS: convert to using ceph_statx structures and functions, when available

Jeff Layton jlayton at samba.org
Fri Nov 18 12:31:21 UTC 2016


On Thu, 2016-11-17 at 11:50 -0800, Jeremy Allison wrote:
> On Thu, Nov 17, 2016 at 01:13:57PM -0500, Jeff Layton wrote:
> > 
> > Add a configure test for the ceph_statx function, and use that to
> > determine whether to compile in new functions that use it and its
> > variants, or whether to use a the older code that fetches birthtimes
> > from an xattr.
> > 
> > For cephwrap_lstat, we can use ceph_statx with the AT_SYMLINK_NOFOLLOW
> > flag to get the right lookup semantics.
> > 
> > For setting the times via cephwrap_ntimes, We can just use ceph_setattrx
> > and pass them all in at the same time.
> 
> Can you change the DEBUG(10,....)
> calls to DBG_DEBUG(...) please ?
> 
> I'm trying to change all new code submissions
> to the new:
> 
> /*
>  * Debug levels matching RFC 3164
>  */
> #define DBGLVL_ERR       0      /* error conditions */
> #define DBGLVL_WARNING   1      /* warning conditions */
> #define DBGLVL_NOTICE    3      /* normal, but significant, condition */
> #define DBGLVL_INFO      5      /* informational message */
> #define DBGLVL_DEBUG    10      /* debug-level message */
> 
> #define DBG_ERR(...)            DBG_PREFIX(DBGLVL_ERR,          (__VA_ARGS__))
> #define DBG_WARNING(...)        DBG_PREFIX(DBGLVL_WARNING,      (__VA_ARGS__))
> #define DBG_NOTICE(...)         DBG_PREFIX(DBGLVL_NOTICE,       (__VA_ARGS__))
> #define DBG_INFO(...)           DBG_PREFIX(DBGLVL_INFO,         (__VA_ARGS__))
> #define DBG_DEBUG(...)          DBG_PREFIX(DBGLVL_DEBUG,        (__VA_ARGS__))
> 
> macros, and eventually retire DEBUG(x,..).
> 

Sure. This patch should apply on top of the one I sent yesterday, and
converts all of the DEBUG() calls in vfs_ceph.c to the new macros.

Note that some of them passed in a level of 2 when I think they really
should have been at 10, so I changed them to be DBG_DEBUG messages
instead.

Look ok?
-- 
Jeff Layton <jlayton at samba.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vfs-ceph-convert-to-new-DBG_-macros.patch
Type: text/x-patch
Size: 35473 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20161118/deafb7a9/0001-vfs-ceph-convert-to-new-DBG_-macros.bin>


More information about the samba-technical mailing list