Lines Matching full:origin
67 * A non-dir origin may be disconnected, which is fine, because in ovl_acceptable()
85 * Return -ENODATA for "origin unknown".
96 /* Treat larger version and unknown flags as "origin unknown" */ in ovl_check_fb_len()
100 /* Treat endianness mismatch as "origin unknown" */ in ovl_check_fb_len()
120 /* Zero size value means "copied up but origin unknown" */ in ovl_get_fh()
146 pr_warn_ratelimited("failed to get origin (%i)\n", res); in ovl_get_fh()
149 pr_warn_ratelimited("invalid origin (%*phN)\n", res, fh); in ovl_get_fh()
172 * Treat stale file handle to lower file as "origin unknown". in ovl_decode_real_fh()
345 struct dentry *origin = NULL; in ovl_check_origin_fh() local
357 origin = ovl_decode_real_fh(fh, ofs->layers[i].mnt, in ovl_check_origin_fh()
359 if (origin) in ovl_check_origin_fh()
363 if (!origin) in ovl_check_origin_fh()
365 else if (IS_ERR(origin)) in ovl_check_origin_fh()
366 return PTR_ERR(origin); in ovl_check_origin_fh()
369 inode_wrong_type(d_inode(upperdentry), d_inode(origin)->i_mode)) in ovl_check_origin_fh()
375 dput(origin); in ovl_check_origin_fh()
379 .dentry = origin, in ovl_check_origin_fh()
386 pr_warn_ratelimited("invalid origin (%pd2, ftype=%x, origin ftype=%x).\n", in ovl_check_origin_fh()
388 d_inode(origin)->i_mode & S_IFMT); in ovl_check_origin_fh()
389 dput(origin); in ovl_check_origin_fh()
473 is_upper ? "upper" : "origin", real, in ovl_verify_set_fh()
508 * Verify that an index entry name matches the origin file handle stored in
509 * OVL_XATTR_ORIGIN and that origin file handle can be decoded to lower path.
510 * Return 0 on match, -ESTALE on mismatch or stale origin, < 0 on error.
516 struct ovl_path origin = { }; in ovl_verify_index() local
517 struct ovl_path *stack = &origin; in ovl_verify_index()
545 * of the overlay inode). These entries contain no origin xattr. in ovl_verify_index()
560 * real inode. For non-dir index, we can read the copy up origin xattr in ovl_verify_index()
591 if (ovl_get_nlink(ofs, origin.dentry, index, 0) == 0) in ovl_verify_index()
596 dput(origin.dentry); in ovl_verify_index()
630 * origin inode. The index entry name is the hex representation of the lower
637 * If the index dentry for a copy up origin inode is positive, but points
643 int ovl_get_index_name(struct dentry *origin, struct qstr *name) in ovl_get_index_name() argument
648 fh = ovl_encode_real_fh(origin, false); in ovl_get_index_name()
689 struct dentry *origin, bool verify) in ovl_lookup_index() argument
694 bool is_dir = d_is_dir(origin); in ovl_lookup_index()
697 err = ovl_get_index_name(origin, &name); in ovl_lookup_index()
710 d_inode(origin)->i_ino, name.len, name.name, in ovl_lookup_index()
727 inode_wrong_type(inode, d_inode(origin)->i_mode)) { in ovl_lookup_index()
729 * Index should always be of the same file type as origin in ovl_lookup_index()
732 * unlinked, which means that finding a lower origin on lookup in ovl_lookup_index()
735 pr_warn_ratelimited("bad index found (index=%pd2, ftype=%x, origin ftype=%x).\n", in ovl_lookup_index()
737 d_inode(origin)->i_mode & S_IFMT); in ovl_lookup_index()
741 pr_warn_ratelimited("suspected uncovered redirected dir found (origin=%pd2, index=%pd2).\n", in ovl_lookup_index()
742 origin, index); in ovl_lookup_index()
750 …pr_warn_ratelimited("suspected multiply redirected dir found (upper=%pd2, origin=%pd2, index=%pd2)… in ovl_lookup_index()
751 upper, origin, index); in ovl_lookup_index()
795 /* Fix missing 'origin' xattr */
826 struct dentry *origin = NULL; in ovl_lookup() local
864 * Lookup copy up origin by decoding origin file handle. in ovl_lookup()
866 * because we only need to hold the origin inode in in ovl_lookup()
918 pr_warn_ratelimited("refusing to follow metacopy origin for (%pd2)\n", dentry); in ovl_lookup()
923 * If no origin fh is stored in upper of a merge dir, store fh in ovl_lookup()
936 * lower dir that does not match a stored origin xattr. In any in ovl_lookup()
937 * case, only verified origin is used for index lookup. in ovl_lookup()
939 * For non-dir dentry, if index=on, then ensure origin in ovl_lookup()
953 origin = this; in ovl_lookup()
1001 * using ORIGIN xattr on upper, install it in stack. in ovl_lookup()
1018 origin = origin_path->dentry; in ovl_lookup()
1025 * For the case of upperdentry, we have set origin by now if it in ovl_lookup()
1030 * matches origin, otherwise dir index entries may be inconsistent in ovl_lookup()
1033 * For regular upper, we already set origin if upper had ORIGIN in ovl_lookup()
1037 * For metacopy upper, we set a verified origin already if index in ovl_lookup()
1038 * is enabled and if upper had an ORIGIN xattr. in ovl_lookup()
1042 origin = stack[0].dentry; in ovl_lookup()
1044 if (origin && ovl_indexdir(dentry->d_sb) && in ovl_lookup()
1046 index = ovl_lookup_index(ofs, upperdentry, origin, true); in ovl_lookup()