From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20190122123457.10600-1-amir73il@gmail.com> In-Reply-To: From: Amir Goldstein Date: Fri, 25 Jan 2019 15:04:37 +0200 Message-ID: Subject: Re: [RFC][PATCH v2 0/5] Experiments with overlayfs filemap Content-Type: text/plain; charset="UTF-8" To: Miklos Szeredi Cc: Vivek Goyal , cgxu519 , overlayfs List-ID: > > One questions about your patch: > > Skipping the ovl_change_flags() for upper realfile, that's just a > > quick hack, right? > > I'll need to fix this up properly. > > Yes. > > Speaking of hacks: I don't really like the O_RDWR | O_WRONLY thing. I > understand why it works, but I think handling it explicitly would be > much cleaner. > I figured... in fact, it is not at all interesting to propagate f_flags to copy up helpers, so I was thinking of translating them to simple copy_up_flags *before* the call to ovl_maybe_copy_up(), i.e.: OVL_COPY_UP = 1, OVL_COPY_UP_DATA = 2, OVL_COPY_UP_WITH_DATA = 3, > > About the way forward, implementing writepage() should be quite straight forward > > from this, so I will add write support re-work the series and re-post. > > The one issue is, we don't have the open file available from > writepage(s) like we do in readpage(s). In fact leaving the > writeback till after close is an important optimization (e.g. > compilers write temporary files, that are then immediately deleted, so > no need to actually do any writeback). > > That opens some interesting questions about how to do the writeback... > Mmm.... so now using upper page cache for write does sound so bad. If only we had shared cache pages ;-) We can treat upper page cache as a vessel for writeback and invalidate it upon completion, since it is *ours*. I'll see what I can come up with. Thanks, Amir.