xfs
[Top] [All Lists]

Re: deadlocks with fallocate

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: deadlocks with fallocate
From: Thomas Neumann <tneumann@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Oct 2009 07:58:05 +0200
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20091014150951.GA13123@xxxxxxxxxxxxx>
References: <hak2l2$ko2$1@xxxxxxxxxxxxx> <20091014150951.GA13123@xxxxxxxxxxxxx>
User-agent: KMail/1.12.2 (Linux/2.6.31-14-generic; KDE/4.3.2; x86_64; ; )
> Can you try if the hack below makes the problem go away?
> 
> 
> Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c        2009-10-14
>  17:06:50.489254023 +0200 +++
>  linux-2.6/fs/xfs/linux-2.6/xfs_aops.c        2009-10-14 17:07:54.055006445 
> +0200
>  @@ -278,6 +278,8 @@ xfs_end_bio_unwritten(
>       xfs_off_t               offset = ioend->io_offset;
>       size_t                  size = ioend->io_size;
> 
> +     current->flags |= PF_FSTRANS;
> +
>       if (likely(!ioend->io_error)) {
>               if (!XFS_FORCED_SHUTDOWN(ip->i_mount)) {
>                       int error;
> 

I did some more tests, and indeed the patch makes the deadlock go away. Your 
description of it as a hack makes me somewhat concerned about using it 
permanently, but hopefully you will find a proper solution ;)

Thanks for looking at this.

<Prev in Thread] Current Thread [Next in Thread>