Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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