From patchwork Sun Apr 21 21:54:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2469621 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 5B694DF230 for ; Sun, 21 Apr 2013 21:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752889Ab3DUVy7 (ORCPT ); Sun, 21 Apr 2013 17:54:59 -0400 Received: from mail-ia0-f176.google.com ([209.85.210.176]:40161 "EHLO mail-ia0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752850Ab3DUVy7 (ORCPT ); Sun, 21 Apr 2013 17:54:59 -0400 Received: by mail-ia0-f176.google.com with SMTP id i9so4805385iad.21 for ; Sun, 21 Apr 2013 14:54:58 -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 :content-type:content-transfer-encoding:x-gm-message-state; bh=ywcnENpYgW3mYZMJOa1E3wyM/mGDn2tZrhuZ29idTh0=; b=h0iwosE08bqrdosmlZ0Z9eB/0hv8+WeEJTAtgK9QX4y4AK/HPAsc3MW+o64peluDf3 a8KVjjeAO8XwNGf4gIQBifP9A0Kvose04jaZqCKKHQkUo8UXuAgnaAdoym6tFmAslmSe nkT8x0wR3H/iFQZ6zjl+Sszy96H9p7O9lZXzP8RZEQK2ZCEj340kVj++7C4MmvJ+U08M lwW4+69ixeZxMEJFSflibKKAj+akn0d1gq0jnlbsYZOmR1KnVz8Owhuz51czJSZAkk5f 3TK7NlLOlQT5nw1NwrXYRLD18h+a0UUh/1cJVEzPMkOnhshTl8EBBXx5nhwVfZ9oa5Ii 1Wow== X-Received: by 10.42.151.3 with SMTP id c3mr11868454icw.27.1366581298733; Sun, 21 Apr 2013 14:54:58 -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 ESMTPS id fl5sm12664143igb.9.2013.04.21.14.54.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Apr 2013 14:54:58 -0700 (PDT) Message-ID: <51746031.1030109@inktank.com> Date: Sun, 21 Apr 2013 16:54:57 -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] rbd: activate support for layered images X-Gm-Message-State: ALoCoQmDd1g+AYUPNQINfcXYpg6neRNYP1evhMm4tDb59Sn7BToUFlvSVcy6QJmhgVfyIEwuvo11 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org (This patch and the next one are available in the "review/wip-enable-layering" branch of the ceph-client git respository.) Now that we have most everything in place to support layered rbd images, enable support for them in the kernel client. Issue a warning to the log that the support is considered experimental whenever a format 2 layered image is mapped. Note that we also have to claim to support the STRIPINGV2 feature, due to a mistake in the way the rbd CLI set up those flags. This feature can work if it has the right parameters, and safeguards have been put in place to reject those images that do not have compatible parameters. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- drivers/block/rbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) /* If the image supports fancy striping, get its parameters */ diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d23cc8f..1ddbcdc 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -80,7 +80,7 @@ /* Features supported by this (client software) implementation. */ -#define RBD_FEATURES_SUPPORTED (0) +#define RBD_FEATURES_SUPPORTED (RBD_FEATURES_ALL) /* * An RBD device name will be "rbd#", where the "rbd" comes from @@ -4723,6 +4723,8 @@ 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: layered rbd image support " + "is EXPERIMENTAL!"); }