linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug in loopback device (Linux version 2.6.0-test2)
@ 2003-07-30 11:23 Pilaszy Istvan
  2003-07-30 14:18 ` Andries Brouwer
  0 siblings, 1 reply; 2+ messages in thread
From: Pilaszy Istvan @ 2003-07-30 11:23 UTC (permalink / raw)
  To: linux-kernel

Hi!

I found a bug in the loopback device.
See this two different results (the difference: in the second case I use
`-o loop' mount option for mounting /dev/hda3 to /hda3_copy

First case:
mount -t reiserfs /dev/hda3 /hda3
mount -t reiserfs /dev/hda3 /hda3_copy
rm -f /hda3/* /hda3_copy/*
ls -l /hda3/ /hda3_copy/
touch /hda3/xxx /hda3_copy/yyy
echo
ls -l /hda3 /hda3_copy
umount /hda3
umount /hda3_copy

The result is:
/hda3/:
total 0

/hda3_copy/:
total 0

/hda3:
total 0
-rw-r--r--    1 root     root            0 Jul 30 13:15 xxx
-rw-r--r--    1 root     root            0 Jul 30 13:15 yyy

/hda3_copy:
total 0
-rw-r--r--    1 root     root            0 Jul 30 13:15 xxx
-rw-r--r--    1 root     root            0 Jul 30 13:15 yyy

Everything is OK.
-----------------------------------------------------------------------
Second case:

mount -t reiserfs /dev/hda3 /hda3
mount -o loop -t reiserfs /dev/hda3 /hda3_copy
rm -f /hda3/* /hda3_copy/*
ls -l /hda3/ /hda3_copy/
touch /hda3/xxx /hda3_copy/yyy
echo
ls -l /hda3 /hda3_copy
umount /hda3
umount /hda3_copy

And the result:
/hda3/:
total 0

/hda3_copy/:
total 0

/hda3:
total 0
-rw-r--r--    1 root     root            0 Jul 30 13:17 xxx

/hda3_copy:
total 0
-rw-r--r--    1 root     root            0 Jul 30 13:17 yyy
---------------------------------------------------------------------------
Its quite interesting :-) Why to store to copy of the directory in the
memory? It causes inconsistency, and wastes memory.

Bye,
Istvan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug in loopback device (Linux version 2.6.0-test2)
  2003-07-30 11:23 bug in loopback device (Linux version 2.6.0-test2) Pilaszy Istvan
@ 2003-07-30 14:18 ` Andries Brouwer
  0 siblings, 0 replies; 2+ messages in thread
From: Andries Brouwer @ 2003-07-30 14:18 UTC (permalink / raw)
  To: Pilaszy Istvan; +Cc: linux-kernel

On Wed, Jul 30, 2003 at 01:23:17PM +0200, Pilaszy Istvan wrote:

> I found a bug in the loopback device.

Not really.

If you setup a loop device on a file or other device,
then the block device involved is the loop device.
Any access to that same file or device not via the
loop device will give undesired results.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-30 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-30 11:23 bug in loopback device (Linux version 2.6.0-test2) Pilaszy Istvan
2003-07-30 14:18 ` Andries Brouwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).