From patchwork Thu Nov 1 09:03:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 1683591 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 058E6DF264 for ; Thu, 1 Nov 2012 09:03:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758040Ab2KAJDn (ORCPT ); Thu, 1 Nov 2012 05:03:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:13445 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756415Ab2KAJDl (ORCPT ); Thu, 1 Nov 2012 05:03:41 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 01 Nov 2012 02:03:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,692,1344236400"; d="scan'208";a="241265463" Received: from zyan5-mobl.sh.intel.com ([10.239.36.138]) by fmsmga001.fm.intel.com with ESMTP; 01 Nov 2012 02:03:39 -0700 From: "Yan, Zheng" To: sage@inktank.com, ceph-devel@vger.kernel.org Cc: "Yan, Zheng" Subject: [PATCH 1/2] ceph: Don't update i_max_size when handling non-auth cap Date: Thu, 1 Nov 2012 17:03:35 +0800 Message-Id: <1351760618-19874-1-git-send-email-zheng.z.yan@intel.com> X-Mailer: git-send-email 1.7.11.7 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: "Yan, Zheng" The cap from non-auth mds doesn't have a meaningful max_size value. Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 3251e9c..c633d1d 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2388,7 +2388,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, &atime); /* max size increase? */ - if (max_size != ci->i_max_size) { + if (ci->i_auth_cap == cap && max_size != ci->i_max_size) { dout("max_size %lld -> %llu\n", ci->i_max_size, max_size); ci->i_max_size = max_size; if (max_size >= ci->i_wanted_max_size) {