Re: [PATCH 3/9] VFS: Introduce a mount context

From: David Howells
Date: Tue May 09 2017 - 05:32:33 EST


Miklos Szeredi <mszeredi@xxxxxxxxxx> wrote:

> Forget remount, it's a historical remnant.

I don't think it can't be set aside so lightly. Within the kernel, the option
parsing should share as much code as possible between new superblock config,
old new mount and old remount.

The 'trickiest' function we need to support is MS_RDONLY flipping. That one
affects both the mount and the superblock. I think all the rest only affect
one side or the other.

Given that a superblock can be mounted in multiple places, do we need to count
the number of read-only mounts that are holding a particular superblock and
only flip the superblock when they're all read-only?

Or do you advocate replacing "mount -o remount,[ro|rw]" with a pair of
operations - one to flip the mount and the other to flip the superblock?

Further, "emergency remount r/o" needs to be supported - though it might make
sense to add a special op just for that.

David