Re: __bread freezes for physical device.

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

 



Hi Thomas and everyone else,

So here is a little lesson I learnt while solving this problem. If you are relying on buffer caches for input/output or in other words you are in love with the __bread(bdev, block, size) function then be sure to set the value of bdev->bd_inode->i_blkbits to  log (size)  before calling __bread(). Obviously, the log I am talking about here is log to the base 2. If you do not do so, then the kernel may enter an infinite loop.

wish you happy hacking and a splendid new year!

- Abhishek

On 12/30/05, Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote:
Hi,

Abhishek Gupta wrote:

> I am having trouble in using the block cache apis at the driver level. I am
> writing a new radix tree target for LVM and for that I need to cache metadata
> blocks at the LVM layer. For these purposes I am using the __bread() function.
> The problem is that it works perfectly with loopback devices but the moment I
> try to use __bread() on an actual physical device, the whole machine freezes.
> Has anyone had this trouble before. I would really appreciate any help in this
> regard.

Is the code available somewhere ? Did you check the output of Sysrq-t ?

Sincerly,

Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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