From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754950AbbDTLWV (ORCPT ); Mon, 20 Apr 2015 07:22:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58323 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbbDTLWS convert rfc822-to-8bit (ORCPT ); Mon, 20 Apr 2015 07:22:18 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20150420052752.26554.52672.stgit@notabene.brown> References: <20150420052752.26554.52672.stgit@notabene.brown> <20150420052558.26554.97143.stgit@notabene.brown> To: NeilBrown Cc: dhowells@redhat.com, Chris Mason , Al Viro , Josef Bacik , David Sterba , linux-cachefs@vger.kernel.org, Dave Chinner , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 2/3] fscache/cachefiles: optionally use SEEK_DATA instead of ->bmap. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3912.1429528902.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Mon, 20 Apr 2015 12:21:42 +0100 Message-ID: <3914.1429528902@warthog.procyon.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NeilBrown wrote: > @@ -721,24 +733,45 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op, We can actually do better than this what you've done here for cachefiles_read_or_alloc_pages(). We can use SEEK_DATA to check the beginning of a run of pages and then SEEK_HOLE to see how many pages are covered. David