The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alex Buell <alex.buell@munted.org.uk>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Ramdisk driver module
Date: Wed, 4 Mar 2009 10:19:29 +0000	[thread overview]
Message-ID: <20090304101929.62bba811@lithium.local.net> (raw)

Folks,

I've just put together a ramdisk driver module over the last few days
adapted from bits that I've gleaned on the 'net. However, I have found
a problem with the module that I've not been able to solve yet. When
loading it for the first time, it all works perfectly, I can create a
filesystem on the devices, copy files onto it, then unload it
perfectly. 

The problem arises when I reload the module, it crashes with 'badness
at fs/sysfs/dir.c:463' on my G3 iMac PPC machine which I use as a
generic kernel development machine, this runs 2.6.27.

There's this line: 
'kobject_add_internal failed for 252:0 with -EEXIST, don't try to
register things with the same name in the same directory.'

252:0 is the dynamically assigned device major-minor number which is
correct. The odd thing when looking over the code in unload.c where it
unregisters the device it appears to work just fine. And I look at
the /dev/* directory and the device name definitely disappears when
unloaded. Yet when I reload the module it crashes with the above error. 

Any ideas why? I've bzipped up the sources and uploaded it to
http://www.munted.org.uk/programming/ramdisk.tar.bz2

Also, I'd appreciate some constructive advice on improving on my work
further. 

The original reason why I wrote this ramdisk was that I intended to use
variable sector sizes with it so I could test filesystems with it, as I
see that devices with 4k sectors could be on the market soon.

Thanks
Alex
-- 
http://www.munted.org.uk

Fearsome grindings.

                 reply	other threads:[~2009-03-04 10:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090304101929.62bba811@lithium.local.net \
    --to=alex.buell@munted.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox