Hi,
I was trying to mount my test filesystem module on the loopback using
the command
#mount -t myfs /tmp/testfs /tmp/mount -o loop
ioctl: LOOP_CLR_FD: Device or resource busy
mount: permission denied
However it always fails with the above error. I am trying this in an
UML environment and have the loop support enabled. While trying to
debug the issue I saw that the value of bdev pointer in the function
bd_claim is different when it returns back to get_sb_bdev (See the gdb
trace below). Values of interest are marked with <<== identifier. Any
suggestions why this could be happening.
bd_claim (bdev=0x907ba38, holder=0x28800d60) at fs/block_dev.c:660
660 {
(gdb) n
665 if (bdev->bd_holder == holder)
(gdb) p bdev->bd_holder
$10 = (void *) 0x0
(gdb) n
667 else if (bdev->bd_holder != NULL)
(gdb)
669 else if (bdev->bd_contains == bdev)
(gdb)
685 bdev->bd_contains->bd_holders ++;
(gdb) p bdev->bd_contains
$11 = (struct block_device *) 0x907ba38
(gdb) p bdev
$12 = (struct block_device *) 0x907ba38
<<==== value different here
(gdb) n
687 bdev->bd_holders++;
(gdb)
686 bdev->bd_contains->bd_holder = bd_claim;
(gdb)
688 bdev->bd_holder = holder;
(gdb)
692 }
(gdb)
open_bdev_excl (path=0x27744000 "/dev/loop0", flags=0,
holder=0x28800d60) at fs/block_dev.c:1437
1437 if (error)
(gdb)
1445 }
(gdb)
get_sb_bdev (fs_type=0x28800d60, flags=0, dev_name=0x27744000
"/dev/loop0", data=0x27743000, fill_super=0x288000d4, mnt=0x9082918)
at fs/super.c:739
739 if (IS_ERR(bdev))
(gdb) p *bdev
$13 = {bd_dev = 151551040, bd_inode = 0x10, bd_openers = 32, bd_mutex
= {count = {counter = 0}, wait_lock = {
raw_lock = {<No data fields>}}, wait_list = {next = 0x38, prev =
0x4924925}}, bd_mount_sem = {count = {counter = 338944},
sleepers = 67, wait = {lock = {raw_lock = {<No data fields>}},
task_list = {next = 0x0, prev = 0x0}}}, bd_inodes = {next = 0x1,
prev = 0x20}, bd_holder = 0x0, bd_holders = 296, bd_holder_list =
{next = 0x0, prev = 0x0}, bd_contains = 0x81cacb8,
bd_block_size = 136310244, bd_part = 0x8803164, bd_part_count =
1635, bd_invalidated = 1723, bd_disk = 0x668, bd_list = {next = 0x19,
prev = 0x0}, bd_inode_backing_dev_info = 0x0, bd_private = 0}
(gdb) p error
$14 = <value optimized out>
(gdb) p bdev
$15 = (struct block_device *) 0x8803080 <<====== value
different here..
(gdb) n
Thanks in advance
On Dec 23, 2007 4:06 AM, Jeff Dike <[EMAIL PROTECTED]> wrote:
> On Sun, Dec 23, 2007 at 12:36:02AM +0530, Manish Katiyar wrote:
> > Why is it not able to allocate memory ??/
>
> The obvious reason - there is no memory to allocate and you gave it no
> swap? So give it more memory or some swap space.
>
>
> Jeff
>
> --
> Work email - jdike at linux dot intel dot com
>
--
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user