[dm-devel] xfstests generic/347 seems unhappy on todays block for-next tree

Jens Axboe axboe at kernel.dk
Mon Dec 10 22:36:53 UTC 2018


On 12/10/18 3:09 PM, Jens Axboe wrote:
> On 12/10/18 3:00 PM, Jens Axboe wrote:
>> On 12/10/18 2:53 PM, Christoph Hellwig wrote:
>>> On Mon, Dec 10, 2018 at 02:39:39PM -0700, Jens Axboe wrote:
>>>> On 12/10/18 2:37 PM, Christoph Hellwig wrote:
>>>>> This test is described as:
>>>>>
>>>>> # Test very basic thin device usage, exhaustion, and growth
>>>>
>>>> Does that tree have:
>>>>
>>>> commit c616cbee97aed4bc6178f148a7240206dcdb85a6
>>>> Author: Jens Axboe <axboe at kernel.dk>
>>>> Date:   Thu Dec 6 22:17:44 2018 -0700
>>>>
>>>>     blk-mq: punt failed direct issue to dispatch list
>>>>
>>>> ?
>>>
>>> yes.
>>>
>>> The latest commit is 6f75723190d88e1319bea623bfe0292bf3917965
>>
>> Reproduces here, guessing it's the inflight counters... Trying without.
> 
> Yep, works without the inflight changes. Deferring to Mike to sort
> this one out.

I think this should work much better...


diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 70568f8b6c53..1389a467ab63 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -650,14 +650,14 @@ static bool md_in_flight(struct mapped_device *md)
 {
 	int cpu;
 	struct hd_struct *part = &dm_disk(md)->part0;
+	long sum = 0;
 
 	for_each_possible_cpu(cpu) {
-		if (part_stat_local_read_cpu(part, in_flight[0], cpu) ||
-		    part_stat_local_read_cpu(part, in_flight[1], cpu))
-			return true;
+		sum += part_stat_local_read_cpu(part, in_flight[0], cpu);
+		sum += part_stat_local_read_cpu(part, in_flight[1], cpu);
 	}
 
-	return false;
+	return sum != 0;
 }
 
 static void start_io_acct(struct dm_io *io)

-- 
Jens Axboe




More information about the dm-devel mailing list