* NFS O_DIRECT data_updates desync
@ 2004-05-17 15:32 Olaf Kirch
2004-05-17 16:15 ` Trond Myklebust
0 siblings, 1 reply; 2+ messages in thread
From: Olaf Kirch @ 2004-05-17 15:32 UTC (permalink / raw)
To: nfs
[-- 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-17 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-17 15:32 NFS O_DIRECT data_updates desync Olaf Kirch
2004-05-17 16:15 ` Trond Myklebust
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.