lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 4 Sep 2006 15:32:28 +1000
From:	Neil Brown <neilb@...e.de>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 001 of 4] md: Define backing_dev_info.congested_fn for
 raid0 and linear

On Monday August 28, akpm@...l.org wrote:
> On Tue, 29 Aug 2006 15:39:24 +1000
> NeilBrown <neilb@...e.de> wrote:
> 
> > 
> > Each backing_dev needs to be able to report whether it is congested,
> > either by modulating BDI_*_congested in ->state, or by
> > defining a ->congested_fn.
> > md/raid did neither of these.  This patch add a congested_fn
> > which simply checks all component devices to see if they are
> > congested.
> > 
> > Signed-off-by: Neil Brown <neilb@...e.de>
> > 
> > +static int linear_congested(void *data, int bits)
> > +{
> > +	mddev_t *mddev = data;
> > +	linear_conf_t *conf = mddev_to_conf(mddev);
> > +	int i, ret = 0;
> > +
> > +	for (i = 0; i < mddev->raid_disks && !ret ; i++) {
> > +		request_queue_t *q = bdev_get_queue(conf->disks[i].rdev->bdev);
> > +		ret |= bdi_congested(&q->backing_dev_info, bits);
> 
> nit: `ret = ' would suffice here.
> 

Yeh.... I was looking at  linear_issue_flush, which aborts when
ret == 0, and dm_table_any_congested, which 'or's together the results
and combining to two.  And I kept changing my mind as to which way I
wanted to go for linear_congested et.al, and ended up going both ways
:-(
I hate indecision.  I think.  Well, probably I do.  Maybe.

NeilBrown

-- 
VGER BF report: U 0.5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ