Reg: /dev/loop0
Hi,
I have a query regarding /dev/loop0 device.
Let's say that I execute the following steps
root@ubuntu:/tmp# dd if=/dev/zero of=test.img bs=1024 count=300000
root@ubuntu:/tmp# losetup /dev/loop0 test.img
root@ubuntu:/tmp# mkfs -t ext3 /dev/loop0
root@ubuntu:/tmp# mount /dev/loop0 /tmp/mnt
Now, if I create & write into a file /tmp/mnt/fileOne,
will there be a any overhead compared to writing a file directly on /tmp/fileOne?
The difference is that, in the first case I am writing into the /dev/loop0 device. I understand that the /dev/loop0 will have its own inode table and other entries required to retrieve/access the file.
But would there be any difference related to read/write buffers allocated to the device.
Will there be two levels of indirection in this case?
(i,e) A separate RW buffer for /dev/loop0 taken care of by the loop device driver and another level of RW buffer for the physical harddrive?
Any pointers in this regard would be useful.
Thanks,
Alphone
|