From patchwork Thu Nov 13 20:22:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 5300641 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AF2CA9F2ED for ; Thu, 13 Nov 2014 20:22:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9919A2015D for ; Thu, 13 Nov 2014 20:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CB6D2017D for ; Thu, 13 Nov 2014 20:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934312AbaKMUWJ (ORCPT ); Thu, 13 Nov 2014 15:22:09 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:46659 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934061AbaKMUWG (ORCPT ); Thu, 13 Nov 2014 15:22:06 -0500 Received: by mail-qc0-f176.google.com with SMTP id x3so11832396qcv.35 for ; Thu, 13 Nov 2014 12:22:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc :content-type; bh=mJc5FfWFlc+FyRPsehPUAlseVOs/RBXmR6AIVjIhaZA=; b=Xbe4FSUvq8ZAqh483xXaEBQZEar5IG41awfc527k/P9wN1eAEPFIJjFvXrSnhCvfpE PR508qXkF8HGM2PB70Aw1V3tVs5nKsdVEdN1ZyhFTN3/trHvMRdlDTqpntWKKYt+XD2I pVmSwTEGiyJ4gN5u4JddJuAIOHhdW1TG+NBkZIHMlRoFQOBO2wpCD7gMZBmN+oqx+K5+ vyxKKOAb2E2W3mVtOLh1EGt9U+fDkhC812KzJD2+Vkl6GfFBrwR5krE8plEzmdKVuhMF h82omS40ZzM6isbVeV8yab3ExUY/gPKzzeQCL7UqTPUAAGbCT8kq872JmY/RlQG1P1Q3 QqpQ== X-Gm-Message-State: ALoCoQllXCsGkyyUduGWrZjBQAK5tB2HNpdTZRINTaetXEmIqYZLsW4bH7bNazdocFukmFAyFt1a MIME-Version: 1.0 X-Received: by 10.224.111.201 with SMTP id t9mr5795990qap.44.1415910126113; Thu, 13 Nov 2014 12:22:06 -0800 (PST) Received: by 10.140.93.110 with HTTP; Thu, 13 Nov 2014 12:22:06 -0800 (PST) Date: Fri, 14 Nov 2014 00:22:06 +0400 Message-ID: Subject: Re: [PATCH] ceph: fix flush tid comparision From: Ilya Dryomov To: "Yan, Zheng" Cc: Ceph Development Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch wasn't posted on ceph-devel, posting.. From 2f0351fb79e046eddcfe5f4ac7c293dfc78545e2 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 22 Oct 2014 17:13:26 -0700 Subject: [PATCH] ceph: fix flush tid comparision TID of cap flush ack is 64 bits, but ceph_inode_info::flushing_cap_tid is only 16 bits. 16 bits should be plenty to let the cap flush updates pipeline appropriately, but we need to cast in the proper direction when comparing these differently-sized versions. So downcast the 64-bits one to 16 bits. Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dout("handle_cap_flush_ack inode %p mds%d seq %d on %s cleaned %s," Reviewed-by: Ilya Dryomov Thanks, Ilya -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 659f2ea9e6f7..cefca661464b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2638,7 +2638,7 @@ static void handle_cap_flush_ack(struct inode *inode, u64 flush_tid, for (i = 0; i < CEPH_CAP_BITS; i++) if ((dirty & (1 << i)) && - flush_tid == ci->i_cap_flush_tid[i]) + (u16)flush_tid == ci->i_cap_flush_tid[i]) cleaned |= 1 << i;