Re: [PATCH 5/5] union: hybrid union filesystem prototype

From: Miklos Szeredi
Date: Fri Sep 03 2010 - 08:31:34 EST


On Thu, 2 Sep 2010, Valerie Aurora wrote:
> > Missing:
> >
> > - upgrade credentials for copy-up
> > - ensure that filesystems part of the union are not modified outside
> > the union
>
> Just a note that the infrastructure I wrote to do this last bullet
> point for union mounts (hard read-only count plus mount checks) is
> completely compatible with hybrid union fs.

Thanks.

I've used some infrastructure (like parts of the copy up code) from
union mounts.

One way to generalize the read-only counts infrastructure is not to
require MS_RDONLY on the superblock, but count the number of
read-write mounts of the sb. If it's zero then that's equivalent to
MS_RDONLY.

For the writable layer the same can be used, except the overlay
filesystem can get a single private read-write mount. This means that
the upper layer can also be mounted multiple times, but cannot be part
of other unions and cannot be mounted read write to userspace.

Thanks,
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/