From patchwork Tue Sep 3 23:11:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milosz Tanski X-Patchwork-Id: 2853440 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 5BF759F495 for ; Tue, 3 Sep 2013 23:11:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8913C2041D for ; Tue, 3 Sep 2013 23:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9AAF120362 for ; Tue, 3 Sep 2013 23:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933253Ab3ICXLY (ORCPT ); Tue, 3 Sep 2013 19:11:24 -0400 Received: from mail-qc0-f173.google.com ([209.85.216.173]:43860 "EHLO mail-qc0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933154Ab3ICXLV (ORCPT ); Tue, 3 Sep 2013 19:11:21 -0400 Received: by mail-qc0-f173.google.com with SMTP id c3so1633410qcv.32 for ; Tue, 03 Sep 2013 16:11:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=cRIIzMQCmE4qv1GRHieAnOwv5rsypaar9nNYY4UHuYk=; b=bIK9xKMzaRfhDs/jYptDWx2ndUVrvHFoMgSEAammMmsO+pU210A2Q/1yQqRpzgTW0n mZx+eBhHIG369p8xmyEE3C1O60ochrILgyvusP9xejoHsYxDSIBcyNm6Rls6GDncnlB+ eQ7v3M/dMYhoZxH7r4gAhlcaCMAUDqZ19KmX9HwhvV/dMl8SegJMy6TN+XGQc8wtayAm tPml48k2ojD3b/JJv+tg8gvMMR0wiiIdJtpdUc1WNOMp/0Qex1NlcVeKvgNeTbeo3h79 eLJPZeGEtY8PnhJXR0CPith6av7wUp3eenRD8Qct9kOSmfxLmh8pMmhrepOM7hcwH9Pn pPsg== X-Gm-Message-State: ALoCoQkS3+8+zsb42UnGrQb4jNYQ9PWrrrYRji3xUBuIYlr0UvtceqjffvnbphHFKUSJpnYc1QXb X-Received: by 10.49.130.132 with SMTP id oe4mr14266330qeb.86.1378249881012; Tue, 03 Sep 2013 16:11:21 -0700 (PDT) Received: from gmail.com ([69.193.178.202]) by mx.google.com with ESMTPSA id z10sm29318440qal.9.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Sep 2013 16:11:20 -0700 (PDT) Date: Tue, 3 Sep 2013 19:11:17 -0400 From: Milosz Tanski To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, zheng.z.yan@intel.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ceph: page still marked private_2 Message-ID: <7f6fc6d08d2e2610646d7c99c4afeb917eb41916.1378249347.git.milosz@adfin.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Previous patch that allowed us to cleanup most of the issues with pages marked as private_2 when calling ceph_readpages. However, there seams to be a case in the error case clean up in start read that still trigers this from time to time. I've only seen this one a couple times. BUG: Bad page state in process petabucket pfn:335b82 page:ffffea000cd6e080 count:0 mapcount:0 mapping: (null) index:0x0 page flags: 0x200000000001000(private_2) Call Trace: [] dump_stack+0x46/0x58 [] bad_page+0xc7/0x120 [] free_pages_prepare+0x10e/0x120 [] free_hot_cold_page+0x40/0x160 [] __put_single_page+0x27/0x30 [] put_page+0x25/0x40 [] ceph_readpages+0x2e9/0x6f0 [ceph] [] __do_page_cache_readahead+0x1af/0x260 Signed-off-by: Milosz Tanski --- fs/ceph/addr.c | 1 + fs/ceph/cache.h | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1fda9cf..6df8bd4 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -336,6 +336,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) page->index); if (add_to_page_cache_lru(page, &inode->i_data, page->index, GFP_NOFS)) { + ceph_fscache_uncache_page(inode, page); page_cache_release(page); dout("start_read %p add_to_page_cache failed %p\n", inode, page); diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index fb326fd..bf48695 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph/cache.h @@ -51,6 +51,13 @@ static inline void ceph_fscache_invalidate(struct inode *inode) fscache_invalidate(ceph_inode(inode)->fscache); } +static inline void ceph_fscache_uncache_page(struct inode *inode, + struct page *page) +{ + struct ceph_inode_info *ci = ceph_inode(inode); + return fscache_uncache_page(ci->fscache, page); +} + static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) { struct inode* inode = page->mapping->host; @@ -94,7 +101,8 @@ static inline void ceph_fscache_register_inode_cookie(struct ceph_fs_client* par { } -static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) +static inline void ceph_fscache_uncache_page(struct inode *inode, + struct page *pages) { } @@ -126,6 +134,10 @@ static inline void ceph_invalidate_fscache_page(struct inode *inode, { } +static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) +{ +} + static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) { return 1;