lkml.org 
[lkml]   [2006]   [May]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 34/61] lock validator: special locking: bdev
FromArjan van de Ven <>
DateTue, 30 May 2006 12:45:00 +0200
On Mon, 2006-05-29 at 18:35 -0700, Andrew Morton wrote:
> On Mon, 29 May 2006 23:25:54 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> > From: Ingo Molnar <mingo@elte.hu>
> > 
> > teach special (recursive) locking code to the lock validator. Has no
> > effect on non-lockdep kernels.
> > 
> 
> There's no description here of the problem which is being worked around. 
> This leaves everyone in the dark.
> 
> > +static int
> > +blkdev_get_whole(struct block_device *bdev, mode_t mode, unsigned flags)
> > +{
> > +	/*
> > +	 * This crockload is due to bad choice of ->open() type.
> > +	 * It will go away.
> > +	 * For now, block device ->open() routine must _not_
> > +	 * examine anything in 'inode' argument except ->i_rdev.
> > +	 */
> > +	struct file fake_file = {};
> > +	struct dentry fake_dentry = {};
> > +	fake_file.f_mode = mode;
> > +	fake_file.f_flags = flags;
> > +	fake_file.f_dentry = &fake_dentry;
> > +	fake_dentry.d_inode = bdev->bd_inode;
> > +
> > +	return do_open(bdev, &fake_file, BD_MUTEX_WHOLE);
> > +}
> 
> "crock" is a decent description ;)
> 
> How long will this live, and what will the fix look like?

this btw is not new crock; the only new thing is the BD_MUTEX_WHOLE :)

-
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: 2006-05-30 12:48    [W:3.118 / U:0.350 seconds]
©2003-2008 Jasper Spaans