Lines Matching refs:ofs

182 static inline const char *ovl_xattr(struct ovl_fs *ofs, enum ovl_xattr ox)  in ovl_xattr()  argument
184 return ovl_xattr_table[ox][ofs->config.userxattr]; in ovl_xattr()
199 static inline int ovl_do_notify_change(struct ovl_fs *ofs, in ovl_do_notify_change() argument
203 return notify_change(ovl_upper_mnt_idmap(ofs), upperdentry, attr, NULL); in ovl_do_notify_change()
206 static inline int ovl_do_rmdir(struct ovl_fs *ofs, in ovl_do_rmdir() argument
209 int err = vfs_rmdir(ovl_upper_mnt_idmap(ofs), dir, dentry); in ovl_do_rmdir()
215 static inline int ovl_do_unlink(struct ovl_fs *ofs, struct inode *dir, in ovl_do_unlink() argument
218 int err = vfs_unlink(ovl_upper_mnt_idmap(ofs), dir, dentry, NULL); in ovl_do_unlink()
224 static inline int ovl_do_link(struct ovl_fs *ofs, struct dentry *old_dentry, in ovl_do_link() argument
227 int err = vfs_link(old_dentry, ovl_upper_mnt_idmap(ofs), dir, in ovl_do_link()
234 static inline int ovl_do_create(struct ovl_fs *ofs, in ovl_do_create() argument
238 int err = vfs_create(ovl_upper_mnt_idmap(ofs), dir, dentry, mode, true); in ovl_do_create()
244 static inline int ovl_do_mkdir(struct ovl_fs *ofs, in ovl_do_mkdir() argument
248 int err = vfs_mkdir(ovl_upper_mnt_idmap(ofs), dir, dentry, mode); in ovl_do_mkdir()
253 static inline int ovl_do_mknod(struct ovl_fs *ofs, in ovl_do_mknod() argument
257 int err = vfs_mknod(ovl_upper_mnt_idmap(ofs), dir, dentry, mode, dev); in ovl_do_mknod()
263 static inline int ovl_do_symlink(struct ovl_fs *ofs, in ovl_do_symlink() argument
267 int err = vfs_symlink(ovl_upper_mnt_idmap(ofs), dir, dentry, oldname); in ovl_do_symlink()
289 static inline ssize_t ovl_getxattr_upper(struct ovl_fs *ofs, in ovl_getxattr_upper() argument
296 .mnt = ovl_upper_mnt(ofs), in ovl_getxattr_upper()
299 return ovl_do_getxattr(&upperpath, ovl_xattr(ofs, ox), value, size); in ovl_getxattr_upper()
302 static inline ssize_t ovl_path_getxattr(struct ovl_fs *ofs, in ovl_path_getxattr() argument
307 return ovl_do_getxattr(path, ovl_xattr(ofs, ox), value, size); in ovl_path_getxattr()
310 static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_setxattr() argument
314 int err = vfs_setxattr(ovl_upper_mnt_idmap(ofs), dentry, name, in ovl_do_setxattr()
322 static inline int ovl_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_setxattr() argument
326 return ovl_do_setxattr(ofs, dentry, ovl_xattr(ofs, ox), value, size, 0); in ovl_setxattr()
329 static inline int ovl_do_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_removexattr() argument
332 int err = vfs_removexattr(ovl_upper_mnt_idmap(ofs), dentry, name); in ovl_do_removexattr()
337 static inline int ovl_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_removexattr() argument
340 return ovl_do_removexattr(ofs, dentry, ovl_xattr(ofs, ox)); in ovl_removexattr()
343 static inline int ovl_do_set_acl(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_set_acl() argument
346 return vfs_set_acl(ovl_upper_mnt_idmap(ofs), dentry, acl_name, acl); in ovl_do_set_acl()
349 static inline int ovl_do_remove_acl(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_remove_acl() argument
352 return vfs_remove_acl(ovl_upper_mnt_idmap(ofs), dentry, acl_name); in ovl_do_remove_acl()
355 static inline int ovl_do_rename(struct ovl_fs *ofs, struct inode *olddir, in ovl_do_rename() argument
361 .old_mnt_idmap = ovl_upper_mnt_idmap(ofs), in ovl_do_rename()
364 .new_mnt_idmap = ovl_upper_mnt_idmap(ofs), in ovl_do_rename()
379 static inline int ovl_do_whiteout(struct ovl_fs *ofs, in ovl_do_whiteout() argument
382 int err = vfs_whiteout(ovl_upper_mnt_idmap(ofs), dir, dentry); in ovl_do_whiteout()
387 static inline struct file *ovl_do_tmpfile(struct ovl_fs *ofs, in ovl_do_tmpfile() argument
390 struct path path = { .mnt = ovl_upper_mnt(ofs), .dentry = dentry }; in ovl_do_tmpfile()
391 struct file *file = kernel_tmpfile_open(ovl_upper_mnt_idmap(ofs), &path, in ovl_do_tmpfile()
400 static inline struct dentry *ovl_lookup_upper(struct ovl_fs *ofs, in ovl_lookup_upper() argument
404 return lookup_one(ovl_upper_mnt_idmap(ofs), name, base, len); in ovl_lookup_upper()
479 void ovl_layer_set_xwhiteouts(struct ovl_fs *ofs,
493 bool ovl_path_is_whiteout(struct ovl_fs *ofs, const struct path *path);
498 char ovl_get_dir_xattr_val(struct ovl_fs *ofs, const struct path *path,
500 bool ovl_path_check_origin_xattr(struct ovl_fs *ofs, const struct path *path);
501 bool ovl_path_check_xwhiteout_xattr(struct ovl_fs *ofs, const struct path *path);
502 bool ovl_init_uuid_xattr(struct super_block *sb, struct ovl_fs *ofs,
505 static inline bool ovl_upper_is_whiteout(struct ovl_fs *ofs, in ovl_upper_is_whiteout() argument
510 .mnt = ovl_upper_mnt(ofs), in ovl_upper_is_whiteout()
512 return ovl_path_is_whiteout(ofs, &upperpath); in ovl_upper_is_whiteout()
515 static inline bool ovl_check_origin_xattr(struct ovl_fs *ofs, in ovl_check_origin_xattr() argument
520 .mnt = ovl_upper_mnt(ofs), in ovl_check_origin_xattr()
522 return ovl_path_check_origin_xattr(ofs, &upperpath); in ovl_check_origin_xattr()
525 int ovl_check_setxattr(struct ovl_fs *ofs, struct dentry *upperdentry,
536 int ovl_check_metacopy_xattr(struct ovl_fs *ofs, const struct path *path,
538 int ovl_set_metacopy_xattr(struct ovl_fs *ofs, struct dentry *d,
541 char *ovl_get_redirect_xattr(struct ovl_fs *ofs, const struct path *path, int padding);
543 int ovl_get_verity_xattr(struct ovl_fs *ofs, const struct path *path,
545 int ovl_validate_verity(struct ovl_fs *ofs,
548 int ovl_get_verity_digest(struct ovl_fs *ofs, struct path *src,
550 int ovl_sync_status(struct ovl_fs *ofs);
570 struct ovl_fs *ofs = OVL_FS(sb); in ovl_is_impuredir() local
573 .mnt = ovl_upper_mnt(ofs), in ovl_is_impuredir()
576 return ovl_get_dir_xattr_val(ofs, &upperpath, OVL_XATTR_IMPURE) == 'y'; in ovl_is_impuredir()
579 static inline char ovl_get_opaquedir_val(struct ovl_fs *ofs, in ovl_get_opaquedir_val() argument
582 return ovl_get_dir_xattr_val(ofs, path, OVL_XATTR_OPAQUE); in ovl_get_opaquedir_val()
585 static inline bool ovl_redirect_follow(struct ovl_fs *ofs) in ovl_redirect_follow() argument
587 return ofs->config.redirect_mode != OVL_REDIRECT_NOFOLLOW; in ovl_redirect_follow()
590 static inline bool ovl_redirect_dir(struct ovl_fs *ofs) in ovl_redirect_dir() argument
592 return ofs->config.redirect_mode == OVL_REDIRECT_ON; in ovl_redirect_dir()
595 static inline bool ovl_origin_uuid(struct ovl_fs *ofs) in ovl_origin_uuid() argument
597 return ofs->config.uuid != OVL_UUID_OFF; in ovl_origin_uuid()
600 static inline bool ovl_has_fsid(struct ovl_fs *ofs) in ovl_has_fsid() argument
602 return ofs->config.uuid == OVL_UUID_ON || in ovl_has_fsid()
603 ofs->config.uuid == OVL_UUID_AUTO; in ovl_has_fsid()
611 static inline bool ovl_xino_warn(struct ovl_fs *ofs) in ovl_xino_warn() argument
613 return ofs->config.xino == OVL_XINO_ON; in ovl_xino_warn()
620 static inline bool ovl_allow_offline_changes(struct ovl_fs *ofs) in ovl_allow_offline_changes() argument
622 return (!ofs->config.index && !ofs->config.metacopy && in ovl_allow_offline_changes()
623 !ovl_redirect_dir(ofs) && !ovl_xino_warn(ofs)); in ovl_allow_offline_changes()
627 static inline bool ovl_same_fs(struct ovl_fs *ofs) in ovl_same_fs() argument
629 return ofs->xino_mode == 0; in ovl_same_fs()
633 static inline bool ovl_same_dev(struct ovl_fs *ofs) in ovl_same_dev() argument
635 return ofs->xino_mode >= 0; in ovl_same_dev()
638 static inline unsigned int ovl_xino_bits(struct ovl_fs *ofs) in ovl_xino_bits() argument
640 return ovl_same_dev(ofs) ? ofs->xino_mode : 0; in ovl_xino_bits()
670 struct dentry *ovl_decode_real_fh(struct ovl_fs *ofs, struct ovl_fh *fh,
672 int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
674 int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
677 int ovl_verify_origin_xattr(struct ovl_fs *ofs, struct dentry *dentry,
680 struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index,
682 int ovl_verify_index(struct ovl_fs *ofs, struct dentry *index);
684 int ovl_get_index_name(struct ovl_fs *ofs, struct dentry *origin,
686 struct dentry *ovl_get_index_fh(struct ovl_fs *ofs, struct ovl_fh *fh);
687 struct dentry *ovl_lookup_index(struct ovl_fs *ofs, struct dentry *upper,
696 static inline int ovl_verify_origin_fh(struct ovl_fs *ofs, struct dentry *upper, in ovl_verify_origin_fh() argument
699 return ovl_verify_set_fh(ofs, upper, OVL_XATTR_ORIGIN, fh, false, set); in ovl_verify_origin_fh()
702 static inline int ovl_verify_origin(struct ovl_fs *ofs, struct dentry *upper, in ovl_verify_origin() argument
705 return ovl_verify_origin_xattr(ofs, upper, OVL_XATTR_ORIGIN, origin, in ovl_verify_origin()
709 static inline int ovl_verify_upper(struct ovl_fs *ofs, struct dentry *index, in ovl_verify_upper() argument
712 return ovl_verify_origin_xattr(ofs, index, OVL_XATTR_UPPER, upper, in ovl_verify_upper()
720 void ovl_cleanup_whiteouts(struct ovl_fs *ofs, struct dentry *upper,
725 int ovl_workdir_cleanup(struct ovl_fs *ofs, struct inode *dir,
727 int ovl_indexdir_cleanup(struct ovl_fs *ofs);
744 unsigned int ovl_get_nlink(struct ovl_fs *ofs, struct dentry *lowerdentry,
830 int ovl_cleanup_and_whiteout(struct ovl_fs *ofs, struct inode *dir,
841 int ovl_mkdir_real(struct ovl_fs *ofs, struct inode *dir,
843 struct dentry *ovl_create_real(struct ovl_fs *ofs,
846 int ovl_cleanup(struct ovl_fs *ofs, struct inode *dir, struct dentry *dentry);
847 struct dentry *ovl_lookup_temp(struct ovl_fs *ofs, struct dentry *workdir);
848 struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir,
867 int ovl_set_attr(struct ovl_fs *ofs, struct dentry *upper, struct kstat *stat);
868 struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct inode *realinode,
870 struct ovl_fh *ovl_get_origin_fh(struct ovl_fs *ofs, struct dentry *origin);
871 int ovl_set_origin_fh(struct ovl_fs *ofs, const struct ovl_fh *fh,
882 static inline bool ovl_force_readonly(struct ovl_fs *ofs) in ovl_force_readonly() argument
884 return (!ovl_upper_mnt(ofs) || !ofs->workdir); in ovl_force_readonly()
889 const struct xattr_handler * const *ovl_xattr_handlers(struct ovl_fs *ofs);