All of lore.kernel.org
 help / color / mirror / Atom feed
* 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

* Re: NFS O_DIRECT data_updates desync
  2004-05-17 15:32 NFS O_DIRECT data_updates desync Olaf Kirch
@ 2004-05-17 16:15 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2004-05-17 16:15 UTC (permalink / raw)
  To: Olaf Kirch; +Cc: nfs

P=E5 m=E5 , 17/05/2004 klokka 11:32, skreiv Olaf Kirch:
> Hi Trond, Chuck,
>=20
> 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.
>=20
> I'm attaching a patch that addresses this issue.

Applied...

Thanks,
  Trond


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ 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.