All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH 7/9] xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_set
Date: Tue, 25 Aug 2009 14:21:41 -0400	[thread overview]
Message-ID: <20090825182613.609733555@bombadil.infradead.org> (raw)
In-Reply-To: 20090825182134.299870049@bombadil.infradead.org

[-- Attachment #1: xfs-lockdep-buf-2 --]
[-- Type: text/plain, Size: 1042 bytes --]

xfs_attr_rmtval_set is always called with i_lock held, and i_lock is taken
in reclaim context so all allocations under it must avoid recursions into
the filesystem.

Reported by the new reclaim context tracing in lockdep.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/xfs/xfs_attr.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_attr.c	2009-07-18 18:49:20.129533080 +0200
+++ linux-2.6/fs/xfs/xfs_attr.c	2009-07-18 18:50:01.713535041 +0200
@@ -2141,8 +2141,8 @@ xfs_attr_rmtval_set(xfs_da_args_t *args)
 		dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
 		blkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
 
-		bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno,
-							blkcnt, XFS_BUF_LOCK);
+		bp = xfs_buf_get_flags(mp->m_ddev_targp, dblkno, blkcnt,
+				       XFS_BUF_LOCK | XBF_DONT_BLOCK);
 		ASSERT(bp);
 		ASSERT(!XFS_BUF_GETERROR(bp));
 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2009-08-25 18:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25 18:21 [PATCH 0/9] stop taking the iolock in the reclaim path Christoph Hellwig
2009-08-25 18:21 ` [PATCH 1/9] xfs: avoid memory allocation under m_peraglock in growfs code Christoph Hellwig
2009-08-25 18:21 ` [PATCH 2/9] xfs: switch to NOFS allocation under i_lock in xfs_getbmap Christoph Hellwig
2009-08-25 18:21 ` [PATCH 3/9] xfs: switch to NOFS allocation under i_lock in xfs_da_state_alloc Christoph Hellwig
2009-08-25 18:21 ` [PATCH 4/9] xfs: switch to NOFS allocation under i_lock in xfs_da_buf_make Christoph Hellwig
2009-08-25 18:21 ` [PATCH 5/9] xfs: switch to NOFS allocation under i_lock in xfs_dir_cilookup_result Christoph Hellwig
2009-08-25 18:21 ` [PATCH 6/9] xfs: switch to NOFS allocation under i_lock in xfs_buf_associate_memory Christoph Hellwig
2009-08-25 18:21 ` Christoph Hellwig [this message]
2009-08-25 18:21 ` [PATCH 8/9] xfs: switch to NOFS allocation under i_lock in xfs_readlink_bmap Christoph Hellwig
2009-08-25 18:21 ` [PATCH 9/9] xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_get Christoph Hellwig
2009-08-25 18:41 ` [PATCH 0/9] stop taking the iolock in the reclaim path Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2009-07-18 22:14 [PATCH 0/9] fixes for memory allocator recursions into the filesystem Christoph Hellwig
2009-07-18 22:14 ` [PATCH 7/9] xfs: switch to NOFS allocation under i_lock in xfs_attr_rmtval_set Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090825182613.609733555@bombadil.infradead.org \
    --to=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.