From patchwork Sat Apr 27 19:39:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2497421 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 2CCE6DF23A for ; Sat, 27 Apr 2013 19:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754290Ab3D0Tj5 (ORCPT ); Sat, 27 Apr 2013 15:39:57 -0400 Received: from mail-ie0-f181.google.com ([209.85.223.181]:33822 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753986Ab3D0Tj5 (ORCPT ); Sat, 27 Apr 2013 15:39:57 -0400 Received: by mail-ie0-f181.google.com with SMTP id tp5so5960183ieb.40 for ; Sat, 27 Apr 2013 12:39:56 -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=JMx+OlhwEFw/sdK0ZKRuggcPKY2fgPL7QCJ5UuKqSwY=; b=LjNDzY92XlkP7lC6MR+bLbBXCF5GJKcfv0hKwx0/IfsP02O5zgaw9+LpJx25zGi49r Rg6FDRqE2ZtajjV7Y+qFhCL/BXoh6rSbwFT6911wjb4GA5P7s+dUoP9g/KO1M2K3RIdT joAcPcSosv8ykYjz9bLwGyHORz+4MelNKmUdTdRerSsOeeCFh9ynIImNd9Dx2K16LbGb Ea23Wjcb0B20uXyZWwuvjDkAQKjS9dtP614aURTo1dURlxn6R1ua47CG06BVJ8x53Umm ylXuNdaXdzTuLno66q92+XeHb1W0QABZLaLJJ0qPj3rAXh3XO5ynbS1rEMQS+KFhpABN JrmQ== X-Received: by 10.50.78.37 with SMTP id y5mr4552664igw.43.1367091596665; Sat, 27 Apr 2013 12:39:56 -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 d4sm9290353igc.3.2013.04.27.12.39.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Apr 2013 12:39:55 -0700 (PDT) Message-ID: <517C298B.6050801@inktank.com> Date: Sat, 27 Apr 2013 14:39:55 -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 4/5] rbd: don't bother checking whether order changes References: <517C2914.8030400@inktank.com> In-Reply-To: <517C2914.8030400@inktank.com> X-Gm-Message-State: ALoCoQljNNVQvJlEGr0XsSvWjF5xqKTQihlB1UPprvAw03aBrax0L56qNHt4UBcg2XXobFqIJw1K Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org When a format 2 image is refreshed, code is in place to verify that the object order never changes from what it was originally. This relies on the fact that the refresh will occur *after* an initial load of information about the image. An upcoming patch makes it possible for the refresh to occur first, so we can no longer make this order check. The order really can't ever change anyway--this was just a sanity check. So get rid of it. Signed-off-by: Alex Elder --- drivers/block/rbd.c | 8 -------- 1 file changed, 8 deletions(-) ret = rbd_dev_v2_snap_context(rbd_dev, hver); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index d7a36d1..1832b6a 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4015,20 +4015,12 @@ static char *rbd_dev_snap_info(struct rbd_device *rbd_dev, u32 which, static int rbd_dev_v2_refresh(struct rbd_device *rbd_dev, u64 *hver) { int ret; - __u8 obj_order; down_write(&rbd_dev->header_rwsem); - /* Grab old order first, to see if it changes */ - - obj_order = rbd_dev->header.obj_order, ret = rbd_dev_v2_image_size(rbd_dev); if (ret) goto out; - if (rbd_dev->header.obj_order != obj_order) { - ret = -EIO; - goto out; - } rbd_update_mapping_size(rbd_dev);