lkml.org 
[lkml]   [2001]   [Dec]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 21 Dec 2001 10:38:54 +0900
FromTachino Nobuhiro <>
SubjectRe: ramdisk corruption problems - was: RE: pivot_root and initrd kern el panic woes
At Thu, 20 Dec 2001 11:46:23 -0800,
Linus Torvalds wrote:
> 
> The problem is that having buffers doesn't necessarily always mean that
> they are valid, nor that _all_ of them are valid.

  If following sequence occurs, ramdisk_readpage() may clear the valid buffer
data. I'm not sure whether this really occurs, but if it does,
I think lock_buffer()/unlock_buffer() may be required.


	CPU1					CPU2
---------------------------------------------------------------------------
	call ext2_alloc_branch()		call ramdisk_readpage()
	bh = getblk();
	lock_buffer(bh);

	write data to bh.
						ramdisk_readpage()
						if (!buffer_uptodate(bh))
							do memset()
	mark_buffer_uptodate()
	unlock_buffer(bh);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:14    [W:0.493 / U:0.130 seconds]
©2003-2008 Jasper Spaans