From: Alex Elder <elder@dreamhost.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 3/6] ceph: drop "_cb" from name of struct ceph_vxattr_cb
Date: Tue, 28 Feb 2012 19:21:47 -0800 [thread overview]
Message-ID: <4F4D99CB.9040208@dreamhost.com> (raw)
In-Reply-To: <4F4D98D5.1010506@dreamhost.com>
A struct ceph_vxattr_cb does not represent a callback at all, but
rather a virtual extended attribute itself. Drop the "_cb" suffix
from its name to reflect that.
Signed-off-by: Alex Elder <elder@dreamhost.com>
---
fs/ceph/xattr.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 9ef0134..3e0ef77 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -24,7 +24,7 @@ static bool ceph_is_valid_xattr(const char *name)
* These define virtual xattrs exposing the recursive directory
* statistics and layout metadata.
*/
-struct ceph_vxattr_cb {
+struct ceph_vxattr {
char *name;
size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val,
size_t size);
@@ -91,7 +91,7 @@ static size_t ceph_vxattrcb_rctime(struct
ceph_inode_info *ci, char *val,
.readonly = true, \
}
-static struct ceph_vxattr_cb ceph_dir_vxattrs[] = {
+static struct ceph_vxattr ceph_dir_vxattrs[] = {
XATTR_NAME_CEPH(dir, entries),
XATTR_NAME_CEPH(dir, files),
XATTR_NAME_CEPH(dir, subdirs),
@@ -122,7 +122,7 @@ static size_t ceph_vxattrcb_layout(struct
ceph_inode_info *ci, char *val,
return ret;
}
-static struct ceph_vxattr_cb ceph_file_vxattrs[] = {
+static struct ceph_vxattr ceph_file_vxattrs[] = {
XATTR_NAME_CEPH(file, layout),
/* The following extended attribute name is deprecated */
{
@@ -133,7 +133,7 @@ static struct ceph_vxattr_cb ceph_file_vxattrs[] = {
{ 0 } /* Required table terminator */
};
-static struct ceph_vxattr_cb *ceph_inode_vxattrs(struct inode *inode)
+static struct ceph_vxattr *ceph_inode_vxattrs(struct inode *inode)
{
if (S_ISDIR(inode->i_mode))
return ceph_dir_vxattrs;
@@ -142,10 +142,10 @@ static struct ceph_vxattr_cb
*ceph_inode_vxattrs(struct inode *inode)
return NULL;
}
-static struct ceph_vxattr_cb *ceph_match_vxattr(struct inode *inode,
+static struct ceph_vxattr *ceph_match_vxattr(struct inode *inode,
const char *name)
{
- struct ceph_vxattr_cb *vxattr = ceph_inode_vxattrs(inode);
+ struct ceph_vxattr *vxattr = ceph_inode_vxattrs(inode);
if (vxattr)
while (vxattr->name) {
@@ -524,7 +524,7 @@ ssize_t ceph_getxattr(struct dentry *dentry, const
char *name, void *value,
struct ceph_inode_info *ci = ceph_inode(inode);
int err;
struct ceph_inode_xattr *xattr;
- struct ceph_vxattr_cb *vxattr = NULL;
+ struct ceph_vxattr *vxattr = NULL;
if (!ceph_is_valid_xattr(name))
return -ENODATA;
@@ -586,7 +586,7 @@ ssize_t ceph_listxattr(struct dentry *dentry, char
*names, size_t size)
{
struct inode *inode = dentry->d_inode;
struct ceph_inode_info *ci = ceph_inode(inode);
- struct ceph_vxattr_cb *vxattrs = ceph_inode_vxattrs(inode);
+ struct ceph_vxattr *vxattrs = ceph_inode_vxattrs(inode);
u32 vir_namelen = 0;
u32 namelen;
int err;
@@ -716,7 +716,7 @@ int ceph_setxattr(struct dentry *dentry, const char
*name,
const void *value, size_t size, int flags)
{
struct inode *inode = dentry->d_inode;
- struct ceph_vxattr_cb *vxattr;
+ struct ceph_vxattr *vxattr;
struct ceph_inode_info *ci = ceph_inode(inode);
int err;
int name_len = strlen(name);
@@ -829,7 +829,7 @@ static int ceph_send_removexattr(struct dentry
*dentry, const char *name)
int ceph_removexattr(struct dentry *dentry, const char *name)
{
struct inode *inode = dentry->d_inode;
- struct ceph_vxattr_cb *vxattr;
+ struct ceph_vxattr *vxattr;
struct ceph_inode_info *ci = ceph_inode(inode);
int issued;
int err;
--
1.7.5.4
next prev parent reply other threads:[~2012-02-29 3:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 3:17 [PATCH 0/6] ceph: virtual extended attribute cleanup Alex Elder
2012-02-29 3:21 ` [PATCH 1/6] ceph: use a symbolic name for "ceph." extended attribute namespace Alex Elder
2012-02-29 3:21 ` [PATCH 2/6] ceph: use macros to normalize vxattr table definitions Alex Elder
2012-02-29 3:21 ` Alex Elder [this message]
2012-02-29 3:21 ` [PATCH 4/6] ceph: encode type in vxattr callback routines Alex Elder
2012-02-29 3:21 ` [PATCH 5/6] ceph: avoid repeatedly computing the size of constant vxattr names Alex Elder
2012-02-29 4:47 ` Yehuda Sadeh Weinraub
2012-02-29 5:19 ` Alex Elder
2012-02-29 3:21 ` [PATCH 6/6] ceph: make ceph_setxattr() and ceph_removexattr() more alike Alex Elder
2012-03-02 19:35 ` Sage Weil
2012-03-03 4:17 ` Alex Elder
2012-02-29 4:20 ` [PATCH 0/6] ceph: virtual extended attribute cleanup Christoph Hellwig
2012-02-29 5:15 ` Alex Elder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F4D99CB.9040208@dreamhost.com \
--to=elder@dreamhost.com \
--cc=ceph-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.