Skip to contentSkip to conversation

xfs: don't flush and invalidate internal RT device twice in xfs_shutdown_devices

PATCH Applied Christoph Hellwig 2 participants 4 messages Jul 20 – Aug 21 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: don't flush and invalidate internal RT device twice in xfs_shutdown_devices

Check for an internal RT device to remove a bit of extra work.

Fixes bdc03eb5f98f ("xfs: allow internal RT devices for zoned mode")
---
 fs/xfs/xfs_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
index 63c4bcbe6c2b..d96f3781d791 100644
@@ -445,7 +445,7 @@ xfs_shutdown_devices(
 		blkdev_issue_flush(mp->m_logdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_logdev_targp->bt_bdev);
 	}
-	if (mp->m_rtdev_targp) {
+	if (mp->m_rtdev_targp && mp->m_rtdev_targp != mp->m_ddev_targp) {
 		blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_rtdev_targp->bt_bdev);
 	}
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Christoph Hellwig

Check for an internal RT device to remove a bit of extra work.

Fixes bdc03eb5f98f ("xfs: allow internal RT devices for zoned mode")

Looks good.

Quoted 21 lines
---
 fs/xfs/xfs_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +1 -1
index 63c4bcbe6c2b..d96f3781d791 100644
@@ -445,7 +445,7 @@ xfs_shutdown_devices(
 		blkdev_issue_flush(mp->m_logdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_logdev_targp->bt_bdev);
 	}
-	if (mp->m_rtdev_targp) {
+	if (mp->m_rtdev_targp && mp->m_rtdev_targp != mp->m_ddev_targp) {
 		blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_rtdev_targp->bt_bdev);
 	}
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Christoph Hellwig
Quoted 13 lines · Christoph Hellwig

Check for an internal RT device to remove a bit of extra work.

Fixes bdc03eb5f98f ("xfs: allow internal RT devices for zoned mode")
---
 fs/xfs/xfs_super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_super.c +0 -0
index 63c4bcbe6c2b..d96f3781d791 100644

fs/xfs/xfs_super.c xfs_shutdown_devices( · line 451

Quoted 8 lines
fs/xfs/xfs_super.c +1 -1
@@ -445,7 +445,7 @@ xfs_shutdown_devices(
 		blkdev_issue_flush(mp->m_logdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_logdev_targp->bt_bdev);
 	}
-	if (mp->m_rtdev_targp) {
+	if (mp->m_rtdev_targp && mp->m_rtdev_targp != mp->m_ddev_targp) {
 		blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev);
 		invalidate_bdev(mp->m_rtdev_targp->bt_bdev);
 	}

Looks good too.

Quoted 4 lines
Signature · 1 line
2.53.0
maintainer Applied
#3 lore raw
In reply to Christoph Hellwig
Quoted 3 lines · Christoph Hellwig

Check for an internal RT device to remove a bit of extra work.

Applied to for-next, thanks!

[1/1] xfs: don't flush and invalidate internal RT device twice in xfs_shutdown_devices

      commit: 7fc296b379edc0fef83890097af3c9537fbf4364

Best regards,

Signature · 1 line
Carlos Maiolino <[email protected]>