xfs
[Top] [All Lists]

[PATCH] Don't allow memory reclaim to wait on the filesystem in inode wr

To: xfs-dev <xfs-dev@xxxxxxx>
Subject: [PATCH] Don't allow memory reclaim to wait on the filesystem in inode writeback
From: David Chinner <dgc@xxxxxxx>
Date: Thu, 1 May 2008 22:26:11 +1000
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Don't allow memory reclaim to wait on the filesystem in inode writeback

If we allow memory reclaim to wait on the pages under writeback in
inode cluster writeback we could deadlock because we are currently
holding the ILOCK on the initial writeback inode which is needed in
data I/O completion to change the file size or do unwritten extent
conversion before the pages are taken out of writeback state.

Signed-off-by: Dave Chinner <dgc@xxxxxxx>
---
 fs/xfs/xfs_inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c       2008-04-28 16:35:23.000000000 
+1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c    2008-05-01 20:04:55.151880341 +1000
@@ -2986,7 +2986,7 @@ xfs_iflush_cluster(
        ASSERT(pag->pag_ici_init);
 
        ilist_size = XFS_INODE_CLUSTER_SIZE(mp) * sizeof(xfs_inode_t *);
-       ilist = kmem_alloc(ilist_size, KM_MAYFAIL);
+       ilist = kmem_alloc(ilist_size, KM_NOFS);
        if (!ilist)
                return 0;
 


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