Re: [PATCH v2 1/5] ovl: generalize the lower_layers[] array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 13, 2020 at 12:05 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Sun, Dec 22, 2019 at 9:08 AM Amir Goldstein <amir73il@xxxxxxxxx> 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@xxxxxxxxx>
> > ---

> > -                               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.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux