Linux-XFS Archive on lore.kernel.org
 help / color / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH 2/2] xfs: return locked status of inode buffer on xfsaild push
Date: Thu, 26 Mar 2020 09:17:03 -0400
Message-ID: <20200326131703.23246-3-bfoster@redhat.com> (raw)
In-Reply-To: <20200326131703.23246-1-bfoster@redhat.com>

If the inode buffer backing a particular inode is locked,
xfs_iflush() returns -EAGAIN and xfs_inode_item_push() skips the
inode. It still returns success to xfsaild, however, which bypasses
the xfsaild backoff heuristic. Update xfs_inode_item_push() to
return locked status if the inode buffer couldn't be locked.

Signed-off-by: Brian Foster <bfoster@redhat.com>
---
 fs/xfs/xfs_inode_item.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 4a3d13d4a022..9a903babbcf7 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -552,7 +552,8 @@ xfs_inode_item_push(
 		if (!xfs_buf_delwri_queue(bp, buffer_list))
 			rval = XFS_ITEM_FLUSHING;
 		xfs_buf_relse(bp);
-	}
+	} else if (error == -EAGAIN)
+		rval = XFS_ITEM_LOCKED;
 
 	spin_lock(&lip->li_ailp->ail_lock);
 out_unlock:
-- 
2.21.1


  parent reply index

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 13:17 [PATCH 0/2] xfs: a couple AIL pushing trylock fixes Brian Foster
2020-03-26 13:17 ` [PATCH 1/2] xfs: trylock underlying buffer on dquot flush Brian Foster
2020-03-27 12:59   ` Christoph Hellwig
2020-03-27 15:45   ` Darrick J. Wong
2020-03-27 16:44     ` Brian Foster
2020-03-27 16:46       ` Brian Foster
2020-03-27 17:04         ` Darrick J. Wong
2020-03-27 16:50       ` Darrick J. Wong
2020-03-29 22:46   ` Dave Chinner
2020-03-29 23:01     ` Dave Chinner
2020-03-30 12:15     ` Brian Foster
2020-03-31  0:04       ` Dave Chinner
2020-03-31 11:46         ` Brian Foster
2020-03-26 13:17 ` Brian Foster [this message]
2020-03-27 13:00   ` [PATCH 2/2] xfs: return locked status of inode buffer on xfsaild push Christoph Hellwig
2020-03-27 15:39   ` Darrick J. Wong
2020-03-27 15:32 ` [PATCH 0/2] xfs: a couple AIL pushing trylock fixes Darrick J. Wong
2020-03-27 16:44   ` Brian Foster
2020-03-29 16:43     ` Darrick J. Wong

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=20200326131703.23246-3-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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

Linux-XFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-xfs/0 linux-xfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-xfs linux-xfs/ https://lore.kernel.org/linux-xfs \
		linux-xfs@vger.kernel.org
	public-inbox-index linux-xfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-xfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git