Re: [PATCH] block: Do not reread partition table on exclusively open device

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

 



On Thu 09-02-23 19:19:48, Yu Kuai wrote:
> 在 2023/02/09 17:57, Jan Kara 写道:
> > On Thu 09-02-23 17:32:45, Yu Kuai wrote:
> > > 在 2023/02/09 17:04, Jan Kara 写道:
> > > I still prefer to open code blkdev_get_by_dev(), because many operations
> > > is not necessary here. And this way, we can clear GD_NEED_PART_SCAN
> > > inside open_mutex if rescan failed.
> > 
> > I understand many operations are not needed there but this is not a hot
> > path and leaking of bdev internal details into genhd.c is not a good
> > practice either (e.g. you'd have to make blkdev_get_whole() extern).
> 
> I was thinking that disk_scan_partitions() can be moved to bdev.c to
> avoid that...
> > 
> > We could create a special helper for partition rescan in block/bdev.c to
> > hide the details but think that bd_start_claiming() - bd_abort_claiming()
> > trick is the simplest solution to temporarily grab exclusive ownership if
> > we don't have it.
> 
> Now I'm good with this solution. By the way, do you think we must make
> sure the first partition scan will be proceed?

Sorry, I'm not sure what your are asking about here :) Can you please
elaborate more?

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[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