All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Subject: NFS suport block sharing
Date: Wed, 18 Feb 2004 17:37:02 +0100	[thread overview]
Message-ID: <20040218163702.GB31893@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

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
-- 
Olaf Kirch     |  Stop wasting entropy - start using predictable
okir@suse.de   |  tempfile names today!
---------------+ 

[-- Attachment #2: nfs-super-reuse --]
[-- Type: text/plain, Size: 548 bytes --]

--- inode.c-reuse	2004-02-17 16:58:25.000000000 +0100
+++ inode.c	2004-02-17 17:00:01.000000000 +0100
@@ -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));
 }
 

             reply	other threads:[~2004-02-18 16:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-18 16:37 Olaf Kirch [this message]
2004-02-19  0:04 ` NFS suport block sharing trond.myklebust
  -- strict thread matches above, loose matches on Subject: below --
2004-02-18 20:17 Lever, Charles
2004-02-19  2:27 Lever, Charles
2004-02-19  4:39 ` trond.myklebust
2004-02-19  9:05   ` Olaf Kirch
2004-02-19 16:37     ` trond.myklebust
2004-02-19 14:51 Lever, Charles
2004-02-20 13:25 barrie_spence

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040218163702.GB31893@suse.de \
    --to=okir@suse.de \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.