From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B36BDC1975A for ; Wed, 25 Mar 2020 14:43:35 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 832DA208E0; Wed, 25 Mar 2020 14:43:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="DZoh8udh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="dmBxTnCi"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="YUccMzib" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 832DA208E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=szeredi.hu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7Fn-0002oo-3S; Wed, 25 Mar 2020 14:43:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jH7Fg-0002oX-2X for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Mar 2020 14:43:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BYoi0GgKGrZ5Iy05aE5oc1zP5UUaQTjapju/izAR4hI=; b=DZoh8udhkfm9SU249PU2X+Rs1I z3k7m0+AUOqrP5235XptlAWyBFn/62J/ye8UkCLyQ7/G5XrteezC2HP6474fK1IR3U/KsEOeb0MKA 8Qk3laGYsYbHgh3sPw6ibKz56sqUDMXNFNXmGSDJlNQvcNd5ZOyoUSZRWptQkiRKXKB8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=BYoi0GgKGrZ5Iy05aE5oc1zP5UUaQTjapju/izAR4hI=; b=dmBxTnCifvpOGbOzNyk8FVHXli ptWNCbKVzGm3kxNrqZWTdf7WDGoGQeLjiY14TT3hvGfEBECoP27CnbHXR8SSm16UobpkJZ5g0dxh/ 8mj7liFs8mLqV3Jj1pp6HZbeUf92vmA+xwxHVYNZYmUGqWScD52MJOCbtgI1QshNdyUY=; Received: from mail-io1-f67.google.com ([209.85.166.67]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jH7FY-00GVBf-Cu for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Mar 2020 14:43:28 +0000 Received: by mail-io1-f67.google.com with SMTP id k9so2456494iov.7 for ; Wed, 25 Mar 2020 07:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BYoi0GgKGrZ5Iy05aE5oc1zP5UUaQTjapju/izAR4hI=; b=YUccMzib2IwajwEuyLBHygiEi2x+yWevlxfsequqpaIt/Mza/TxUmFkitS3U4FkfKx P1XwXxBJ8Cx5HEmhYoBLdWFHhmr6xou5YR2utppkELKcqyaDd4EOavtJNBW3boLnPkzx WgZmdQ9YRsyheNZWEZrba/miSYKYdDAaziYyc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BYoi0GgKGrZ5Iy05aE5oc1zP5UUaQTjapju/izAR4hI=; b=j2+2mkKBVFJB2Yu8ffV+XEZdJhzRNT7Jbroodf5SnzZVEvB28ABg9ff7pEf0pfRgWj aJKlNiPDp0Gj12wlw+uSLKSbjybAtxX837Rs6KM42wCnltkATwdbhGSsMQoAjSVGb2nc 1rJluuqmJ809aUbbhLRcVZOmZ6wTLDU5QGnBJXUp0Dk9zePT/fzfYACMN12/Rn2dwfqX 2mWDFqjp8CJ1Lhx6/fGznKoOA3d7M5VQeU6PZ3hOwb3ah6T+8gkwZ6mRwSrDloshRtmq DizvfL76DZRjtWhJHTG8iKr1IpmHUaNFpmpI1i7ZeYHNvsGnVPap+kBLE5CYppdcULOA iFrA== X-Gm-Message-State: ANhLgQ3rqgiVcmp0+eJ12pURxoD72n0Ol04zdg0VSWivDCThnqCf3xRh ACfg2l2bXiePdxKxRztA47bq+i693tQbXxG85oSwsA== X-Google-Smtp-Source: ADFU+vsgMMqodCZqPGFNfCT+HdNRTtLLlUdy5AMnDcVBoatxWj+vZY48emoAVNd+HvHliFjTkg/kdF6pmkOGcZxuC6s= X-Received: by 2002:a6b:3a07:: with SMTP id h7mr3235359ioa.191.1585147393572; Wed, 25 Mar 2020 07:43:13 -0700 (PDT) MIME-Version: 1.0 References: <20200323202259.13363-1-willy@infradead.org> <20200323202259.13363-25-willy@infradead.org> <20200325120254.GA22483@bombadil.infradead.org> In-Reply-To: <20200325120254.GA22483@bombadil.infradead.org> From: Miklos Szeredi Date: Wed, 25 Mar 2020 15:43:02 +0100 Message-ID: To: Matthew Wilcox X-Headers-End: 1jH7FY-00GVBf-Cu Subject: Re: [f2fs-dev] [PATCH v10 24/25] fuse: Convert from readpages to readahead X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xfs , William Kucharski , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-mm@kvack.org, ocfs2-devel@oss.oracle.com, Dave Chinner , linux-fsdevel@vger.kernel.org, Andrew Morton , linux-ext4@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Mar 25, 2020 at 1:02 PM Matthew Wilcox wrote: > > On Wed, Mar 25, 2020 at 10:42:56AM +0100, Miklos Szeredi wrote: > > > + while ((page = readahead_page(rac))) { > > > + if (fuse_readpages_fill(&data, page) != 0) > > > > Shouldn't this unlock + put page on error? > > We're certainly inconsistent between the two error exits from > fuse_readpages_fill(). But I think we can simplify the whole thing > ... how does this look to you? Nice, overall. > > - while ((page = readahead_page(rac))) { > - if (fuse_readpages_fill(&data, page) != 0) > + nr_pages = min(readahead_count(rac), fc->max_pages); Missing fc->max_read clamp. > + ia = fuse_io_alloc(NULL, nr_pages); > + if (!ia) > return; > + ap = &ia->ap; > + __readahead_batch(rac, ap->pages, nr_pages); nr_pages = __readahead_batch(...)? This will give consecutive pages, right? Thanks, Miklos _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel