Re: nfs MAP_SHARED corruption fix

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Tue May 08 2001 - 10:21:02 EST


>>>>> " " == Andrea Arcangeli <andrea@suse.de> writes:

> This fixes corruption with MAP_SHARED on top of nfs filesystem
> in 2.4:
> --- 2.4.5pre1aa2/fs/nfs/write.c.~1~ Tue May 1 19:35:29 2001
> +++ 2.4.5pre1aa2/fs/nfs/write.c Tue May 8 02:04:15 2001
> @@ -1533,6 +1533,7 @@
> if (!inode && file)
> inode = file->f_dentry->d_inode;
 
> + filemap_fdatasync(inode->i_mapping);
> do {
> error = 0; if (wait)

Yech! Apart from the fact that this means you do a full fdatasync()
even when you are simply trying to flush out single pages,
nfs_sync_file() gets called all over the place including in areas
where we know we're already holding a page lock.

AFAICs this fix will clearly deadlock...

Could you instead detail exactly which corruption problem you are
trying to fix?

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 15 2001 - 21:00:13 EST