From patchwork Thu Jan 14 21:05:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick X-Patchwork-Id: 8035431 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 29E949F744 for ; Thu, 14 Jan 2016 21:08:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 627FC204EB for ; Thu, 14 Jan 2016 21:08:53 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85641204E4 for ; Thu, 14 Jan 2016 21:08:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0EL634S005187; Thu, 14 Jan 2016 16:06:04 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0EL617J018978 for ; Thu, 14 Jan 2016 16:06:01 -0500 Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0EL61Xs018144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Jan 2016 16:06:01 -0500 Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) by mx1.redhat.com (Postfix) with ESMTPS id 1D4AE8EFE6; Thu, 14 Jan 2016 21:06:01 +0000 (UTC) Received: by mail-io0-f194.google.com with SMTP id 77so18912668ioc.2; Thu, 14 Jan 2016 13:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=V3cSUcgFrAmX92rsV+EnnjIRxcHjtDdiEnbovR1gZP0=; b=K6zqNqb8D1TTTwyZC3G9vOGR7UDoNOveRzfJ+86i9mvwPziu/RoTAf1TH4idueyY3z OtSlt9Vrv51hP2Q0o2KRW0T/HHgNBo/nSq6C8HsN+41OS1ByaZzML19ozeTsILx8c1TP YmaJQpAqtYBz8br2PWubNlqXsj+EgS1W/aB+b8FiI4uiY1miWwh6kjaICdN4qSRef6BV QEOIcgEk2nuOrs+1AdZFBfeeyujgsRr7kFMmBexQ3AWZWHC96M0TL4QZfHntRepukuh+ 9PeJdhEvfGTRELyxOVNOfiAGBpLA/XErMfYRO8A/nOIxZgF1r0AwnPtdTf3S3R/f56V1 c47Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=V3cSUcgFrAmX92rsV+EnnjIRxcHjtDdiEnbovR1gZP0=; b=IXizfbw0MpMxoSMCXeNe52GbUfrbHQyLuFHZvlXbcNwF1k4qCDT0d+d/jOmSUhwFSo qrwC0IlrF/+RTkmD2fDyazdGWl2jBhNhClV9k3dzKB0gwlRdJYSEmY3v6IfKBBr+H2pk 9sN+7FlYmymW5nHQWW9bRUQB6NtVCGw8Qq/kwpXE39GoxZzKf0UA6q5Hj1XbSaWClacI ipV0rr3vg2QMoeye2iciAfyuTKzkcHya7t62eTDH/f+QY2rmGu5T5kny0qyOGFDQLMD7 IFZ/Ovxe0cd5X6L4H2Movz+xbxHRqxMuF2b359nfcVhkGyrjncQ2XwVGydt7I4HGXB26 tKxQ== X-Gm-Message-State: ALoCoQlJGFG8K98fX5PQms7mp4KKIzf4/XFNlyaHJpFqoQbYMkFzkhnMQ0xEibfPwcS6AE1vjGDQUhH2GKG8OaWiyPtjo9XuTQ== X-Received: by 10.107.3.154 with SMTP id e26mr6344490ioi.99.1452805560508; Thu, 14 Jan 2016 13:06:00 -0800 (PST) Received: from nick-System-Product-Name.hitronhub.home (CPEbc4dfb2691f3-CMbc4dfb2691f0.cpe.net.cable.rogers.com. [99.231.110.121]) by smtp.googlemail.com with ESMTPSA id f13sm3251312ioj.13.2016.01.14.13.05.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Jan 2016 13:05:59 -0800 (PST) From: Nicholas Krause To: agk@redhat.com Date: Thu, 14 Jan 2016 16:05:56 -0500 Message-Id: <1452805556-21972-1-git-send-email-xerofoify@gmail.com> X-RedHat-Spam-Score: -0.001 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.223.194 mail-io0-f194.google.com 209.85.223.194 mail-io0-f194.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.76 on 10.5.110.27 X-loop: dm-devel@redhat.com Cc: linux-raid@vger.kernel.org, dm-devel@redhat.com, neilb@suse.com, snitzer@redhat.com, linux-kernel@vger.kernel.org Subject: [dm-devel] [PATCH RESEND] md:Check if call to thaw_bdev fails in unlock_fs X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a check to the function unlock_fs to check if the call to thaw_bdev failed by returning a return code and if so print on the log level of KERN_CRIT that the thaw has failed on the passed device structure pointer's name before returnin immediately to this function's caller. Signed-off-by: Nicholas Krause --- drivers/md/dm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ab37ae1..20ccc36 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -3152,7 +3152,11 @@ static void unlock_fs(struct mapped_device *md) if (!test_bit(DMF_FROZEN, &md->flags)) return; - thaw_bdev(md->bdev, md->frozen_sb); + if (!thaw_bdev(md->bdev, md->frozen_sb)) { + pr_crit("Thaw failed on the file device %s\n", md->name); + return; + } + md->frozen_sb = NULL; clear_bit(DMF_FROZEN, &md->flags); }