From patchwork Fri May 29 17:38:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 11579417 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8879739 for ; Fri, 29 May 2020 17:39:59 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83B3F2065F for ; Fri, 29 May 2020 17:39:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NxCSDbIX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83B3F2065F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590773998; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8W8eZhy/TPqNv4W24CMgHsHKfIeHSXdMy9E38HiAw+Y=; b=NxCSDbIXXT5vY1e4sJnDK2TYlhp3XUZm57sAfQ2QW8yUuKww1fbih0E9mOPqry8pz+EiPE 39NnEze/FosmXQJEU62eyA7qDpOr4DQap8haqAlL150N5eYYjqpOVQMxE4NauZfadggGq5 roL+ihzMdXx5j4zGN4dPASZHMBBgPAw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-rtHDNX2vPDKQtIFLYL2Vnw-1; Fri, 29 May 2020 13:39:55 -0400 X-MC-Unique: rtHDNX2vPDKQtIFLYL2Vnw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08623835B69; Fri, 29 May 2020 17:39:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2D337A8D3; Fri, 29 May 2020 17:39:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BC2271806B0B; Fri, 29 May 2020 17:39:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04THdPIX004843 for ; Fri, 29 May 2020 13:39:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 987A420267F2; Fri, 29 May 2020 17:39:25 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52F392029F6F for ; Fri, 29 May 2020 17:39:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4579782884D for ; Fri, 29 May 2020 17:39:21 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-180-i4wUDOvPMUm73QEAHKvQvw-1; Fri, 29 May 2020 13:39:17 -0400 X-MC-Unique: i4wUDOvPMUm73QEAHKvQvw-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 79E96B13D; Fri, 29 May 2020 17:39:15 +0000 (UTC) From: Hannes Reinecke To: Mike Snitzer Date: Fri, 29 May 2020 19:38:56 +0200 Message-Id: <20200529173907.40529-4-hare@suse.de> In-Reply-To: <20200529173907.40529-1-hare@suse.de> References: <20200529173907.40529-1-hare@suse.de> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: dm-devel@redhat.com Cc: Damien LeMoal , dm-devel@redhat.com Subject: [dm-devel] [PATCH 03/14] dm-zoned: improve logging messages for reclaim X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Instead of just reporting the errno this patch adds some more verbose debugging message in the reclaim path. Signed-off-by: Hannes Reinecke Reviewed-by: Damien Le Moal --- drivers/md/dm-zoned-reclaim.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c index 571bc1d41bab..fd4d47dfcea1 100644 --- a/drivers/md/dm-zoned-reclaim.c +++ b/drivers/md/dm-zoned-reclaim.c @@ -371,8 +371,11 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc) /* Get a data zone */ dzone = dmz_get_zone_for_reclaim(zmd, dmz_target_idle(zrc)); - if (!dzone) + if (!dzone) { + DMDEBUG("(%s): No zone found to reclaim", + dmz_metadata_label(zmd)); return -EBUSY; + } start = jiffies; if (dmz_is_cache(dzone) || dmz_is_rnd(dzone)) { @@ -416,6 +419,12 @@ static int dmz_do_reclaim(struct dmz_reclaim *zrc) } out: if (ret) { + if (ret == -EINTR) + DMDEBUG("(%s): reclaim zone %u interrupted", + dmz_metadata_label(zmd), rzone->id); + else + DMDEBUG("(%s): Failed to reclaim zone %u, err %d", + dmz_metadata_label(zmd), rzone->id, ret); dmz_unlock_zone_reclaim(dzone); return ret; } @@ -519,8 +528,6 @@ static void dmz_reclaim_work(struct work_struct *work) ret = dmz_do_reclaim(zrc); if (ret && ret != -EINTR) { - DMDEBUG("(%s): Reclaim error %d", - dmz_metadata_label(zmd), ret); if (!dmz_check_dev(zmd)) return; }