Lines Matching refs:ofs

121 static inline const char *ovl_xattr(struct ovl_fs *ofs, enum ovl_xattr ox)  in ovl_xattr()  argument
123 return ovl_xattr_table[ox][ofs->config.userxattr]; in ovl_xattr()
138 static inline int ovl_do_notify_change(struct ovl_fs *ofs, in ovl_do_notify_change() argument
142 return notify_change(ovl_upper_mnt_userns(ofs), upperdentry, attr, NULL); in ovl_do_notify_change()
145 static inline int ovl_do_rmdir(struct ovl_fs *ofs, in ovl_do_rmdir() argument
148 int err = vfs_rmdir(ovl_upper_mnt_userns(ofs), dir, dentry); in ovl_do_rmdir()
154 static inline int ovl_do_unlink(struct ovl_fs *ofs, struct inode *dir, in ovl_do_unlink() argument
157 int err = vfs_unlink(ovl_upper_mnt_userns(ofs), dir, dentry, NULL); in ovl_do_unlink()
163 static inline int ovl_do_link(struct ovl_fs *ofs, struct dentry *old_dentry, in ovl_do_link() argument
166 int err = vfs_link(old_dentry, ovl_upper_mnt_userns(ofs), dir, new_dentry, NULL); in ovl_do_link()
172 static inline int ovl_do_create(struct ovl_fs *ofs, in ovl_do_create() argument
176 int err = vfs_create(ovl_upper_mnt_userns(ofs), dir, dentry, mode, true); in ovl_do_create()
182 static inline int ovl_do_mkdir(struct ovl_fs *ofs, in ovl_do_mkdir() argument
186 int err = vfs_mkdir(ovl_upper_mnt_userns(ofs), dir, dentry, mode); in ovl_do_mkdir()
191 static inline int ovl_do_mknod(struct ovl_fs *ofs, in ovl_do_mknod() argument
195 int err = vfs_mknod(ovl_upper_mnt_userns(ofs), dir, dentry, mode, dev); in ovl_do_mknod()
201 static inline int ovl_do_symlink(struct ovl_fs *ofs, in ovl_do_symlink() argument
205 int err = vfs_symlink(ovl_upper_mnt_userns(ofs), dir, dentry, oldname); in ovl_do_symlink()
227 static inline ssize_t ovl_getxattr_upper(struct ovl_fs *ofs, in ovl_getxattr_upper() argument
234 .mnt = ovl_upper_mnt(ofs), in ovl_getxattr_upper()
237 return ovl_do_getxattr(&upperpath, ovl_xattr(ofs, ox), value, size); in ovl_getxattr_upper()
240 static inline ssize_t ovl_path_getxattr(struct ovl_fs *ofs, in ovl_path_getxattr() argument
245 return ovl_do_getxattr(path, ovl_xattr(ofs, ox), value, size); in ovl_path_getxattr()
248 static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_setxattr() argument
252 int err = vfs_setxattr(ovl_upper_mnt_userns(ofs), dentry, name, in ovl_do_setxattr()
260 static inline int ovl_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_setxattr() argument
264 return ovl_do_setxattr(ofs, dentry, ovl_xattr(ofs, ox), value, size, 0); in ovl_setxattr()
267 static inline int ovl_do_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_removexattr() argument
270 int err = vfs_removexattr(ovl_upper_mnt_userns(ofs), dentry, name); in ovl_do_removexattr()
275 static inline int ovl_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_removexattr() argument
278 return ovl_do_removexattr(ofs, dentry, ovl_xattr(ofs, ox)); in ovl_removexattr()
281 static inline int ovl_do_rename(struct ovl_fs *ofs, struct inode *olddir, in ovl_do_rename() argument
287 .old_mnt_userns = ovl_upper_mnt_userns(ofs), in ovl_do_rename()
290 .new_mnt_userns = ovl_upper_mnt_userns(ofs), in ovl_do_rename()
305 static inline int ovl_do_whiteout(struct ovl_fs *ofs, in ovl_do_whiteout() argument
308 int err = vfs_whiteout(ovl_upper_mnt_userns(ofs), dir, dentry); in ovl_do_whiteout()
313 static inline struct file *ovl_do_tmpfile(struct ovl_fs *ofs, in ovl_do_tmpfile() argument
316 struct path path = { .mnt = ovl_upper_mnt(ofs), .dentry = dentry }; in ovl_do_tmpfile()
317 struct file *file = vfs_tmpfile_open(ovl_upper_mnt_userns(ofs), &path, mode, in ovl_do_tmpfile()
325 static inline struct dentry *ovl_lookup_upper(struct ovl_fs *ofs, in ovl_lookup_upper() argument
329 return lookup_one(ovl_upper_mnt_userns(ofs), name, base, len); in ovl_lookup_upper()
340 static inline bool ovl_allow_offline_changes(struct ovl_fs *ofs) in ovl_allow_offline_changes() argument
347 return (!ofs->config.index && !ofs->config.metacopy && in ovl_allow_offline_changes()
348 !ofs->config.redirect_dir && ofs->config.xino != OVL_XINO_ON); in ovl_allow_offline_changes()
410 bool ovl_path_check_dir_xattr(struct ovl_fs *ofs, const struct path *path,
412 bool ovl_path_check_origin_xattr(struct ovl_fs *ofs, const struct path *path);
414 static inline bool ovl_check_origin_xattr(struct ovl_fs *ofs, in ovl_check_origin_xattr() argument
419 .mnt = ovl_upper_mnt(ofs), in ovl_check_origin_xattr()
421 return ovl_path_check_origin_xattr(ofs, &upperpath); in ovl_check_origin_xattr()
424 int ovl_check_setxattr(struct ovl_fs *ofs, struct dentry *upperdentry,
435 int ovl_check_metacopy_xattr(struct ovl_fs *ofs, const struct path *path);
437 char *ovl_get_redirect_xattr(struct ovl_fs *ofs, const struct path *path, int padding);
438 int ovl_sync_status(struct ovl_fs *ofs);
458 struct ovl_fs *ofs = OVL_FS(sb); in ovl_is_impuredir() local
461 .mnt = ovl_upper_mnt(ofs), in ovl_is_impuredir()
464 return ovl_path_check_dir_xattr(ofs, &upperpath, OVL_XATTR_IMPURE); in ovl_is_impuredir()
521 struct dentry *ovl_decode_real_fh(struct ovl_fs *ofs, struct ovl_fh *fh,
523 int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected,
525 int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
528 struct dentry *ovl_index_upper(struct ovl_fs *ofs, struct dentry *index);
529 int ovl_verify_index(struct ovl_fs *ofs, struct dentry *index);
530 int ovl_get_index_name(struct ovl_fs *ofs, struct dentry *origin,
532 struct dentry *ovl_get_index_fh(struct ovl_fs *ofs, struct ovl_fh *fh);
533 struct dentry *ovl_lookup_index(struct ovl_fs *ofs, struct dentry *upper,
540 static inline int ovl_verify_origin(struct ovl_fs *ofs, struct dentry *upper, in ovl_verify_origin() argument
543 return ovl_verify_set_fh(ofs, upper, OVL_XATTR_ORIGIN, origin, in ovl_verify_origin()
547 static inline int ovl_verify_upper(struct ovl_fs *ofs, struct dentry *index, in ovl_verify_upper() argument
550 return ovl_verify_set_fh(ofs, index, OVL_XATTR_UPPER, upper, true, set); in ovl_verify_upper()
557 void ovl_cleanup_whiteouts(struct ovl_fs *ofs, struct dentry *upper,
562 int ovl_workdir_cleanup(struct ovl_fs *ofs, struct inode *dir,
564 int ovl_indexdir_cleanup(struct ovl_fs *ofs);
581 unsigned int ovl_get_nlink(struct ovl_fs *ofs, struct dentry *lowerdentry,
653 int ovl_cleanup_and_whiteout(struct ovl_fs *ofs, struct inode *dir,
664 int ovl_mkdir_real(struct ovl_fs *ofs, struct inode *dir,
666 struct dentry *ovl_create_real(struct ovl_fs *ofs,
669 int ovl_cleanup(struct ovl_fs *ofs, struct inode *dir, struct dentry *dentry);
670 struct dentry *ovl_lookup_temp(struct ovl_fs *ofs, struct dentry *workdir);
671 struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir,
689 int ovl_set_attr(struct ovl_fs *ofs, struct dentry *upper, struct kstat *stat);
690 struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real,
692 int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,