On Mon, Mar 03, 2025 at 05:16:48PM +0100, Mikulas Patocka wrote: > What should I use instead of bmap? Is fiemap exported for use in the > kernel? You can't do an ahead of time mapping. It's a broken concept. > Would Jens Axboe agree to merge the dm-loop logic into the existing loop > driver? What logic? > Dm-loop is significantly faster than the regular loop: > > # modprobe brd rd_size=1048576 > # dd if=/dev/zero of=/dev/ram0 bs=1048576 > # mkfs.ext4 /dev/ram0 > # mount -t ext4 /dev/ram0 /mnt/test > # dd if=/dev/zero of=/mnt/test/test bs=1048576 count=512 All of this needs to be in a commit log. Also note that the above: a) does not use direct I/O which any sane loop user should b) is not on a file but a block device, rendering the use of a loop device entirely pointless.