Re: basic filesystem -- sb_bread stucks

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

 



NIdhi,


On Wed, Sep 2, 2009 at 2:45 PM, nidhi mittal
hada<nidhimittal19@xxxxxxxxx> 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
>

Can you provide the complete sources, so that it becomes easier to
understand the problem?
Also, I would suggest your to list out the problems in points.

>
> any help will be obliging !!
>



-- 
Regards,
Sandeep.





 	
“To learn is to change. Education is a process that changes the learner.”

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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