On Wed, Sep 2, 2009 at 2:45 PM, nidhi mittal hada
<[email protected]>wrote:
>
> 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 !!
>
>
--
Thanks & Regards
Nidhi Mittal Hada