You do not need to program anything. You can use the Linux multi-device (aka md) subsystem to create a block device that consists of several smaller devices.
To do this, you can use mdadmto build a raid device LINEARfrom smaller devices.
Update
So here is what I did:
$ cd /images
$ dd if=/dev/zero bs=1M count=100 of=a.img
$ dd if=/dev/zero bs=1M count=50 of=b.img
$ dd if=/dev/zero bs=1M count=150 of=c.img
$ losetup -f
/dev/loop0
$ for i in a b c; do losetup -f $i.img; done
$ mdadm --build /dev/md0 -l linear -n 3 /dev/loop[012]
mdadm: array /dev/md0 built and started.
$ cat /proc/mdstat
Personalities : [linear]
md0 : active linear loop2[2] loop1[1] loop0[0]
307200 blocks super non-persistent 64k rounding
Please note that I used $as a hint so as not to confuse automatic syntax highlighting;)
So simple.
Greetings.
PS: , ?