Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755618Ab3IEWWy (ORCPT ); Thu, 5 Sep 2013 18:22:54 -0400 Received: from mail-qa0-f52.google.com ([209.85.216.52]:56294 "EHLO mail-qa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755502Ab3IEWWu (ORCPT ); Thu, 5 Sep 2013 18:22:50 -0400 Date: Thu, 5 Sep 2013 18:22:49 -0400 From: Milosz Tanski To: ceph-devel@vger.kernel.org Cc: sage@inktank.com, zheng.z.yan@intel.com, dhowells@redhat.com, jiayisuse@gmail.com, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] ceph: ceph_readpage_to_fscache didn't check if marked Message-ID: <0df1c53e0a04f0358496d31c54d691651d04a1e1.1378418255.git.milosz@adfin.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1350 Lines: 42 Previously ceph_readpage_to_fscache did not call if page was marked as cached before calling fscache_write_page resulting in a BUG inside of fscache. FS-Cache: Assertion failed ------------[ cut here ]------------ kernel BUG at fs/fscache/page.c:874! invalid opcode: 0000 [#1] SMP Call Trace: [] __ceph_readpage_to_fscache+0x66/0x80 [ceph] [] readpage_nounlock+0x124/0x210 [ceph] [] ceph_readpage+0x1d/0x40 [ceph] [] generic_file_aio_read+0x1f6/0x700 [] ceph_aio_read+0x5fc/0xab0 [ceph] Signed-off-by: Milosz Tanski Signed-off-by: Sage Weil --- fs/ceph/cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c index 5c413ec..c737ae9 100644 --- a/fs/ceph/cache.c +++ b/fs/ceph/cache.c @@ -311,6 +311,9 @@ void ceph_readpage_to_fscache(struct inode *inode, struct page *page) struct ceph_inode_info *ci = ceph_inode(inode); int ret; + if (!PageFsCache(page)) + return; + if (!cache_valid(ci)) return; -- 1.7.9.5 -- 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/