Re: [PATCH 5/5] NFS: Fix an unstable write data integrity race

Trond Myklebust
2010-04-22T20:55:40Z

On Thu, 2010-04-22 at 16:50 -0400, Trond Myklebust wrote:
> Commit 2c61be0a9478258f77b66208a0c4b1f5f8161c3c (NFS: Ensure that the WRITE
> and COMMIT RPC calls are always uninterruptible) exposed a race on file
> close. In order to ensure correct close-to-open behaviour, we want to wait
> for all outstanding background commit operations to complete.
>
> This patch adds an inode flag that indicates if a commit operation is under
> way, and provides a mechanism to allow ->write_inode() to wait for its
> completion if this is a data integrity flush.
>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> ---

BTW: There is a bugzilla report associated to this problem:
https://bugzilla.kernel.org/show_bug.cgi?id=15819

Cheers
Trond