Re: [RFC PATCH 3/3] overlay: Add the ability to remount volatile directories when safe

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

 



On Tue, Nov 17, 2020 at 8:29 PM Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
>
> On Tue, Nov 17, 2020 at 08:03:16PM +0200, Amir Goldstein wrote:
> > > > C. "shutdown" the filesystem if writeback errors happened and return
> > > >      EIO from any read, like some blockdev filesystems will do in face
> > > >      of metadata write errors
> > > >
> > > > I happen to have a branch ready for that ;-)
> > > > https://github.com/amir73il/linux/commits/ovl-shutdown
> > >
> > >
> > > This branch seems to implement shutdown ioctl. So it will still need
> > > glue code to detect writeback failure in upper/ and trigger shutdown
> > > internally?
> > >
> >
> > Yes.
> > ovl_get_acess() can check both the administrative ofs->goingdown
> > command and the upper writeback error condition for volatile ovl
> > or something like that.
>
> This approach will not help mmaped() pages though, if I do.
>
> - Store to addr
> - msync
> - Load from addr
>
> There is a chance that I can still read back old data.
>

msync does not go through overlay. It goes directly to upper fs,
so it will sync pages and return error on volatile overlay as well.

Maybe there will still be weird corner cases, but the shutdown approach
should cover most or all of the interesting cases.

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