Re: [PATCH 2/2] bdev: Refresh bdev size for disks without partitioning

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

 





On 10/21/19 11:36 AM, Johannes Thumshirn wrote:
On 21/10/2019 11:27, Guoqing Jiang wrote:
    static void bdev_disk_changed(struct block_device *bdev, bool
invalidate)
    {
-    if (invalidate)
-        invalidate_partitions(bdev->bd_disk, bdev);
-    else
-        rescan_partitions(bdev->bd_disk, bdev);
+    if (disk_part_scan_enabled(bdev->bd_disk)) {
+        if (invalidate)
+            invalidate_partitions(bdev->bd_disk, bdev);
+        else
+            rescan_partitions(bdev->bd_disk, bdev);
Maybe use the new common helper to replace above.
What do you mean exactly? Because there's only this place that has the
code
pattern here...
The above looks same as the new function.
The above is changed in the new bdev_disk_changed() function. Patch 1/2
factors out the pattern and this patch changes the behaviour


Oops, yes, sorry for the noise.

Thanks,
Guoqing



[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