Bug 7655

Summary: 2.6.19(+) can't mount NFS filesystems r/w
Product: File System Reporter: Avuton Olrich (avuton)
Component: NFSAssignee: Trond Myklebust (trondmy)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: rdunlap
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.19 Subsystem:
Regression: No Bisected commit-id:

Description Avuton Olrich 2006-12-09 07:55:17 UTC
Most recent kernel where this bug did *NOT* occur:
Distribution: Gentoo
Hardware Environment: client amd64/server x86
Problem Description:

I can't get NFS in v2.6.19+ to mount rw. It says it's mounted rw when I mount
-v, it says it's mounted rw when I cat /etc/mtab. When I try to write to the
filesystem as root it says it's mounted read-only. I'm really unsure how to
debug this. Even worse I'm very unsure how to google this, and have searched the
LKML up and down to try to find a solution. I would think this is a
configuration problem since it hasn't been reported yet (as far as I can find)
but I am definitely able to write to it when I try switching back to 2.6.18.*

I attempted to git-bisect (between 2.6.18 and 2.6.19) but haven't had time to
finish it.

I'm really unsure what information would be useful for this bug report. 

Steps to reproduce:
Boot 2.6.19 (upto the current git of the day)
mount nfs directory rw
touch /mnt/mydir/touch
(fs is mounted ro)

Guess I'm not only looking for a solution here, but maybe a bit of help on how I
can figure out what this issue could be. Thanks for your time.
Comment 1 Trond Myklebust 2006-12-09 10:59:10 UTC
See BUG 7612:

The VFS does not, and has not ever, allowed you to remount the same 
filesystem with different mount options. NFS 'allowed' this because if you
mounted a different directory, it would treat that as a different filesystem.
Unfortunately, that leads to nasty cache consistency problems.

As of 2.6.19, NFS will group all directories that belong to the same
filesystem on the server into the same superblock and hence treat them as the
same filesystem on the client.
Comment 2 Avuton Olrich 2006-12-09 11:45:52 UTC
Aah! Thanks for the great explanation!