Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7903802rwl; Tue, 10 Jan 2023 06:50:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsjxe32d/9/PuA2pmLfskSoTuAm9mjfbyz4QLAw9aVIl0Z4MkyMwnNpTA/rC+A2aGtnuo4I X-Received: by 2002:a17:906:4d4f:b0:84d:45d9:6bcf with SMTP id b15-20020a1709064d4f00b0084d45d96bcfmr6967024ejv.42.1673362222548; Tue, 10 Jan 2023 06:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673362222; cv=none; d=google.com; s=arc-20160816; b=KPAdkrfYhOlWKb5lRT1JsVTMaFO/HneHpgUd5IFidrtV6grrr17nlZ4akUv7lH14A6 8u/IKZhQZrGWdIUOprY3093a1MI69HdIxtbM5kzpu8LauKP970e3VltuUB+ajBlsgruD mCoqxlbaNlXb6YBbcDUO/lhy8kNo6Nn1Xobt2WqtV0ezwYcXcTDaQe/Xvm+LwQDL5ru6 aN8D5x1mvi01DREG3i970y3ejtn2+WZOoQ/aGj7hDWY5+PWmzAw6Ek390s6p2utMZT3v yGE4qVIleodhiDC8+mrkUWSfF8WoKNt+EkCN6ITKf0C00744Neidlu9gJ+f4ZKBKF87n Bznw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=q7HvhAaAWNKOBG0AiE5jaW5da5KSq68kVSGiHSUvN0c=; b=msMD5pVSiVXYs6uRwzlFnujqv4kApY09VfnfRBN6Gl26nl+XVdaXBd+WOMvLLYiQCa aD1ck8yooGAy/OYgPZ7b1VamdgTSPvuRiwpJCL1jpVUIjX33RAAHAywZP7iiA79jzGoi oe1Uqtq+cPC6oOxU8WXn+QGRJGsDJBj6VYhIR8jF+tPmRViIJNX2eWvXpKq5cLXXRYMr MkNe1OZWlDHmzetfWfwPHox6Jo2MmkkmlLxHhG8twWnP+kSi3cUOTrwUkv5MUqOUueQ1 h9nHbf+gtJF45KE+Komj7aT22OGi9EKuYRg8lJafrnWNK3AAVq6zyDj9GtueIvl90AH8 qqow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FrkOMt1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a50aa8a000000b004862741e037si11036223edc.96.2023.01.10.06.50.09; Tue, 10 Jan 2023 06:50:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FrkOMt1Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233733AbjAJOnU (ORCPT + 53 others); Tue, 10 Jan 2023 09:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238390AbjAJOm4 (ORCPT ); Tue, 10 Jan 2023 09:42:56 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDD3C42606 for ; Tue, 10 Jan 2023 06:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673361730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q7HvhAaAWNKOBG0AiE5jaW5da5KSq68kVSGiHSUvN0c=; b=FrkOMt1ZZM4mAWLvbjWclq/9WyvXYaQM7hXt+l4hE7Gj8ifLe6uBerZkiaGpS9ktRJ87wq IRaA/NSbbv9ai21KvgSAAuugiQf8At/xnATXNqnDgRx6obycyqf8nsuK2CQ1zHGjdhUvVq UyFL/8KlbqPN7yZemEFo6Ty57NsaHFA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-WbUP3gRIOfqrYIs8gRKVrg-1; Tue, 10 Jan 2023 09:42:07 -0500 X-MC-Unique: WbUP3gRIOfqrYIs8gRKVrg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 62CF31C08790; Tue, 10 Jan 2023 14:42:06 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14E3B422FE; Tue, 10 Jan 2023 14:42:04 +0000 (UTC) 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: <20230109172500.bd4z2incticapm7x@quack3> References: <20230109172500.bd4z2incticapm7x@quack3> <167305160937.1521586.133299343565358971.stgit@warthog.procyon.org.uk> <167305166150.1521586.10220949115402059720.stgit@warthog.procyon.org.uk> <1880793.1673257404@warthog.procyon.org.uk> To: Jan Kara Cc: dhowells@redhat.com, Jens Axboe , Al Viro , Christoph Hellwig , Matthew Wilcox , Logan Gunthorpe , Christoph Hellwig , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 7/7] iov_iter, block: Make bio structs pin pages rather than ref'ing if appropriate MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2155892.1673361724.1@warthog.procyon.org.uk> Date: Tue, 10 Jan 2023 14:42:04 +0000 Message-ID: <2155893.1673361724@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jan Kara wrote: > ... So filesystems really need DIO reads to use FOLL_PIN instead of FOLL_GET > and consequently we need to pass information to bio completion function how > page references should be dropped. That information would be available in the bio struct with this patch if necessary, though transcribed into a combination of BIO_* flags instead off FOLL_* flags. I wonder if there's the possibility of the filesystem that generated the bio nicking the pages out of the bio and putting them itself. David