Re: [PATCH 28/29] xfs: Convert to bdev_open_by_path()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 23, 2023 at 12:48:39PM +0200, Jan Kara wrote:
> Convert xfs to use bdev_open_by_path() and pass the handle around.
....

> @@ -426,15 +427,15 @@ xfs_shutdown_devices(
>  	 * race, everyone loses.
>  	 */
>  	if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) {
> -		blkdev_issue_flush(mp->m_logdev_targp->bt_bdev);
> -		invalidate_bdev(mp->m_logdev_targp->bt_bdev);
> +		blkdev_issue_flush(mp->m_logdev_targp->bt_bdev_handle->bdev);
> +		invalidate_bdev(mp->m_logdev_targp->bt_bdev_handle->bdev);
>  	}
>  	if (mp->m_rtdev_targp) {
> -		blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev);
> -		invalidate_bdev(mp->m_rtdev_targp->bt_bdev);
> +		blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev_handle->bdev);
> +		invalidate_bdev(mp->m_rtdev_targp->bt_bdev_handle->bdev);
>  	}
> -	blkdev_issue_flush(mp->m_ddev_targp->bt_bdev);
> -	invalidate_bdev(mp->m_ddev_targp->bt_bdev);
> +	blkdev_issue_flush(mp->m_ddev_targp->bt_bdev_handle->bdev);
> +	invalidate_bdev(mp->m_ddev_targp->bt_bdev_handle->bdev);
>  }

Why do these need to be converted to run through bt_bdev_handle?  If
the buftarg is present and we've assigned targp->bt_bdev_handle
during the call to xfs_alloc_buftarg(), then we've assigned
targp->bt_bdev from the handle at the same time, yes?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux