Sorry, did not know how to reach you all.
I wanted to find the thin_id of a thin volume given its volume group and lv_name.
Using the cli it is as simple as lvs -o thin_id "vg"/"lv"
How to find it using libblockdev apis?
Calling bd_lvm_lvinfo does give out BDLVMLVdata.
But "BDLVMLVdata" does not have the thin_id info.
Thanks.