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

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

 



On Thu, Aug 24, 2023 at 10:29:10PM +0200, Jan Kara wrote:
> On Thu 24-08-23 12:28:37, Jan Kara wrote:
> > On Thu 24-08-23 08:11:42, Dave Chinner wrote:
> > > 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?
> > 
> > Good point, these conversions are pointless now so I've removed them. They
> > are leftover from a previous version based on a kernel where xfs was
> > dropping bdev references in a different place. Thanks for noticing.
> 
> FWIW attached is a new version of the patch I have currently in my tree.

The appended patch looks good to me,
Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux