* Issues with OvelayFS + 9P FS
@ 2017-11-29 0:32 Miguel Bernal Marin
2017-11-29 4:19 ` Amir Goldstein
0 siblings, 1 reply; 2+ messages in thread
From: Miguel Bernal Marin @ 2017-11-29 0:32 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-unionfs, linux-kernel, Miklos Szeredi
Hi Miklos,
I've seen issues when I try to use a Qemu/KVM + 9P and a Overlay FS.
The issue started to show from v4.14 and I bisected the guilty commit to
4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
The issue is showed when ovl_iterate_real(file, ctx) is called, if I
commented out that *if* block to just load iterate_dir(od->realfile, ctx),
everything works fine.
To reproduce the issue just create a OverlayFS and use the merged
directory as a 9P share directory to the VM.
You will see that the upper ONLY files/directories are seen good, but
when you try to list the lower and merged files the process couldn't
finish and ends with a "ls: Memory exhausted"
I've tried to fix it but my knowledge is not enough on FS.
I've done small script to reproduce the issue, they are at
https://github.com/miguelinux/overlay-9p-issue
--
Regards,
Miguel Bernal Marin Open Source Technology Center
https://clearlinux.org Intel Corporation
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Issues with OvelayFS + 9P FS
2017-11-29 0:32 Issues with OvelayFS + 9P FS Miguel Bernal Marin
@ 2017-11-29 4:19 ` Amir Goldstein
0 siblings, 0 replies; 2+ messages in thread
From: Amir Goldstein @ 2017-11-29 4:19 UTC (permalink / raw)
To: Miguel Bernal Marin
Cc: Miklos Szeredi, overlayfs, linux-kernel, Miklos Szeredi
On Wed, Nov 29, 2017 at 2:32 AM, Miguel Bernal Marin
<miguel.bernal.marin@linux.intel.com> wrote:
> Hi Miklos,
>
> I've seen issues when I try to use a Qemu/KVM + 9P and a Overlay FS.
>
> The issue started to show from v4.14 and I bisected the guilty commit to
>
> 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
>
> The issue is showed when ovl_iterate_real(file, ctx) is called, if I
> commented out that *if* block to just load iterate_dir(od->realfile, ctx),
> everything works fine.
>
> To reproduce the issue just create a OverlayFS and use the merged
> directory as a 9P share directory to the VM.
> You will see that the upper ONLY files/directories are seen good, but
> when you try to list the lower and merged files the process couldn't
> finish and ends with a "ls: Memory exhausted"
>
> I've tried to fix it but my knowledge is not enough on FS.
> I've done small script to reproduce the issue, they are at
> https://github.com/miguelinux/overlay-9p-issue
>
Hi Miguel,
Please try this patch:
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 7fc142d183e8..a4f8d75568ab 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -663,7 +663,10 @@ static int ovl_iterate_real(struct file *file,
struct dir_context *ctx)
return PTR_ERR(rdt.cache);
}
- return iterate_dir(od->realfile, &rdt.ctx);
+ err = iterate_dir(od->realfile, &rdt.ctx);
+ ctx->pos = rdt.ctx.pos;
+
+ return err;
}
Thanks,
Amir.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-29 4:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 0:32 Issues with OvelayFS + 9P FS Miguel Bernal Marin
2017-11-29 4:19 ` Amir Goldstein
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.