From patchwork Tue Apr 30 12:23:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2504351 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B2D53DF2F2 for ; Tue, 30 Apr 2013 12:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760539Ab3D3MXZ (ORCPT ); Tue, 30 Apr 2013 08:23:25 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:59242 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760529Ab3D3MXY (ORCPT ); Tue, 30 Apr 2013 08:23:24 -0400 Received: by mail-ie0-f180.google.com with SMTP id to1so474376ieb.39 for ; Tue, 30 Apr 2013 05:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=4WEItZd74U75DoC5iyRY2T5Fg3Dm1tJZfGKHgeX8ETE=; b=g5KTCsLTv7/CjNGspiyBQn71kZBCyIZy/dXsnKGg+iqSzMkCLakXSWKVjGm/2vWx0a i1dVd4G72QOfIDFPMfQkM0g9qIxIEARJa/4uiA/8z1ySxc6O9YOMqZLEUrjRkTy8XLJs eLb0UtnDG4NuG//NOSzZpzpE6GHS57ayK/MiLvF8kd58hDfhqTL+I8qRrGTglLAG6QbZ RDKmxAFmb56RkOrA8aZ60pQaWYinJuz11J9Vre5fmlh69ygTlb1pjgVAxGFdaVwijj93 dEkIu5pifAh7ENAURimqvQMLr8hNs1+roMK96HB5gfDHWDdUSsz1W/mpy5aIbGX+oEaw cnrA== X-Received: by 10.50.93.3 with SMTP id cq3mr5123210igb.70.1367324604125; Tue, 30 Apr 2013 05:23:24 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPSA id q3sm24403493igw.0.2013.04.30.05.23.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Apr 2013 05:23:20 -0700 (PDT) Message-ID: <517FB7B8.6060600@inktank.com> Date: Tue, 30 Apr 2013 07:23:20 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 1/3] rbd: fix up the layering warning message References: <517FB770.1070500@inktank.com> In-Reply-To: <517FB770.1070500@inktank.com> X-Gm-Message-State: ALoCoQmPzyFFvHm92FHBAjQ/kF2XL5nEgGppCCpJ/6dliRffEqHlNA1rdR29mu1RQ4Icr+RYOXNC Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org A warning gets spewed for any image being probed, including parent images. Set up a condition such that the warning message only gets printed for the image being mapped, not any of its parents. Also, I didn't like the way the warning ended up being so long. Make it a terse warning instead. People experimenting with layering will know what the message means. This is part of: http://tracker.ceph.com/issues/4867 Signed-off-by: Alex Elder --- drivers/block/rbd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) /* If the image supports fancy striping, get its parameters */ diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 8b30d83..176a3d7 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4624,8 +4624,15 @@ static int rbd_dev_v2_probe(struct rbd_device *rbd_dev) ret = rbd_dev_v2_parent_info(rbd_dev); if (ret) goto out_err; - rbd_warn(rbd_dev, "WARNING: kernel support for " - "layered rbd images is EXPERIMENTAL!"); + + /* + * Don't print a warning for parent images. We can + * tell this point because we won't know its pool + * name yet (just its pool id). + */ + if (rbd_dev->spec->pool_name) + rbd_warn(rbd_dev, "WARNING: kernel layering " + "is EXPERIMENTAL!"); }