xfs
[Top] [All Lists]

[PATCH] xfs: fix the xfs_iflush_done callback search

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfs: fix the xfs_iflush_done callback search
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Wed, 01 Oct 2014 16:18:02 -0500
Delivered-to: xfs@xxxxxxxxxxx
User-agent: quilt/0.51-1
Commit "xfs: remove all the inodes on a buffer from the AIL in bulk"
made the xfs inode flush callback more efficient by combining all
the inode writes on the buffer and the deletions of the inode log
item from AIL.

The initial loop in this patch should be looping through all
the log items on the buffer to see which items have
xfs_iflush_done as their callback function. But currently,
only the log item passed to the function has its callback
compared to xfs_iflush_done. If the log item pointer passed to
the function does have the xfs_iflush_done callback function,
then all the log items on the buffer are removed from the
li_bio_list on the buffer b_fspriv and could be removed from
the AIL eventhough they may have not been written yet.

Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
---
 fs/xfs/xfs_inode_item.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/fs/xfs/xfs_inode_item.c
===================================================================
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -615,7 +615,7 @@ xfs_iflush_done(
        blip = bp->b_fspriv;
        prev = NULL;
        while (blip != NULL) {
-               if (lip->li_cb != xfs_iflush_done) {
+               if (blip->li_cb != xfs_iflush_done) {
                        prev = blip;
                        blip = blip->li_bio_list;
                        continue;


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