From patchwork Tue Aug 9 14:42:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 9271389 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 131546075A for ; Tue, 9 Aug 2016 14:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 044C12810E for ; Tue, 9 Aug 2016 14:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC15E283F8; Tue, 9 Aug 2016 14:42:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90CFC2810E for ; Tue, 9 Aug 2016 14:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752181AbcHIOmb (ORCPT ); Tue, 9 Aug 2016 10:42:31 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:33686 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbcHIOmb (ORCPT ); Tue, 9 Aug 2016 10:42:31 -0400 Received: by mail-yw0-f195.google.com with SMTP id z8so599082ywa.0 for ; Tue, 09 Aug 2016 07:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=PELTYGH7ZJ1OtfSuC/uUZ2R5LKUDaYkQTr+ouaeAkPY=; b=IDHMa4ACIapPQliJ6NlDsXp/UKE82vSi3WlCWS3w3c4eJrFyOlnrY+lhs2LKf4G0/0 ooHPlAIdupIsFkDZDYy44VcBnxiBWJNP853cGMcIhGOKBMIlVqn4TnAqpEYEXXm3+IU6 X4ida+Rd9g9BCOL0iQdOC1O41P8p0I2b8hFymwHMnujg/1wHMJlGsxTQ4h/VAdpD9BZP zJgCZRzuPuAAgGi6LLvCHWnaQ0MT2CJyKa5YuWKihykAFHXJbE9JmiHm0p/zsfaF2R1x w5cjcrxHsD2e7Ya+xQqjgLxuM2EPxTtPSbAvUYpEth51O9kzzZj7ZCL9/qgWcZwpmJad vHxg== 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=PELTYGH7ZJ1OtfSuC/uUZ2R5LKUDaYkQTr+ouaeAkPY=; b=lDXcYqDZaJfFVGvsd5w7cAMqm5lmz8NSTa8nF821lKSKYCOLax0js9NaFd2h0DW8y3 quT79i3z3RuW6vdm09TqvVYs3SXshtCEgLQxJlQH8Q/KxsbZ/MjUT27Hca32EjQm1Xca y3Ayc6q7jT5oeHi2gSjAvrpjuZGvIHxUqmbC3cY9WmFmpBK2HRuMidk25lJ1kUGPd0v5 U6CHvSOprkSAa1h4hkRHHvM2TfZVK5OegY08Bu/5PaRyMMfq2YNwNHxC+Pv3ZjsUi6zg 7tLSIf1BnEMcLlPT1jFYmnY2xsWjJMGZJaHwMGPTiCD6CW0GYKlb2yO5LL+IGhhEAMTf fH6g== X-Gm-Message-State: AEkoouudkBHEF8VSVo1eK9gqn6aB5c+5DIom0n9yOLpm7M+OtyL0v5kXch1+EgAR5caWow== X-Received: by 10.129.163.83 with SMTP id a80mr70371524ywh.174.1470753750360; Tue, 09 Aug 2016 07:42:30 -0700 (PDT) Received: from dhcp-1-133.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id x205sm16202369ywx.4.2016.08.09.07.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2016 07:42:29 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Alex Elder Subject: [PATCH] rbd: nuke the 32-bit pool id check Date: Tue, 9 Aug 2016 16:42:17 +0200 Message-Id: <1470753737-5729-1-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ceph_file_layout::pool_id is now s64. rbd_add_get_pool_id() and ceph_pg_poolid_by_name() both return an int, so it's bogus anyway. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- drivers/block/rbd.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 07668a6f0607..6c6519f6492a 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -5337,15 +5337,6 @@ static ssize_t do_rbd_add(struct bus_type *bus, } spec->pool_id = (u64)rc; - /* The ceph file layout needs to fit pool id in 32 bits */ - - if (spec->pool_id > (u64)U32_MAX) { - rbd_warn(NULL, "pool id too large (%llu > %u)", - (unsigned long long)spec->pool_id, U32_MAX); - rc = -EIO; - goto err_out_client; - } - rbd_dev = rbd_dev_create(rbdc, spec, rbd_opts); if (!rbd_dev) { rc = -ENOMEM;