Re: [RFC][PATCH v2 0/5] Experiments with overlayfs filemap

Amir Goldstein
2019-01-29T08:54:33Z

On Tue, Jan 29, 2019 at 9:17 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
>
> On Mon, Jan 28, 2019 at 11:14 PM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > On Mon, Jan 28, 2019 at 11:22 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> > >
> > > On Mon, Jan 28, 2019 at 10:17 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> > >
> > > > Trying to put some code together...
> > >
> > > Very rudimentary patch attached. It doens't do direct IO yet, but
> > > demonstrates what I meant about achoring the upper file in the inode.
> > >
> >
> > Code looks good, but blows up on xfstests, so I'll wait for a baked patch
> > before testing.
> >
> > > Also found the trick to actually make writeback work:
> > > super_setup_bdi() call in fill_super...
> > >
> >
> > Cool, but when adding only setup_bdi() this to my code, I still don't see any
> > writeback. No writeback observed with your patch as well.
>
> I did observe writeback, but haven't done much testing. Will
> hopefully get this into a better shape today.
>

OK, I see the writebacks. Didn't see them with test:

# ./run --ov --samefs --recycle rename-new-pop-dir
...
./run --open-file /mnt/a/dir100-new/a -w -c -W aaaa
[ 59.092942] ovl_write_end: page->flags: 10000000000000c
...
/mnt/a/dir100-new/a: File size wrong (got 0, want 4)

Missing sync_filesystem(sb) in ovl_remount()?
No flush yet. What else?

There is also a NULL pointer deference in ovl_fault()
of file opened as upper with vfs_fadvise(NULL, ...
Need to remove vfs_fadvise.

Thanks,
Amir.