Lines Matching full:layer
36 * Before encoding a non-upper directory file handle from real layer N, we need
39 * "layer N connected" ancestor and verifying that all parents along the way are
40 * "layer N connectable". If an ancestor that is NOT "layer N connectable" is
41 * found, we need to copy up an ancestor, which is "layer N connectable", thus
42 * making that ancestor "layer N connected". For example:
44 * layer 1: /a
45 * layer 2: /a/b/c
47 * The overlay dentry /a is NOT "layer 2 connectable", because if dir /a is
49 * layer 1. The dir /a from layer 2 will never be indexed, so the algorithm (*)
54 * /a/b/c, which is "layer 2 connectable", on encode time. That ancestor is
55 * /a/b. After copy up (and index) of /a/b, it will become "layer 2 connected"
61 * entry /a in the lower layers above layer N and find the indexed dir /a from
62 * layer 1. If that improvement is made, then the check for "layer N connected"
64 * example above, /a will be "layer 2 connectable". However, if layer 2 dir /a
65 * is a target of a layer 1 redirect, then /a will NOT be "layer 2 connectable":
67 * layer 1: /A (redirect = /a)
68 * layer 2: /a/b/c
71 /* Return the lowest layer for encoding a connectable file handle */
76 /* We can get overlay root from root of any layer */ in ovl_connectable_layer()
82 * lower layer in ovl_connectable_layer()
89 return ovl_lowerstack(oe)->layer->idx; in ovl_connectable_layer()
94 * have the same uppermost lower layer as the origin's layer. We may need to
98 * Return the connected origin layer or < 0 on error.
111 origin_layer = ovl_lowerstack(oe)->layer->idx; in ovl_connect_layer()
115 /* Find the topmost origin layer connectable ancestor of @dentry */ in ovl_connect_layer()
125 * If @parent is not origin layer connectable, then copy up in ovl_connect_layer()
126 * @next which is origin layer connectable and we are done. in ovl_connect_layer()
184 /* No upper layer? */ in ovl_check_encode_origin()
197 * Root is never indexed, so if there's an upper layer, encode upper for in ovl_check_encode_origin()
213 * ovl_connect_layer() will try to make origin's layer "connected" by in ovl_check_encode_origin()
313 ovl_lowerstack(oe)->layer = lowerpath->layer; in ovl_obtain_alias()
329 /* Get the upper or lower dentry in stack whose on layer @idx */
340 if (lowerstack[i].layer->idx == idx) in ovl_dentry_real_at()
349 * dentry is @real. If @real is on upper layer, we lookup a child overlay
355 const struct ovl_layer *layer) in ovl_lookup_real_one() argument
372 if (ovl_dentry_real_at(connected, layer->idx) != parent) in ovl_lookup_real_one()
377 * from racing with underlying layer rename. In this case, we don't in ovl_lookup_real_one()
396 } else if (ovl_dentry_real_at(this, layer->idx) != real) { in ovl_lookup_real_one()
408 pr_warn_ratelimited("failed to lookup one by real (%pd2, layer=%d, connected=%pd2, err=%i)\n", in ovl_lookup_real_one()
409 real, layer->idx, connected, err); in ovl_lookup_real_one()
416 const struct ovl_layer *layer);
423 const struct ovl_layer *layer) in ovl_lookup_real_inode() argument
434 inode = ovl_lookup_inode(sb, real, !layer->idx); in ovl_lookup_real_inode()
446 if (!this && layer->idx && ovl_indexdir(sb) && !WARN_ON(!d_is_dir(real))) { in ovl_lookup_real_inode()
461 * ovl_lookup_real() in lower layer may call recursively once to in ovl_lookup_real_inode()
462 * ovl_lookup_real() in upper layer. The first level call walks in ovl_lookup_real_inode()
474 if (ovl_dentry_real_at(this, layer->idx) != real) { in ovl_lookup_real_inode()
488 const struct ovl_layer *layer) in ovl_lookup_real_ancestor() argument
493 if (real == layer->mnt->mnt_root) in ovl_lookup_real_ancestor()
505 ancestor = ovl_lookup_real_inode(sb, next, layer); in ovl_lookup_real_ancestor()
509 if (parent == layer->mnt->mnt_root) { in ovl_lookup_real_ancestor()
515 * If @real has been moved out of the layer root directory, in ovl_lookup_real_ancestor()
536 * If @real is on upper layer, we lookup a child overlay dentry with the same
541 const struct ovl_layer *layer) in ovl_lookup_real() argument
546 connected = ovl_lookup_real_ancestor(sb, real, layer); in ovl_lookup_real()
554 layer->idx); in ovl_lookup_real()
569 * we will not find 'real_connected' and hit the layer in ovl_lookup_real()
575 if (parent == layer->mnt->mnt_root) { in ovl_lookup_real()
582 * If real file has been moved out of the layer root in ovl_lookup_real()
597 this = ovl_lookup_real_one(connected, next, layer); in ovl_lookup_real()
613 layer); in ovl_lookup_real()
632 pr_warn_ratelimited("failed to lookup by real (%pd2, layer=%d, connected=%pd2, err=%i)\n", in ovl_lookup_real()
633 real, layer->idx, connected, err); in ovl_lookup_real()
647 const struct ovl_layer *layer = upper ? &ofs->layers[0] : lowerpath->layer; in ovl_get_dentry() local
665 return ovl_lookup_real(sb, real, layer); in ovl_get_dentry()
741 /* Find origin.dentry again with ovl_acceptable() layer check */ in ovl_lower_fh_to_d()