Skip to contentSkip to conversation

NFS O_DIRECT data_updates desync

PATCH Applied Olaf Kirch 2 participants 2 messages May 17, 2004

Subsystems (2)
lore
Share & tools
lore

Olaf Kirch

author
#0 lore raw

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

Signature · 3 lines
Olaf Kirch     |  The Hardware Gods hate me.
[email protected]   |
---------------+ 
fs/nfs/direct.c renamed from fs/nfs/direct.c.count +5 -2
@@ -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;
#1 lore raw

P=E5 m=E5 , 17/05/2004 klokka 11:32, skreiv Olaf Kirch:

Quoted 7 lines

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 - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs