Finding offset of a filesystem that resides directly on a partition is easy: check the partition start sector, multiply by sector size, done.
What if the filesystem lives inside LVM? I could scan the drive for its distinctive features like the magic number, UUID, etc., but I'm thinking of something that doesn't rely on matching by content.
Is there a generalized solution for all kinds of block devices? What about those that don't store data literally, like for example LUKS containers, dm-integrity and such? I don't think block devices form any kind of hierarchy, so I guess the answer is no?