On Apr 06, Steve Lord wrote:
> XFS already has read only support - we just need to allow recovery in read
> only
> mode, and the Linux remount code in XFS seems broken, so getting from
> read only to read-write is broken I think.
Indeed, since we only print ``Hoser!'', I've been spending the last
couple of days trying to make remount work.
My first simple attack involved basically just flipping the
appropriate bits in the superblock and vfsp flags... this didn't
_entirely_ work (which didn't surprise me at all). There was clearly
more to do, especially in the case where one remounts from read-write
to read-only ("touch /mnt/xfs/foo" would say "Read-only filesystem",
yet continue to make the file. Eep.)
Since there were a few places in the VFSOPS_MOUNT code path that
differed if (flags & MS_REMOUNT), I gathered that I should really be
using that, like a regular mount. This has triggered a bunch of bugs
that I'm slowing tracking down one-by-one, including the odd null
pointer dereference in the xfs_write_super code.
In somewhat-related news, I have a patch for doing recovery in
read-only mode that I will test tomorrow. If it works on both
internal and external logs, I'll send it along for review.
-Phil
|