Re: [patch 00/13] vfs: add helpers to check r/o bind mounts

From: Miklos Szeredi
Date: Thu Apr 24 2008 - 13:23:56 EST


> > > Sure, unionfs already does some of it now (and some of it can be recoded
> > > more cleanly), but I'd like to get rid of much of it if I could -- these new
> > > path_* helpers make me have to maintain vfsmounts even moreso than before.
> >
> > With the words of Al: "that is hogwash". Stacks either maintain
> > vfsmounts or they don't. There's no middle ground.
>
> So, if I wanted to not maintain vfsmounts at all in unionfs, how can I use
> the proposed new path_* helpers which require vfsmounts? Will there be some
> other helpers available to perform lower-filesystem operations (e.g., mkdir,
> create, unlink, etc.) which won't require passing vfsmounts?
>
> The "or they don't" is not much of an option when I'm forced to use an API
> that requires a vfsmount...

Yes. The vfsmount is already needed for open() and that pretty much
determines the fate of all stacking filesystems, except the ones which
don't want to do file I/O, but that is rather hard to imagine.

And anyway, I don't see the issue here. If the stack wants to work on
a single filesystem directly, just do a bind mount of the original to
a kernel private mount and use that. I'm not sure this can be done
with the current API, but it doesn't sound difficult to implement at
all.

Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/