All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v2 1/5] ovl: generalize the lower_layers[] array
Date: Mon, 13 Jan 2020 16:03:49 +0200	[thread overview]
Message-ID: <CAOQ4uxgf_zY5bk9Vzqjh6iRZqPVA63S8aVt-YmQ-4v7CAP3AYw@mail.gmail.com> (raw)
In-Reply-To: <CAJfpegsuNXzS8giOcA=0oKe3Qz9R=50d+9guNSaWvNZxCrksPQ@mail.gmail.com>

On Mon, Jan 13, 2020 at 12:05 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Sun, Dec 22, 2019 at 9:08 AM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > Rename lower_layers[] array to layers[], extend its size by one
> > and initialize layers[0] with upper layer values.
> > Lower layers are now addressed with index 1..numlower.
> > layers[0] is reserved even with lower only overlay.
> >
> > This gets rid of special casing upper layer in ovl_iterate_real().
> >
> > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > ---

> > -                               lower_layer = ovl_layer_lower(dentry);
> > +                               lower_layer = ovl_dentry_layer(dentry);
>
> I find this confusing.   I expected ovl_dentry_layer() to be an
> analogue of ovl_dentry_real(), but it's not: it will return upper
> layer if there's no lower layer, not the other way round.
>
> How about keeping the ovl_layer_lower() helper and open code the new
> behavior at the single point where it would be used?  I can make that
> change if you ACK that I didn't miss anything.

I agree. I noticed this myself and had a mental note to get back to this,
but the mental note got lost.

Thanks,
Amir.

  reply	other threads:[~2020-01-13 14:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-22  8:07 [PATCH v2 0/5] Sort out overlay layers and fs arrays Amir Goldstein
2019-12-22  8:07 ` [PATCH v2 1/5] ovl: generalize the lower_layers[] array Amir Goldstein
2020-01-13 10:05   ` Miklos Szeredi
2020-01-13 14:03     ` Amir Goldstein [this message]
2019-12-22  8:07 ` [PATCH v2 2/5] ovl: simplify ovl_same_sb() helper Amir Goldstein
2020-01-13 11:37   ` Miklos Szeredi
2020-01-13 14:31     ` Amir Goldstein
2020-01-13 14:38       ` Miklos Szeredi
2019-12-22  8:07 ` [PATCH v2 3/5] ovl: generalize the lower_fs[] array Amir Goldstein
2020-01-13 14:30   ` Miklos Szeredi
2020-01-13 14:35     ` Amir Goldstein
2020-01-14 20:58       ` Amir Goldstein
2019-12-22  8:07 ` [PATCH v2 4/5] ovl: fix corner case of conflicting lower layer uuid Amir Goldstein
2019-12-22  8:07 ` [PATCH v2 5/5] ovl: fix corner case of non-constant st_dev;st_ino Amir Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOQ4uxgf_zY5bk9Vzqjh6iRZqPVA63S8aVt-YmQ-4v7CAP3AYw@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.