[dm-devel] Re: [PATCH] dm-rwlock.patch (Re: 2.6.4-rc1-mm1: queue-congestion-dm-implementation patch)
Miquel van Smoorenburg
miquels at cistron.nl
Tue Mar 9 10:51:05 UTC 2004
On Mon, 08 Mar 2004 14:43:14, Joe Thornber wrote:
> The patch below (applies to 2.6.4-rc2-mm1) is larger than your patch
> but I think the locking semantics are more intuitive.
>
> Thoughts ?
Ah, one more minor thing:
> @@ -563,15 +584,16 @@ static int dm_request(request_queue_t *q
> static int dm_any_congested(void *congested_data, int bdi_bits)
> {
> int r;
> - struct mapped_device *md = congested_data;
> + struct mapped_device *md = (struct mapped_device *) congested_data;
> + struct dm_table *map = dm_get_table(md);
>
> - read_lock(&md->maplock);
> - if (md->map == NULL || test_bit(DMF_BLOCK_IO, &md->flags))
> + if (!map || test_bit(DMF_BLOCK_IO, &md->flags))
> + /* FIXME: shouldn't suspended count a congested ? */
> r = bdi_bits;
I didn't test for DMF_SUSPENDED since it is only set when DMF_BLOCK_IO
is set too. And "r = bdi_bits" is the return value for "congested".
So I think that FIXME can be removed ?
Mike.
More information about the dm-devel
mailing list