NFS suport block sharing
Subsystems (2)
Hi,
yesterday, I ran into something that puzzled me quite a bit. I had an NFS file system (my home directory) mounted in its normal location. For testing purposes, I wanted to mount it a second time, but with a different set of options (hard instead of soft, etc).
To my surprise, the second mount continued to act like the original mount, as if it had been mounted with -o soft. /etc/mtab showed the options I had specified, but /proc/mounts showed that it indeed used soft retransmits.
To make a long story short, I think _if_ we do NFS super block sharing, we should make sure we use don't reuse an existing sb if it has different options. Attached is a patch that implements this, at least for the most common set of options.
Comments?
Olaf
Signature · 3 lines
Olaf Kirch | Stop wasting entropy - start using predictable [email protected] | tempfile names today! ---------------+
inode.c renamed from inode.c-reuse +8 -0
@@ -1320,6 +1320,14 @@return 0 ;if (old->addr.sin_port != server->addr.sin_port)return 0 ; +if (old->flags != server->flags + || old->rsize != server->rsize + || old->wsize != server->wsize + || old->acregmin != server->acregmin + || old->acregmax != server->acregmax + || old->acdirmin != server->acdirmin + || old->acdirmax != server->acdirmax) +return 0 ;return !memcmp (&old->fh, &server->fh,sizeof (struct nfs_fh )); }
På on , 18/02/2004 klokka 08:37, skreiv Olaf Kirch:
Quoted 3 lines
To make a long story short, I think _if_ we do NFS super block sharing, we should make sure we use don't reuse an existing sb if it has different options. Attached is a patch that implements
this, at least for the most common set of options.
Quoted 2 lines
Comments?
I'd prefer not.
We should aim only to have 1 super block per filesystem. Anything else will lead to inode aliasing, and hence potential data corruption problems when two processes try to write to the same file on different super blocks.
Is there really any sane application that requires you to have different rsize/wsize for the same filesystem?
Cheers,
Trond
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs