* [PATCH] xfs: Capture state of the right inode in xfs_iflush_done
@ 2017-09-22 11:35 Carlos Maiolino
2017-09-22 14:32 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Carlos Maiolino @ 2017-09-22 11:35 UTC (permalink / raw)
To: linux-xfs
My previous patch: d3a304b6292168b83b45d624784f973fdc1ca674 check for
XFS_LI_FAILED flag xfs_iflush done, so the failed item can be properly
resubmitted.
In the loop scanning other inodes being completed, it should check the
current item for the XFS_LI_FAILED, and not the initial one.
The state of the initial inode is checked after the loop ends
Kudos to Eric for catching this.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
fs/xfs/xfs_inode_item.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index 6d0f74ec31e8..015e8ee793a3 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -745,7 +745,7 @@ xfs_iflush_done(
*/
iip = INODE_ITEM(blip);
if ((iip->ili_logged && blip->li_lsn == iip->ili_flush_lsn) ||
- lip->li_flags & XFS_LI_FAILED)
+ blip->li_flags & XFS_LI_FAILED)
need_ail++;
blip = next;
--
2.13.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] xfs: Capture state of the right inode in xfs_iflush_done
2017-09-22 11:35 [PATCH] xfs: Capture state of the right inode in xfs_iflush_done Carlos Maiolino
@ 2017-09-22 14:32 ` Christoph Hellwig
2017-09-25 9:33 ` Carlos Maiolino
2017-09-22 14:39 ` Eric Sandeen
2017-09-22 18:46 ` Darrick J. Wong
2 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-09-22 14:32 UTC (permalink / raw)
To: Carlos Maiolino; +Cc: linux-xfs
Oops, yes this fix looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
I wish we could clean this up a bit by making li_bio_list a
real list_head, and then factoring the loop into a helper so that
lip isn't even in scope..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: Capture state of the right inode in xfs_iflush_done
2017-09-22 14:32 ` Christoph Hellwig
@ 2017-09-25 9:33 ` Carlos Maiolino
0 siblings, 0 replies; 5+ messages in thread
From: Carlos Maiolino @ 2017-09-25 9:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs
On Fri, Sep 22, 2017 at 02:32:16PM +0000, Christoph Hellwig wrote:
> Oops, yes this fix looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> I wish we could clean this up a bit by making li_bio_list a
> real list_head, and then factoring the loop into a helper so that
> lip isn't even in scope..
Sounds good, Adding it to my todo list.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Carlos
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: Capture state of the right inode in xfs_iflush_done
2017-09-22 11:35 [PATCH] xfs: Capture state of the right inode in xfs_iflush_done Carlos Maiolino
2017-09-22 14:32 ` Christoph Hellwig
@ 2017-09-22 14:39 ` Eric Sandeen
2017-09-22 18:46 ` Darrick J. Wong
2 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2017-09-22 14:39 UTC (permalink / raw)
To: Carlos Maiolino, linux-xfs
On 9/22/17 6:35 AM, Carlos Maiolino wrote:
> My previous patch: d3a304b6292168b83b45d624784f973fdc1ca674 check for
> XFS_LI_FAILED flag xfs_iflush done, so the failed item can be properly
> resubmitted.
>
> In the loop scanning other inodes being completed, it should check the
> current item for the XFS_LI_FAILED, and not the initial one.
>
> The state of the initial inode is checked after the loop ends
>
> Kudos to Eric for catching this.
Coverity, actually, I'm just the messenger.
Fixes-coverity-id: 1417838
-Eric
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
> fs/xfs/xfs_inode_item.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
> index 6d0f74ec31e8..015e8ee793a3 100644
> --- a/fs/xfs/xfs_inode_item.c
> +++ b/fs/xfs/xfs_inode_item.c
> @@ -745,7 +745,7 @@ xfs_iflush_done(
> */
> iip = INODE_ITEM(blip);
> if ((iip->ili_logged && blip->li_lsn == iip->ili_flush_lsn) ||
> - lip->li_flags & XFS_LI_FAILED)
> + blip->li_flags & XFS_LI_FAILED)
> need_ail++;
>
> blip = next;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: Capture state of the right inode in xfs_iflush_done
2017-09-22 11:35 [PATCH] xfs: Capture state of the right inode in xfs_iflush_done Carlos Maiolino
2017-09-22 14:32 ` Christoph Hellwig
2017-09-22 14:39 ` Eric Sandeen
@ 2017-09-22 18:46 ` Darrick J. Wong
2 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2017-09-22 18:46 UTC (permalink / raw)
To: Carlos Maiolino; +Cc: linux-xfs
On Fri, Sep 22, 2017 at 01:35:55PM +0200, Carlos Maiolino wrote:
> My previous patch: d3a304b6292168b83b45d624784f973fdc1ca674 check for
> XFS_LI_FAILED flag xfs_iflush done, so the failed item can be properly
> resubmitted.
>
> In the loop scanning other inodes being completed, it should check the
> current item for the XFS_LI_FAILED, and not the initial one.
>
> The state of the initial inode is checked after the loop ends
>
> Kudos to Eric for catching this.
>
> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
> ---
> fs/xfs/xfs_inode_item.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
> index 6d0f74ec31e8..015e8ee793a3 100644
> --- a/fs/xfs/xfs_inode_item.c
> +++ b/fs/xfs/xfs_inode_item.c
> @@ -745,7 +745,7 @@ xfs_iflush_done(
> */
> iip = INODE_ITEM(blip);
> if ((iip->ili_logged && blip->li_lsn == iip->ili_flush_lsn) ||
> - lip->li_flags & XFS_LI_FAILED)
> + blip->li_flags & XFS_LI_FAILED)
/me grumbles about the braces here, but will just fix that on the way in...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> need_ail++;
>
> blip = next;
> --
> 2.13.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-25 9:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 11:35 [PATCH] xfs: Capture state of the right inode in xfs_iflush_done Carlos Maiolino
2017-09-22 14:32 ` Christoph Hellwig
2017-09-25 9:33 ` Carlos Maiolino
2017-09-22 14:39 ` Eric Sandeen
2017-09-22 18:46 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox