Hello Ryan Harper >> >> Hello Ryan Harper >>> >>> This happens in the initramfs for kernels which include bcache module. After the rootfs is >>> mounted and we've pivoted into system boot, then the udev cold-plug replay will repeat >>> the disk add/change events >> I run bcache in Redhat and Centos OS, I haven't met such issue. >> I am wondering, if udev cold-plug needs replay, it should also >> repeat the bcache change uevent which produced in bcache device >> registering, if so, the /dev/bcache/{by-uuid, by-label} should be >> also generated. >>> Could you tell me why disk add/change events would be replayed, but bcache change events which produced in bcache device registering would not be replayed during udev cold-plug replay? >>> but when the bcache register method runs a second time and >>> finds a backing device, a bcacheN block device already has it open, so the module exits out >>> the path of "device already registered" which prevents bcache from calling register_bdev() >>> which is the only path where a backing device could call bch_cached_dev_run() which is >>> responsible for emitting the KOBJ_CHANGE event which the bcache udev rules use to >>> generate the /dev/bcache/{by-uuid, by-label} events. >> >> I am just worry about that, If every disk change uevents triggerd a >> bcache device change uevents, there would be a lot of output messages >> like "/dev/bcache/{by-uuid, by-label} has existed, and it was >> created again..." > >Udev does not generate messages when it creates symlinks as far as I know. > >What you can see is the kernel messages when udev coldplugs devices: > >[2681476.651631] bcache: register_bcache() error opening >/dev/nvme0n1p1: device already registered >[2681477.082824] bcache: register_bcache() error opening /dev/sda3: >device already registered >[3283536.544468] bcache: register_bcache() error opening >/dev/nvme0n1p1: device already registered >[3283537.018570] bcache: register_bcache() error opening /dev/sda3: >device already registered >[3567850.400367] bcache: register_bcache() error opening >/dev/nvme0n1p1: device already registered >[3567850.855402] bcache: register_bcache() error opening /dev/sda3: >device already registered > >In general, I don't think there are a large number, or frequent bcache >CHANGE events outside of testing. It seems OK. >Ryan Thanks, Tang Junhui -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html