From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: NFS devel <nfs-devel@linux.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.4-pre6 NFSv3 maximum filesize correction
Date: Mon, 23 Apr 2001 09:58:14 +0200 [thread overview]
Message-ID: <15075.57494.135118.223555@charged.uio.no> (raw)
Hi Linus,
The current 2.4.4-pre series assumes that NFSv3 is always fully LFS
capable. This is of course not the case on 32bit architectures such as
the 2.2.x series.
The following patch to fs/nfs/inode.c corrects this bug by using the
NFSPROC3_FSINFO call to provide the maximum supported filesize on the
filesystem in question. On NFSv2 it will be set to 0x7FFFFFFF.
In doing this, I also noticed that knfsd was still supplying 4Gb as
its maximum supported filesize. The appended patch to
fs/nfsd/nfs3proc.c causes the FSINFO call to return sb->s_maxbytes to
the client.
Cheers,
Trond
diff -u --recursive --new-file linux-2.4.4-pre6/fs/nfs/inode.c linux-2.4.4-maxfile/fs/nfs/inode.c
--- linux-2.4.4-pre6/fs/nfs/inode.c Fri Apr 20 02:59:42 2001
+++ linux-2.4.4-maxfile/fs/nfs/inode.c Fri Apr 20 14:50:25 2001
@@ -435,8 +435,7 @@
if (server->namelen == 0 || server->namelen > maxlen)
server->namelen = maxlen;
- if(version > 2)
- sb->s_maxbytes = ~0ULL; /* Unlimited on NFSv3 */
+ sb->s_maxbytes = fsinfo.maxfilesize;
/* Fire up the writeback cache */
if (nfs_reqlist_alloc(server) < 0) {
diff -u --recursive --new-file linux-2.4.4-pre6/fs/nfsd/nfs3proc.c linux-2.4.4-maxfile/fs/nfsd/nfs3proc.c
--- linux-2.4.4-pre6/fs/nfsd/nfs3proc.c Fri Feb 9 20:29:44 2001
+++ linux-2.4.4-maxfile/fs/nfsd/nfs3proc.c Fri Apr 20 14:49:38 2001
@@ -542,6 +542,7 @@
if (sb->s_magic == 0x4d44 /* MSDOS_SUPER_MAGIC */) {
resp->f_properties = NFS3_FSF_BILLYBOY;
}
+ resp->f_maxfilesize = sb->s_maxbytes;
}
fh_put(&argp->fh);
reply other threads:[~2001-04-23 7:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=15075.57494.135118.223555@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=linux-kernel@vger.kernel.org \
--cc=nfs-devel@linux.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®