Create fake loop device on Fedora

First question – what is the purpose? Such fake loop device can be used as pv in lvm in case we want to play around and don’t want to add a new disk.

do_loop()
{
   losetup /dev/loop0 /srv/swift-disk.bin
}
do_loop
[Unit]
Description=Setup loop devices for swift
DefaultDependencies=false
ConditionFileIsExecutable=/usr/lib/systemd/scripts/swift-loop
Before=local-fs.target
After=systemd-udev-settle.service
#Require=systemd-udev-settle.service
 
[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/scripts/swift-loop
TimeoutSec=60
RemainAfterExit=yes
 
[Install]
WantedBy=local-fs.target
Also=systemd-udev-settle.service
systemctl enable swift-loop.service
systemctl start swift-loop.service