deadlocks with fallocate
Thomas Neumann
tneumann at users.sourceforge.net
Thu Oct 15 00:58:05 CDT 2009
> 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.
More information about the xfs
mailing list