basic filesystem -- sb_bread stucks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi All
"I am writing for learning purpose a basic filesystem that just mounts
loads super block and root inode from disk."

Now i am facing a problem
when i do

mount -t myfs2 utils/nnn /mnt -o loop ----- it stucks here ....

then doing
ps -ax | grep -i mount    shows the    mount script is in  RL state
where R - is in run queue
L -- pages locked in memory


and i found by using printks that
when i read disk inode block through sb_bread(sb,MYFS_INODE_BLOCK)
then it happens....and sb_bread doesnt return back .

point to be noted is in my code snippet
just before reading inode block i read super block -- it works perfectly but --
as i read inode block it stucks ...

/*****************************

       if(!(bh=(struct buffer_head *)sb_bread(sb,MYFS_SUPER_
BLOCK)))
        {
           printk(KERN_ALERT"Cannot read superblock of MYFS \n");
           goto free;
        }
      
      
      printk(KERN_ALERT"i m going to read disk inode in block number %d",MYFS_INODE_BLOCK);
    /* IT Prints this message and stucks somewhere inside sb_bread*/
        if(!(bi=(struct buffer_head *)sb_bread(sb,MYFS_INODE_BLOCK)))
        {
          printk(KERN_ALERT"Cannot read inode clock  of MYFS \n");
          goto free;
        }



****************************/
i have tested through many ways -- in userspace it shows that inode was written perfectly ...
what can be this thing?
i checked all parameters of sb -- bdev,blocksize,blocknumber okay before sb_bread


any help will be obliging !!


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux