lkml.org 
[lkml]   [2012]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/16] blkcg: don't allow or retain configuration of missing devices
On Tue, Jan 24, 2012 at 10:42:24AM -0500, Vivek Goyal wrote:
> On Mon, Jan 23, 2012 at 03:09:51PM -0800, Tejun Heo wrote:
> > + disk = get_gendisk(dev, &part);
> > +
> > + if ((!disk || part) && temp) {
> > + ret = -ENODEV;
> > + goto out;
> > + }
> > +
> > + rcu_read_lock();
> > +
> > + if (disk && !part) {
> > + spin_lock_irq(disk->queue->queue_lock);
> > + blkg = blkg_lookup_create(blkcg, disk->queue, plid);
> > + spin_unlock_irq(disk->queue->queue_lock);
>
> If queue is in bypass mode, is group creation and linking allowed when
> somebody is trying to set per device rules. (/me is thinking if there are
> any potential races between elevator switch and rule setting in cgroup).

Yeap, there is. Nice catch. blkg_lookup_create() should be testing
blk_queue_bypass() instead of blk_queue_dead() and parse_and_set
should probably retry after a bit. Will update.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-01-24 16:55    [W:0.069 / U:2.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site