Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1457648
| From | Miklos Szeredi <miklos@szeredi.hu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ovl: whiteout of lower dir should't dispaly in merge dir. |
| Date | 2016-08-08 11:30 +0200 |
| Message-ID | <s3P2G-7YV-39@gated-at.bofh.it> (permalink) |
| References | <s3OSZ-7Ux-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 8, 2016 at 11:18 AM, <zhangaihua1@huawei.com> wrote:
> From: Aihua Zhang <zhangaihua1@huawei.com>
>
> mount -t overlay overlay -olowerdir=/lower,upperdir=/upper,workdir=/workdir /merge
> ls /lower/test_dir
> whiteout
>
> ls /merge/test_dir
> whiteout ------should't display here
>
> this patch fixed it.
Your patch makes the performance of readdir() for the common case
worse for no good reason. There's no way a whiteout can end up on the
lowest layer, so there's no point in trying to filter one out.
NACK.
Thanks,
Miklos
>
> Signed-off-by: Aihua Zhang <zhangaihua1@huawei.com>
> ---
> fs/overlayfs/readdir.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
> index cf37fc7..21cd5a4 100644
> --- a/fs/overlayfs/readdir.c
> +++ b/fs/overlayfs/readdir.c
> @@ -362,7 +362,7 @@ static int ovl_iterate(struct file *file, struct dir_context *ctx)
> if (!ctx->pos)
> ovl_dir_reset(file);
>
> - if (od->is_real)
> + if ((od->is_real) && (od->is_upper))
> return iterate_dir(od->realfile, ctx);
>
> if (!od->cache) {
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ovl: whiteout of lower dir should't dispaly in merge dir. <zhangaihua1@huawei.com> - 2016-08-08 11:20 +0200 Re: [PATCH] ovl: whiteout of lower dir should't dispaly in merge dir. Miklos Szeredi <miklos@szeredi.hu> - 2016-08-08 11:30 +0200
csiph-web