mirror of https://github.com/torvalds/linux.git
xfs: use blkdev_report_zones_cached()
Modify xfs_mount_zones() to replace the call to blkdev_report_zones() with blkdev_report_zones_cached() to speed-up mount operations. Since this causes xfs_zone_validate_seq() to see zones with the BLK_ZONE_COND_ACTIVE condition, this function is also modified to acept this condition as valid. With this change, mounting a freshly formatted large capacity (30 TB) SMR HDD completes under 2s compared to over 4.7s before. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
ad3c1188b4
commit
e04ccfc282
|
|
@ -95,6 +95,7 @@ xfs_zone_validate_seq(
|
||||||
case BLK_ZONE_COND_IMP_OPEN:
|
case BLK_ZONE_COND_IMP_OPEN:
|
||||||
case BLK_ZONE_COND_EXP_OPEN:
|
case BLK_ZONE_COND_EXP_OPEN:
|
||||||
case BLK_ZONE_COND_CLOSED:
|
case BLK_ZONE_COND_CLOSED:
|
||||||
|
case BLK_ZONE_COND_ACTIVE:
|
||||||
return xfs_zone_validate_wp(zone, rtg, write_pointer);
|
return xfs_zone_validate_wp(zone, rtg, write_pointer);
|
||||||
case BLK_ZONE_COND_FULL:
|
case BLK_ZONE_COND_FULL:
|
||||||
return xfs_zone_validate_full(zone, rtg, write_pointer);
|
return xfs_zone_validate_full(zone, rtg, write_pointer);
|
||||||
|
|
|
||||||
|
|
@ -1250,7 +1250,7 @@ xfs_mount_zones(
|
||||||
trace_xfs_zones_mount(mp);
|
trace_xfs_zones_mount(mp);
|
||||||
|
|
||||||
if (bdev_is_zoned(bt->bt_bdev)) {
|
if (bdev_is_zoned(bt->bt_bdev)) {
|
||||||
error = blkdev_report_zones(bt->bt_bdev,
|
error = blkdev_report_zones_cached(bt->bt_bdev,
|
||||||
XFS_FSB_TO_BB(mp, mp->m_sb.sb_rtstart),
|
XFS_FSB_TO_BB(mp, mp->m_sb.sb_rtstart),
|
||||||
mp->m_sb.sb_rgcount, xfs_get_zone_info_cb, &iz);
|
mp->m_sb.sb_rgcount, xfs_get_zone_info_cb, &iz);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue