Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp311122pxu; Fri, 23 Oct 2020 01:02:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Frh5ftO8FKOb0SMD7k4EqqZyYlhA9W46U2+n4BPDjw5stooAjytpwFOgo4lH7JLAsMv9 X-Received: by 2002:a17:907:435e:: with SMTP id oc22mr825300ejb.485.1603440119881; Fri, 23 Oct 2020 01:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603440117; cv=none; d=google.com; s=arc-20160816; b=0wW2oiQrBGpl+vPBoM4yE0S8tD1HMCYNOqkpo1yQuRS36hehiudXFd2pagxd5YO+cN G3OAVMTqeR6K0H/AX8r+9dA4Wj86mgMZkrOl95MzMwXadgy8sr0B+hJJM9qG9Ihmkuxd ApO6hlHlTiXwk8MwINjlADmGB9Vao7RFyBLEKYZUa5M2KanHq4HOcutY0EukUsYisV7w 3H2p4cf59JUU13kpbjJcK3UZ6FBkSd2PH1IwMhwlnr6WhbOkA75prr4+l2y2uoYauTd4 egCBr/vti4TPIzyE5ClzwEjy+yWhqAUqyB/7cvtR3+rIFMvRrRoFPLfKzY8pE7THZ7a9 bt2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=5mykKN3BUPn4dQh/ii2kKA/YzKegQy2WC1GQhDKxoaw=; b=DXjvfJuDrUuJRrJasZmOLJSyehILFPuEksglo4FlXKLpIUBN6EhaReB+uxLRwL5cqM Cz7Tplt3h+7gSfI5c+q8/uLRA68Sc+EXkbSjmUKo7jL/a6LUQ1BmfQFW9XgeQ7pSzwZx ITv9zL2Hwy7QhrFNdoj8CpdcA7bHs0mW6svlNgDy8on5HV0WhzAMZ5FkIQrk1ZyA3PU9 k2YjhnMwGL5b+S/pbTHoumFDji8ZZdSdhmMaFFan2rgE4DAxq/z6aZNJ6N8FcsP/Zd4M rT21mWSlOb6PKob+AzAk9SQaxzrZEJyO5xsinQtC1jkOpVa2RKISPNohR+BgzZkcxd09 00pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x26si327021ejc.582.2020.10.23.01.01.35; Fri, 23 Oct 2020 01:01:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S375307AbgJWGWL (ORCPT + 99 others); Fri, 23 Oct 2020 02:22:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:37190 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S375300AbgJWGWL (ORCPT ); Fri, 23 Oct 2020 02:22:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0753CACE6; Fri, 23 Oct 2020 06:22:10 +0000 (UTC) Subject: Re: [RFC] synchronous readpage for buffer_heads To: Matthew Wilcox , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201022152256.GU20115@casper.infradead.org> From: Hannes Reinecke Message-ID: <25528b1a-7434-62cb-705a-7269d050bbc1@suse.de> Date: Fri, 23 Oct 2020 08:22:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201022152256.GU20115@casper.infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/22/20 5:22 PM, Matthew Wilcox wrote: > I'm working on making readpage synchronous so that it can actually return > errors instead of futilely setting PageError. Something that's common > between most of the block based filesystems is the need to submit N > I/Os and wait for them to all complete (some filesystems don't support > sub-page block size, so they don't have this problem). > > I ended up coming up with a fairly nice data structure which I've called > the blk_completion. It waits for 'n' events to happen, then wakes the > task that cares, unless the task has got bored and wandered off to do > something else. > > block_read_full_page() then uses this data structure to submit 'n' buffer > heads and wait for them to all complete. The fscrypt code doesn't work > in this scheme, so I bailed on that for now. I have ideas for fixing it, > but they can wait. > > Obviously this all needs documentation, but I'd like feedback on the > idea before I do that. I have given it some light testing, but there > aren't too many filesystems left that use block_read_full_page() so I > haven't done a proper xfstests run. > Hmm. You are aware, of course, that hch et al are working on replacing bhs with iomap, right? So wouldn't it be more useful to concentrate on the iomap code, and ensure that _that_ is working correctly? Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer