From: Lei Yang <lya755@ece.northwestern.edu>
To: linux-os@analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: loopback on block device
Date: Wed, 27 Oct 2004 14:42:48 -0500 [thread overview]
Message-ID: <417FFA38.8000602@ece.northwestern.edu> (raw)
In-Reply-To: <Pine.LNX.4.61.0410271452390.4669@chaos.analogic.com>
Why /dev/ram0 is a file? Can you get into more details? For example, if
I want to do some system level programming and write to a /dev/ram0, how
do I do it?
Thanks very much for your reply!
Lei
linux-os wrote:
> On Wed, 27 Oct 2004, Lei Yang wrote:
>
>> Hello,
>>
>> Here is a question for loopback device. As far as I understand, the
>> loopback device is used to mount files as if they were block devices.
>>
>> Then Why I could do "losetup -e XOR /dev/loop0 /dev/ram0" ? Notice
>> that ram0 is not mounted anywhere and does not have a filesystem on
>> it. I've tried that command and there seems to be no error. I got
>> confused and looked into loop.c, it seems to me that a loopback
>> device should be associated with a "backing file", why would it work
>> on a block device anyway?
>>
>> I'd appreciate your comments greatly!
>>
>> TIA,
>> Lei
>>
>
> `man losetup`
> You just set up the loop device to enable encryption on
> /dev/ram0. /dev/ram0 is a "file". It's a special-file,
> but a file nevertheless. It can contain a file-system,
> therefore act as a RAM disk, but it doesn't have to.
>
> In principle, you could make an encrypted file-system
> in which you couldn't even know what kind of file-
> system it was, without an encryption key.
>
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
> Notice : All mail here is now cached and reviewed by John Ashcroft.
> 98.36% of all statistics are fiction.
>
>
next prev parent reply other threads:[~2004-10-27 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-27 18:20 loopback on block device Lei Yang
2004-10-27 18:29 ` Lei Yang
2004-10-28 0:31 ` Al Viro
2004-10-27 18:58 ` linux-os
2004-10-27 19:42 ` Lei Yang [this message]
2004-10-28 9:48 ` Helge Hafting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=417FFA38.8000602@ece.northwestern.edu \
--to=lya755@ece.northwestern.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox