~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/gfs2/xattr.h

Version: ~ [ linux-5.16-rc3 ] ~ [ linux-5.15.5 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.82 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.162 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.218 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.256 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.291 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.293 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
  4  * Copyright (C) 2004-2006 Red Hat, Inc.  All rights reserved.
  5  */
  6 
  7 #ifndef __EATTR_DOT_H__
  8 #define __EATTR_DOT_H__
  9 
 10 struct gfs2_inode;
 11 struct iattr;
 12 
 13 #define GFS2_EA_REC_LEN(ea) be32_to_cpu((ea)->ea_rec_len)
 14 #define GFS2_EA_DATA_LEN(ea) be32_to_cpu((ea)->ea_data_len)
 15 
 16 #define GFS2_EA_SIZE(ea) \
 17 ALIGN(sizeof(struct gfs2_ea_header) + (ea)->ea_name_len + \
 18       ((GFS2_EA_IS_STUFFED(ea)) ? GFS2_EA_DATA_LEN(ea) : \
 19                                   (sizeof(__be64) * (ea)->ea_num_ptrs)), 8)
 20 
 21 #define GFS2_EA_IS_STUFFED(ea) (!(ea)->ea_num_ptrs)
 22 #define GFS2_EA_IS_LAST(ea) ((ea)->ea_flags & GFS2_EAFLAG_LAST)
 23 
 24 #define GFS2_EAREQ_SIZE_STUFFED(er) \
 25 ALIGN(sizeof(struct gfs2_ea_header) + (er)->er_name_len + (er)->er_data_len, 8)
 26 
 27 #define GFS2_EA2NAME(ea) ((char *)((struct gfs2_ea_header *)(ea) + 1))
 28 #define GFS2_EA2DATA(ea) (GFS2_EA2NAME(ea) + (ea)->ea_name_len)
 29 
 30 #define GFS2_EA2DATAPTRS(ea) \
 31 ((__be64 *)(GFS2_EA2NAME(ea) + ALIGN((ea)->ea_name_len, 8)))
 32 
 33 #define GFS2_EA2NEXT(ea) \
 34 ((struct gfs2_ea_header *)((char *)(ea) + GFS2_EA_REC_LEN(ea)))
 35 
 36 #define GFS2_EA_BH2FIRST(bh) \
 37 ((struct gfs2_ea_header *)((bh)->b_data + sizeof(struct gfs2_meta_header)))
 38 
 39 struct gfs2_ea_request {
 40         const char *er_name;
 41         char *er_data;
 42         unsigned int er_name_len;
 43         unsigned int er_data_len;
 44         unsigned int er_type; /* GFS2_EATYPE_... */
 45 };
 46 
 47 struct gfs2_ea_location {
 48         struct buffer_head *el_bh;
 49         struct gfs2_ea_header *el_ea;
 50         struct gfs2_ea_header *el_prev;
 51 };
 52 
 53 extern int __gfs2_xattr_set(struct inode *inode, const char *name,
 54                             const void *value, size_t size,
 55                             int flags, int type);
 56 extern ssize_t gfs2_listxattr(struct dentry *dentry, char *buffer, size_t size);
 57 extern int gfs2_ea_dealloc(struct gfs2_inode *ip);
 58 
 59 /* Exported to acl.c */
 60 
 61 extern int gfs2_xattr_acl_get(struct gfs2_inode *ip, const char *name, char **data);
 62 
 63 #endif /* __EATTR_DOT_H__ */
 64 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp