*/
if (cmd == FS_IOC_GETFLAGS) {
val = 0;
- ret = pvfs2_xattr_get_default(file->f_path.dentry,
- "user.pvfs2.meta_hint",
- &val,
- sizeof(val),
- 0);
+ ret = pvfs2_inode_getxattr(file_inode(file),
+ PVFS2_XATTR_NAME_DEFAULT_PREFIX,
+ "user.pvfs2.meta_hint",
+ &val, sizeof(val));
if (ret < 0 && ret != -ENODATA)
return ret;
else if (ret == -ENODATA)
gossip_debug(GOSSIP_FILE_DEBUG,
"pvfs2_ioctl: FS_IOC_SETFLAGS: %llu\n",
(unsigned long long)val);
- ret = pvfs2_xattr_set_default(file->f_path.dentry,
- "user.pvfs2.meta_hint",
- &val,
- sizeof(val),
- 0,
- 0);
+ ret = pvfs2_inode_setxattr(file_inode(file),
+ PVFS2_XATTR_NAME_DEFAULT_PREFIX,
+ "user.pvfs2.meta_hint",
+ &val, sizeof(val), 0);
}
return ret;
extern struct posix_acl *pvfs2_get_acl(struct inode *inode, int type);
extern int pvfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type);
-int pvfs2_xattr_set_default(struct dentry *dentry,
- const char *name,
- const void *buffer,
- size_t size,
- int flags,
- int handler_flags);
-
-int pvfs2_xattr_get_default(struct dentry *dentry,
- const char *name,
- void *buffer,
- size_t size,
- int handler_flags);
-
/*
* Redefine xtvec structure so that we could move helper functions out of
* the define
return ret;
}
-int pvfs2_xattr_set_default(struct dentry *dentry,
- const char *name,
- const void *buffer,
- size_t size,
- int flags,
- int handler_flags)
+static int pvfs2_xattr_set_default(const struct xattr_handler *handler,
+ struct dentry *dentry,
+ const char *name,
+ const void *buffer,
+ size_t size,
+ int flags)
{
return pvfs2_inode_setxattr(dentry->d_inode,
PVFS2_XATTR_NAME_DEFAULT_PREFIX,
flags);
}
-int pvfs2_xattr_get_default(struct dentry *dentry,
- const char *name,
- void *buffer,
- size_t size,
- int handler_flags)
+static int pvfs2_xattr_get_default(const struct xattr_handler *handler,
+ struct dentry *dentry,
+ const char *name,
+ void *buffer,
+ size_t size)
{
return pvfs2_inode_getxattr(dentry->d_inode,
PVFS2_XATTR_NAME_DEFAULT_PREFIX,
}
-static int pvfs2_xattr_set_trusted(struct dentry *dentry,
- const char *name,
- const void *buffer,
- size_t size,
- int flags,
- int handler_flags)
+static int pvfs2_xattr_set_trusted(const struct xattr_handler *handler,
+ struct dentry *dentry,
+ const char *name,
+ const void *buffer,
+ size_t size,
+ int flags)
{
return pvfs2_inode_setxattr(dentry->d_inode,
PVFS2_XATTR_NAME_TRUSTED_PREFIX,
flags);
}
-static int pvfs2_xattr_get_trusted(struct dentry *dentry,
- const char *name,
- void *buffer,
- size_t size,
- int handler_flags)
+static int pvfs2_xattr_get_trusted(const struct xattr_handler *handler,
+ struct dentry *dentry,
+ const char *name,
+ void *buffer,
+ size_t size)
{
return pvfs2_inode_getxattr(dentry->d_inode,
PVFS2_XATTR_NAME_TRUSTED_PREFIX,