Ejemplo n.º 1
0
int dm_table_any_congested(struct dm_table *t, int bdi_bits)
{
	struct list_head *d, *devices;
	int r = 0;

	devices = dm_table_get_devices(t);
	for (d = devices->next; d != devices; d = d->next) {
		struct dm_dev *dd = list_entry(d, struct dm_dev, list);
		request_queue_t *q = bdev_get_queue(dd->bdev);
		r |= bdi_congested(&q->backing_dev_info, bdi_bits);
	}

	return r;
}
Ejemplo n.º 2
0
Archivo: raid0.c Proyecto: mhei/linux
static int raid0_congested(struct mddev *mddev, int bits)
{
    struct r0conf *conf = mddev->private;
    struct md_rdev **devlist = conf->devlist;
    int raid_disks = conf->strip_zone[0].nb_dev;
    int i, ret = 0;

    for (i = 0; i < raid_disks && !ret ; i++) {
        struct request_queue *q = bdev_get_queue(devlist[i]->bdev);

        ret |= bdi_congested(&q->backing_dev_info, bits);
    }
    return ret;
}
Ejemplo n.º 3
0
Archivo: raid0.c Proyecto: 274914765/C
static int raid0_congested(void *data, int bits)
{
    mddev_t *mddev = data;
    raid0_conf_t *conf = mddev_to_conf(mddev);
    mdk_rdev_t **devlist = conf->strip_zone[0].dev;
    int i, ret = 0;

    for (i = 0; i < mddev->raid_disks && !ret ; i++) {
        struct request_queue *q = bdev_get_queue(devlist[i]->bdev);

        ret |= bdi_congested(&q->backing_dev_info, bits);
    }
    return ret;
}
Ejemplo n.º 4
0
static int multipath_congested(void *data, int bits)
{
	mddev_t *mddev = data;
	multipath_conf_t *conf = mddev_to_conf(mddev);
	int i, ret = 0;

	rcu_read_lock();
	for (i = 0; i < mddev->raid_disks ; i++) {
		mdk_rdev_t *rdev = rcu_dereference(conf->multipaths[i].rdev);
		if (rdev && !test_bit(Faulty, &rdev->flags)) {
			struct request_queue *q = bdev_get_queue(rdev->bdev);

			ret |= bdi_congested(&q->backing_dev_info, bits);
			/* Just like multipath_map, we just check the
			 * first available device
			 */
			break;
		}
	}
	rcu_read_unlock();
	return ret;
}