Lines Matching refs:inode

168  * and write data.  For any given inode, we should have one or more
172 * Each cap is referenced by the inode's i_caps rbtree and by per-mds
212 struct list_head i_list; // per inode
282 * We cache inode xattrs as an encoded blob until they are first used,
343 * Ceph inode.
346 struct netfs_inode netfs; /* Netfslib context and vfs inode */
390 * is also protected by the inode's i_ceph_lock. Walking s_cap_dirty
401 * holding the i_ceph_lock for this inode.
407 * reduce the tid to 8 bits if we're concerned about inode size. */
448 struct list_head i_unsafe_iops; /* uncommitted mds inode ops */
485 ceph_inode(const struct inode *inode)
487 return container_of(inode, struct ceph_inode_info, netfs.inode);
491 ceph_inode_to_client(const struct inode *inode)
493 return (struct ceph_fs_client *)inode->i_sb->s_fs_info;
509 ceph_vino(const struct inode *inode)
511 return ceph_inode(inode)->i_vino;
524 * Inode numbers in cephfs are 64 bits, but inode->i_ino is 32-bits on
539 static inline u64 ceph_ino(struct inode *inode)
541 return ceph_inode(inode)->i_vino.ino;
544 static inline u64 ceph_snap(struct inode *inode)
546 return ceph_inode(inode)->i_vino.snap;
550 * ceph_present_ino - format an inode number for presentation to userland
551 * @sb: superblock where the inode lives
552 * @ino: inode number to (possibly) convert
566 static inline u64 ceph_present_inode(struct inode *inode)
568 return ceph_present_ino(inode->i_sb, ceph_ino(inode));
571 static inline int ceph_ino_compare(struct inode *inode, void *data)
574 struct ceph_inode_info *ci = ceph_inode(inode);
600 "Attempt to access reserved inode number 0x%llx",
605 static inline struct inode *ceph_find_inode(struct super_block *sb,
612 * NB: The hashval will be run through the fs/inode.c hash function
613 * anyway, so there is no need to squash the inode number down to
621 * Ceph inode.
633 #define CEPH_I_ODIRECT (1 << 11) /* inode in direct I/O mode */
636 #define CEPH_I_SHUTDOWN (1 << 13) /* inode is no longer usable */
641 * Masks of ceph inode work.
650 * We set the ERROR_WRITE bit when we start seeing write errors on an inode
712 static inline void ceph_dir_clear_complete(struct inode *inode)
714 __ceph_dir_clear_complete(ceph_inode(inode));
717 static inline void ceph_dir_clear_ordered(struct inode *inode)
719 __ceph_dir_clear_ordered(ceph_inode(inode));
722 static inline bool ceph_dir_is_complete_ordered(struct inode *inode)
724 bool ret = __ceph_dir_is_complete_ordered(ceph_inode(inode));
915 struct inode *inode;
987 void ceph_change_snap_realm(struct inode *inode, struct ceph_snap_realm *realm);
1015 /* inode.c */
1022 extern struct inode *ceph_alloc_inode(struct super_block *sb);
1023 extern void ceph_evict_inode(struct inode *inode);
1024 extern void ceph_free_inode(struct inode *inode);
1026 struct inode *ceph_new_inode(struct inode *dir, struct dentry *dentry,
1031 extern struct inode *ceph_get_inode(struct super_block *sb,
1033 struct inode *newino);
1034 extern struct inode *ceph_get_snapdir(struct inode *parent);
1035 extern int ceph_fill_file_size(struct inode *inode, int issued,
1037 extern void ceph_fill_file_time(struct inode *inode, int issued,
1041 extern int ceph_fill_inode(struct inode *inode, struct page *locked_page,
1051 extern int ceph_inode_holds_cap(struct inode *inode, int mask);
1053 extern bool ceph_inode_set_size(struct inode *inode, loff_t size);
1054 extern void __ceph_do_pending_vmtruncate(struct inode *inode);
1056 void ceph_queue_inode_work(struct inode *inode, int work_bit);
1058 static inline void ceph_queue_vmtruncate(struct inode *inode)
1060 ceph_queue_inode_work(inode, CEPH_I_WORK_VMTRUNCATE);
1063 static inline void ceph_queue_invalidate(struct inode *inode)
1065 ceph_queue_inode_work(inode, CEPH_I_WORK_INVALIDATE_PAGES);
1068 static inline void ceph_queue_writeback(struct inode *inode)
1070 ceph_queue_inode_work(inode, CEPH_I_WORK_WRITEBACK);
1073 static inline void ceph_queue_check_caps(struct inode *inode)
1075 ceph_queue_inode_work(inode, CEPH_I_WORK_CHECK_CAPS);
1078 static inline void ceph_queue_flush_snaps(struct inode *inode)
1080 ceph_queue_inode_work(inode, CEPH_I_WORK_FLUSH_SNAPS);
1083 extern int ceph_try_to_choose_auth_mds(struct inode *inode, int mask);
1084 extern int __ceph_do_getattr(struct inode *inode, struct page *locked_page,
1086 static inline int ceph_do_getattr(struct inode *inode, int mask, bool force)
1088 return __ceph_do_getattr(inode, NULL, mask, force);
1091 struct inode *inode, int mask);
1097 extern int __ceph_setattr(struct inode *inode, struct iattr *attr,
1104 void ceph_inode_shutdown(struct inode *inode);
1106 static inline bool ceph_inode_is_shutdown(struct inode *inode)
1108 unsigned long flags = READ_ONCE(ceph_inode(inode)->i_ceph_flags);
1109 struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
1116 int __ceph_setxattr(struct inode *, const char *, const void *, size_t, int);
1117 int ceph_do_getvxattr(struct inode *inode, const char *name, void *value, size_t size);
1118 ssize_t __ceph_getxattr(struct inode *, const char *, void *, size_t);
1140 extern bool ceph_security_xattr_deadlock(struct inode *in);
1141 extern bool ceph_security_xattr_wanted(struct inode *in);
1143 static inline bool ceph_security_xattr_deadlock(struct inode *in)
1147 static inline bool ceph_security_xattr_wanted(struct inode *in)
1156 static inline void ceph_security_invalidate_secctx(struct inode *inode)
1158 security_inode_invalidate_secctx(inode);
1166 static inline void ceph_security_invalidate_secctx(struct inode *inode)
1176 struct posix_acl *ceph_get_acl(struct inode *, int, bool);
1179 int ceph_pre_init_acls(struct inode *dir, umode_t *mode,
1181 void ceph_init_inode_acls(struct inode *inode,
1184 static inline void ceph_forget_all_cached_acls(struct inode *inode)
1186 forget_all_cached_acls(inode);
1194 static inline int ceph_pre_init_acls(struct inode *dir, umode_t *mode,
1199 static inline void ceph_init_inode_acls(struct inode *inode,
1203 static inline int ceph_acl_chmod(struct dentry *dentry, struct inode *inode)
1208 static inline void ceph_forget_all_cached_acls(struct inode *inode)
1220 extern void ceph_add_cap(struct inode *inode,
1230 extern int ceph_is_any_caps(struct inode *inode);
1232 extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc);
1254 extern void __ceph_remove_capsnap(struct inode *inode,
1257 extern void ceph_remove_capsnap(struct inode *inode,
1266 extern int ceph_drop_caps_for_unlink(struct inode *inode);
1267 extern int ceph_encode_inode_release(void **p, struct inode *inode,
1270 struct inode *dir,
1273 extern int __ceph_get_caps(struct inode *inode, struct ceph_file_info *fi,
1277 extern int ceph_try_get_caps(struct inode *inode,
1291 extern int ceph_pool_perm_check(struct inode *inode, int need);
1293 int ceph_purge_inode_cap(struct inode *inode, struct ceph_cap *cap, bool *invalidate);
1306 extern int ceph_renew_caps(struct inode *inode, int fmode);
1307 extern int ceph_open(struct inode *inode, struct file *file);
1308 extern int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
1310 extern ssize_t __ceph_sync_read(struct inode *inode, loff_t *ki_pos,
1313 extern int ceph_release(struct inode *inode, struct file *filp);
1314 extern void ceph_fill_inline_data(struct inode *inode, struct page *locked_page,
1325 extern int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry);
1335 extern unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn);
1343 struct inode *ceph_lookup_inode(struct super_block *sb, u64 ino);
1349 extern void ceph_count_locks(struct inode *inode, int *p_num, int *f_num);
1350 extern int ceph_encode_locks_to_buffer(struct inode *inode,
1388 extern void ceph_adjust_quota_realms_count(struct inode *inode, bool inc);
1400 ceph_adjust_quota_realms_count(&ci->netfs.inode, has_quota);
1406 extern bool ceph_quota_is_max_files_exceeded(struct inode *inode);
1407 extern bool ceph_quota_is_same_realm(struct inode *old, struct inode *new);
1408 extern bool ceph_quota_is_max_bytes_exceeded(struct inode *inode,
1410 extern bool ceph_quota_is_max_bytes_approaching(struct inode *inode,