Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757058Ab3FSP5j (ORCPT ); Wed, 19 Jun 2013 11:57:39 -0400 Received: from cobra.newdream.net ([66.33.216.30]:52011 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757010Ab3FSP5g (ORCPT ); Wed, 19 Jun 2013 11:57:36 -0400 Date: Wed, 19 Jun 2013 08:57:35 -0700 (PDT) From: Sage Weil X-X-Sender: sage@cobra.newdream.net To: majianpeng cc: ceph-devel , linux-kernel Subject: Re: [PATCH] ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL. In-Reply-To: <201306191512024406391@gmail.com> Message-ID: References: <201306191512024406391@gmail.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1178 Lines: 34 Applied, thanks! sage On Wed, 19 Jun 2013, majianpeng wrote: > Signed-off-by: Jianpeng Ma > --- > fs/ceph/addr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c > index 3e68ac1..25fa8b8 100644 > --- a/fs/ceph/addr.c > +++ b/fs/ceph/addr.c > @@ -677,8 +677,8 @@ static int ceph_writepages_start(struct address_space *mapping, > * integrity write (e.g., O_SYNC write or fsync()), or if our > * cap is being revoked. > */ > - do_sync = wbc->sync_mode == WB_SYNC_ALL; > - if (ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) > + if ((wbc->sync_mode == WB_SYNC_ALL) || > + ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) > do_sync = 1; > dout("writepages_start %p dosync=%d (mode=%s)\n", > inode, do_sync, > -- > 1.8.3.rc1.44.gb387c77 > N????y????b?????v?????{.n??????z??ay????????j???f????????????????:+v??????????zZ+??????"?!? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/