Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
xattr.h File Reference

Go to the source code of this file.

Data Structures

struct  gfs2_ea_request
 
struct  gfs2_ea_location
 

Macros

#define GFS2_EA_REC_LEN(ea)   be32_to_cpu((ea)->ea_rec_len)
 
#define GFS2_EA_DATA_LEN(ea)   be32_to_cpu((ea)->ea_data_len)
 
#define GFS2_EA_SIZE(ea)
 
#define GFS2_EA_IS_STUFFED(ea)   (!(ea)->ea_num_ptrs)
 
#define GFS2_EA_IS_LAST(ea)   ((ea)->ea_flags & GFS2_EAFLAG_LAST)
 
#define GFS2_EAREQ_SIZE_STUFFED(er)   ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + (er)->er_data_len, 8)
 
#define GFS2_EA2NAME(ea)   ((char *)((struct gfs2_ea_header *)(ea) + 1))
 
#define GFS2_EA2DATA(ea)   (GFS2_EA2NAME(ea) + (ea)->ea_name_len)
 
#define GFS2_EA2DATAPTRS(ea)   ((__be64 *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8)))
 
#define GFS2_EA2NEXT(ea)   ((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea)))
 
#define GFS2_EA_BH2FIRST(bh)   ((struct gfs2_ea_header *)((bh)->b_data + sizeof(struct gfs2_meta_header)))
 

Functions

int __gfs2_xattr_set (struct inode *inode, const char *name, const void *value, size_t size, int flags, int type)
 
ssize_t gfs2_listxattr (struct dentry *dentry, char *buffer, size_t size)
 
int gfs2_ea_dealloc (struct gfs2_inode *ip)
 
int gfs2_xattr_acl_get (struct gfs2_inode *ip, const char *name, char **data)
 
int gfs2_xattr_acl_chmod (struct gfs2_inode *ip, struct iattr *attr, char *data)
 

Macro Definition Documentation

#define GFS2_EA2DATA (   ea)    (GFS2_EA2NAME(ea) + (ea)->ea_name_len)

Definition at line 31 of file xattr.h.

#define GFS2_EA2DATAPTRS (   ea)    ((__be64 *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8)))

Definition at line 33 of file xattr.h.

#define GFS2_EA2NAME (   ea)    ((char *)((struct gfs2_ea_header *)(ea) + 1))

Definition at line 30 of file xattr.h.

#define GFS2_EA2NEXT (   ea)    ((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea)))

Definition at line 36 of file xattr.h.

#define GFS2_EA_BH2FIRST (   bh)    ((struct gfs2_ea_header *)((bh)->b_data + sizeof(struct gfs2_meta_header)))

Definition at line 39 of file xattr.h.

#define GFS2_EA_DATA_LEN (   ea)    be32_to_cpu((ea)->ea_data_len)

Definition at line 17 of file xattr.h.

#define GFS2_EA_IS_LAST (   ea)    ((ea)->ea_flags & GFS2_EAFLAG_LAST)

Definition at line 25 of file xattr.h.

#define GFS2_EA_IS_STUFFED (   ea)    (!(ea)->ea_num_ptrs)

Definition at line 24 of file xattr.h.

#define GFS2_EA_REC_LEN (   ea)    be32_to_cpu((ea)->ea_rec_len)

Definition at line 16 of file xattr.h.

#define GFS2_EA_SIZE (   ea)
Value:
ALIGN(sizeof(struct gfs2_ea_header) + (ea)->ea_name_len + \
(sizeof(__be64) * (ea)->ea_num_ptrs)), 8)

Definition at line 19 of file xattr.h.

#define GFS2_EAREQ_SIZE_STUFFED (   er)    ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + (er)->er_data_len, 8)

Definition at line 27 of file xattr.h.

Function Documentation

int __gfs2_xattr_set ( struct inode inode,
const char name,
const void value,
size_t  size,
int  flags,
int  type 
)

Definition at line 1173 of file xattr.c.

int gfs2_ea_dealloc ( struct gfs2_inode ip)

gfs2_ea_dealloc - deallocate the extended attribute fork : the inode

Returns: errno

Definition at line 1456 of file xattr.c.

ssize_t gfs2_listxattr ( struct dentry dentry,
char buffer,
size_t  size 
)

gfs2_listxattr - List gfs2 extended attributes : The dentry whose inode we are interested in : The buffer to write the results : The size of the buffer

Returns: actual size of data on success, -errno on error

Definition at line 420 of file xattr.c.

int gfs2_xattr_acl_chmod ( struct gfs2_inode ip,
struct iattr attr,
char data 
)

Definition at line 1254 of file xattr.c.

int gfs2_xattr_acl_get ( struct gfs2_inode ip,
const char name,
char **  data 
)

Definition at line 544 of file xattr.c.