The "take the first available OBD device attached" approach is broken as that OBD might go away while the changelog is being read.
Here is an example of how things can go wrong:
- mount lustre at /mnt/lustre;
- mount the same lustre filesystem at /mnt/lustre2;
- open /dev/changelog-lustre-MDT0000 in writing mode;
- unmount /mnt/lustre;
- write 'clear:cl0:0' to the opened chardevice.
That triggers an LBUG.