Lines Matching full:origin
74 * A non-dir origin may be disconnected, which is fine, because in ovl_acceptable()
92 * Return -ENODATA for "origin unknown".
103 /* Treat larger version and unknown flags as "origin unknown" */ in ovl_check_fb_len()
107 /* Treat endianness mismatch as "origin unknown" */ in ovl_check_fb_len()
127 /* Zero size value means "copied up but origin unknown" */ in ovl_get_fh()
153 pr_warn_ratelimited("failed to get origin (%i)\n", res); in ovl_get_fh()
156 pr_warn_ratelimited("invalid origin (%*phN)\n", res, fh); in ovl_get_fh()
185 * Treat stale file handle to lower file as "origin unknown". in ovl_decode_real_fh()
418 struct dentry *origin = NULL; in ovl_check_origin_fh() local
430 origin = ovl_decode_real_fh(ofs, fh, ofs->layers[i].mnt, in ovl_check_origin_fh()
432 if (origin) in ovl_check_origin_fh()
436 if (!origin) in ovl_check_origin_fh()
438 else if (IS_ERR(origin)) in ovl_check_origin_fh()
439 return PTR_ERR(origin); in ovl_check_origin_fh()
442 inode_wrong_type(d_inode(upperdentry), d_inode(origin)->i_mode)) in ovl_check_origin_fh()
448 dput(origin); in ovl_check_origin_fh()
452 .dentry = origin, in ovl_check_origin_fh()
459 pr_warn_ratelimited("invalid origin (%pd2, ftype=%x, origin ftype=%x).\n", in ovl_check_origin_fh()
461 d_inode(origin)->i_mode & S_IFMT); in ovl_check_origin_fh()
462 dput(origin); in ovl_check_origin_fh()
546 is_upper ? "upper" : "origin", real, in ovl_verify_set_fh()
582 * Verify that an index entry name matches the origin file handle stored in
583 * OVL_XATTR_ORIGIN and that origin file handle can be decoded to lower path.
584 * Return 0 on match, -ESTALE on mismatch or stale origin, < 0 on error.
590 struct ovl_path origin = { }; in ovl_verify_index() local
591 struct ovl_path *stack = &origin; in ovl_verify_index()
619 * of the overlay inode). These entries contain no origin xattr. in ovl_verify_index()
634 * real inode. For non-dir index, we can read the copy up origin xattr in ovl_verify_index()
665 if (ovl_get_nlink(ofs, origin.dentry, index, 0) == 0) in ovl_verify_index()
670 dput(origin.dentry); in ovl_verify_index()
704 * origin inode. The index entry name is the hex representation of the lower
711 * If the index dentry for a copy up origin inode is positive, but points
717 int ovl_get_index_name(struct ovl_fs *ofs, struct dentry *origin, in ovl_get_index_name() argument
723 fh = ovl_encode_real_fh(ofs, origin, false); in ovl_get_index_name()
764 struct dentry *origin, bool verify) in ovl_lookup_index() argument
769 bool is_dir = d_is_dir(origin); in ovl_lookup_index()
772 err = ovl_get_index_name(ofs, origin, &name); in ovl_lookup_index()
786 d_inode(origin)->i_ino, name.len, name.name, in ovl_lookup_index()
803 inode_wrong_type(inode, d_inode(origin)->i_mode)) { in ovl_lookup_index()
805 * Index should always be of the same file type as origin in ovl_lookup_index()
808 * unlinked, which means that finding a lower origin on lookup in ovl_lookup_index()
811 pr_warn_ratelimited("bad index found (index=%pd2, ftype=%x, origin ftype=%x).\n", in ovl_lookup_index()
813 d_inode(origin)->i_mode & S_IFMT); in ovl_lookup_index()
817 pr_warn_ratelimited("suspected uncovered redirected dir found (origin=%pd2, index=%pd2).\n", in ovl_lookup_index()
818 origin, index); in ovl_lookup_index()
826 …pr_warn_ratelimited("suspected multiply redirected dir found (upper=%pd2, origin=%pd2, index=%pd2)… in ovl_lookup_index()
827 upper, origin, index); in ovl_lookup_index()
872 /* Fix missing 'origin' xattr */
1010 struct dentry *origin = NULL; in ovl_lookup() local
1050 * Lookup copy up origin by decoding origin file handle. in ovl_lookup()
1052 * because we only need to hold the origin inode in in ovl_lookup()
1105 pr_warn_ratelimited("refusing to follow metacopy origin for (%pd2)\n", dentry); in ovl_lookup()
1110 * If no origin fh is stored in upper of a merge dir, store fh in ovl_lookup()
1123 * lower dir that does not match a stored origin xattr. In any in ovl_lookup()
1124 * case, only verified origin is used for index lookup. in ovl_lookup()
1126 * For non-dir dentry, if index=on, then ensure origin in ovl_lookup()
1140 origin = this; in ovl_lookup()
1197 * using ORIGIN xattr on upper, install it in stack. in ovl_lookup()
1214 origin = origin_path->dentry; in ovl_lookup()
1221 * For the case of upperdentry, we have set origin by now if it in ovl_lookup()
1226 * matches origin, otherwise dir index entries may be inconsistent in ovl_lookup()
1229 * For regular upper, we already set origin if upper had ORIGIN in ovl_lookup()
1233 * For metacopy upper, we set a verified origin already if index in ovl_lookup()
1234 * is enabled and if upper had an ORIGIN xattr. in ovl_lookup()
1238 origin = stack[0].dentry; in ovl_lookup()
1240 if (origin && ovl_indexdir(dentry->d_sb) && in ovl_lookup()
1242 index = ovl_lookup_index(ofs, upperdentry, origin, true); in ovl_lookup()