From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Subject: NFS O_DIRECT data_updates desync
Date: Mon, 17 May 2004 17:32:29 +0200 [thread overview]
Message-ID: <20040517153229.GN14755@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
Hi Trond, Chuck,
there's a code path in nfs_direct_write_seg where
NFS_I(inode)->data_updates can get out of sync with reality,
which will lead to a BUG() in nfs_clear_inode later on.
I'm attaching a patch that addresses this issue.
Olaf
--
Olaf Kirch | The Hardware Gods hate me.
okir@suse.de |
---------------+
[-- Attachment #2: nfs-direct-dataref --]
[-- Type: text/plain, Size: 509 bytes --]
--- linux-2.6.5/fs/nfs/direct.c.count 2004-05-14 17:18:51.000000000 +0200
+++ linux-2.6.5/fs/nfs/direct.c 2004-05-17 17:27:21.000000000 +0200
@@ -297,7 +297,7 @@
if (result <= 0) {
if (tot_bytes > 0)
break;
- return result;
+ goto out;
}
if (tot_bytes == 0)
@@ -336,9 +336,12 @@
VERF_SIZE) != 0)
goto sync_retry;
}
+ result = tot_bytes;
+
+out:
nfs_end_data_update_defer(inode);
- return tot_bytes;
+ return result;
sync_retry:
wdata.args.stable = NFS_FILE_SYNC;
next reply other threads:[~2004-05-17 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-17 15:32 Olaf Kirch [this message]
2004-05-17 16:15 ` NFS O_DIRECT data_updates desync Trond Myklebust
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=20040517153229.GN14755@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.