From patchwork Thu Jul 19 12:34:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1216421 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 DC36BE006E for ; Thu, 19 Jul 2012 12:34:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299Ab2GSMe6 (ORCPT ); Thu, 19 Jul 2012 08:34:58 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:46515 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894Ab2GSMe5 (ORCPT ); Thu, 19 Jul 2012 08:34:57 -0400 Received: by gglu4 with SMTP id u4so2680725ggl.19 for ; Thu, 19 Jul 2012 05:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=RKKxzclnLrpl4KuROHzT1Ze51MNaqM87ehby2uzEWTs=; b=FW3F4AbrJeKGa0CEx7YnZLbn/t5jR/d7K6aakWTriGjmJ8UHg/CkBL+Bqbs4xbBeu6 ACY4In7GKZ0VSaSZFSxfjkGv1k35qfGVkht4RQBRqsT1E16bHYFPNmQISmXuYwrye8Na UYXRLGkI9ts3JRKedzUboPIlKzF9dc+0D2gpVy39nrStT6GdX9KGZaCnI7keoGMfEGUb oHkt6Xug6Gdc2YBWRyxZknwhVtqF920fCcDrZHW5yS8E/k5enGObRCslwxC/sVmZXciX JLzlTnlHIA9fmhcsVSN31SYYVqVePAjwBQEe+2gWnkR4mVgvA6JYNnf6oewXJLa8S883 4aIA== Received: by 10.50.6.197 with SMTP id d5mr1178125iga.44.1342701296704; Thu, 19 Jul 2012 05:34: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 ESMTPS id qo3sm3505935igc.8.2012.07.19.05.34.55 (version=SSLv3 cipher=OTHER); Thu, 19 Jul 2012 05:34:56 -0700 (PDT) Message-ID: <5007FEEF.20809@inktank.com> Date: Thu, 19 Jul 2012 07:34:55 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org" Subject: [PATCH 4/6] rbd: set image size when header is updated References: <5007FDEA.9010605@inktank.com> In-Reply-To: <5007FDEA.9010605@inktank.com> X-Gm-Message-State: ALoCoQmJnPqQSdizemvlVBEAYCbiccTc/QsiqmM3YQ6Ud4oLh4Bn+atuChPeBub5sWmIJ3tOn4Ke Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org The image may have been resized. Signed-off-by: Josh Durgin Reviewed-by: Alex Elder --- drivers/block/rbd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) rbd_dev->header.snap_names = h.snap_names; diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 9c3a1db..a6bbda2 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1746,6 +1746,7 @@ static int __rbd_refresh_header(struct rbd_device *rbd_dev) kfree(rbd_dev->header.snap_names); kfree(rbd_dev->header.snapc); + rbd_dev->header.image_size = h.image_size; rbd_dev->header.total_snaps = h.total_snaps; rbd_dev->header.snapc = h.snapc;