On Fri, Jan 28, 2022 at 3:17 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > On Fri, Jan 28, 2022 at 11:35:59AM +0000, David Howells wrote: > > > > Whether deny rmdir should have its own flag or not I don't know, > > > but from ovl POV I *think* it should not be a problem to deny rmdir > > > for the ovl upper/work dirs as long as ovl is mounted(?). > > > > What's the consequence of someone rearranging the directories directly in the > > contributing dirs whilst there's an overlay over them? > > "Don't do it, then - presumably the kernel won't panic, but don't expect it to > try and invent nice semantics for the crap you are trying to pull" IIUC, I think that is the point Dave was trying to make. Nothing good can come out of allowing users to manipulate the overlay upper/work dirs, so denying rmdir on those dirs that are already marked with the OVL_INUSE flag is probably not a bad idea anyway, so ovl and cachefiles could potentially use the same flag with same semantics. Thanks, Amir.