All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shakthi Kannan <shakstux@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: mount PCI-express RAM memory as block device
Date: Fri, 7 Jan 2005 10:36:45 -0800 (PST)	[thread overview]
Message-ID: <20050107183645.72411.qmail@web54501.mail.yahoo.com> (raw)

Greetings!

I would like to know as to how we can mount a
filesystem for RAM memory on a PCI-express card.
System for development is x86 with 2.4.22 kernel.

I, initially wrote a ramdisk driver to read/write data
between buffer and RAM. Here, I have used:
device->data = vmalloc (device->size);
where:
- device is the device driver structure variable
- data = unsigned char *
- size = unsigned int

I am able to load the above block driver and mount a
filesystem using:
dd if=/dev/zero of=/dev/sbull bs=1k count=64
mkdir /mnt/mysbull
mke2fs -vm0 /dev/sbull 64
mount /dev/sbull /mnt/mysbull

For PCI device driver, I have modifed the above to
directly ioremap device->data as follows:
device->data = ioremap_nocache (BASE_ADDRESS,
BASE_SIZE);
Have successfully done:
dd if=/dev/zero of=/dev/sbull bs=1k count=64
mkdir /mnt/mysbull
mke2fs -vm0 /dev/sbull 64

But, when I proceed to mount a filesystem, it fails. 
mount /dev/sbull /mnt/mysbull

mount:error while guessing filesystem type
mount: you must specify the filesystem type

Also, if I give "fsck -v /dev/sbull", it returns with
improper filesystem super block. Even if I specify "-t
ext2" for mount, it fails. I even tried a
loopback device mount, but it fails too:
mount -o loop /dev/sbull /mnt/mysbull

FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev FA:00

How can I map the RAM memory on the PCI card, even
though I don't allocate any memory (during ioremap)
and display that to the end user as a mounted
filesystem so that he/she can read/write files to it?

Any help/pointers to links is appreciated.

Thanks,

K Shakthi


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

             reply	other threads:[~2005-01-07 18:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 18:36 Shakthi Kannan [this message]
2005-01-07 18:53 ` mount PCI-express RAM memory as block device linux-os
2005-01-07 20:17   ` Shakthi Kannan
2005-01-11 16:45     ` Shakthi Kannan
2005-01-07 19:00 ` Arnd Bergmann

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=20050107183645.72411.qmail@web54501.mail.yahoo.com \
    --to=shakstux@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.