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=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 6800FC48BE5 for ; Wed, 16 Jun 2021 09:16:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1A2DF6128B for ; Wed, 16 Jun 2021 09:16:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A2DF6128B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A77246B0070; Wed, 16 Jun 2021 05:16:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A28496B0071; Wed, 16 Jun 2021 05:16:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C84D6B0072; Wed, 16 Jun 2021 05:16:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 5BE136B0070 for ; Wed, 16 Jun 2021 05:16:07 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E65A9181AC9C6 for ; Wed, 16 Jun 2021 09:16:06 +0000 (UTC) X-FDA: 78259030332.06.51C92E6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf12.hostedemail.com (Postfix) with ESMTP id D07AF569 for ; Wed, 16 Jun 2021 09:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623834966; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T4+c2pc8J0kO0sEZOcAlXdb+PXp9r+TugMlu0OrZfbQ=; b=howEjtXFtd2cxDrHbeBo+wZMo7ZExWSR343XOX/0/Q001lobM8lmAbtohfCQAW8C0Q59Wz A8q+G6j5yydV/QISsjyw8F58TBX90d5C2zO5Bye/k3mpFZ1Jd8i7jwRDcOPPGL7oBVUfNf E2Ngx8h3l/c6Hj8+RugJqVbWX9pWxvM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-153-_HXbBplgNFKDDARh4oc90g-1; Wed, 16 Jun 2021 05:16:04 -0400 X-MC-Unique: _HXbBplgNFKDDARh4oc90g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF662800D55; Wed, 16 Jun 2021 09:16:02 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-118-65.rdu2.redhat.com [10.10.118.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43B485D6AD; Wed, 16 Jun 2021 09:16:01 +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: <20210614201435.1379188-33-willy@infradead.org> References: <20210614201435.1379188-33-willy@infradead.org> <20210614201435.1379188-1-willy@infradead.org> To: "Matthew Wilcox (Oracle)" Cc: dhowells@redhat.com, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vlastimil Babka , William Kucharski , Christoph Hellwig Subject: Re: [PATCH v11 32/33] fs/netfs: Add folio fscache functions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <810721.1623834960.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Wed, 16 Jun 2021 10:16:00 +0100 Message-ID: <810722.1623834960@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=howEjtXF; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf12.hostedemail.com: domain of dhowells@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=dhowells@redhat.com X-Stat-Signature: ftuomtdjms4y37hxceu8g5fq4axju5ce X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D07AF569 X-HE-Tag: 1623834952-429011 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Matthew Wilcox (Oracle) wrote: > /** > - * set_page_fscache - Set PG_fscache on a page and take a ref > - * @page: The page. > + * folio_start_fscache - Start an fscache operation on a folio. > + * @folio: The folio. > * > - * Set the PG_fscache (PG_private_2) flag on a page and take the refere= nce > - * needed for the VM to handle its lifetime correctly. This sets the f= lag and > - * takes the reference unconditionally, so care must be taken not to se= t the > - * flag again if it's already set. > + * Call this function before an fscache operation starts on a folio. > + * Starting a second fscache operation before the first one finishes is > + * not allowed. That's not correct. It's only used for operations that write from the pag= e to disk. Operations that read into the page are covered by the page lock. > + * folio_end_fscache - End an fscache operation on a folio. > ... > + * Call this function after an fscache operation has finished. This wi= ll > + * wake any sleepers waiting on this folio. Ditto. > + * folio_wait_fscache - Wait for an fscache operation on this folio to = end. > + * @folio: The folio. > * > + * If an fscache operation is in progress on this folio, wait for it to > + * finish. Another fscache operation may start after this one finishes= , > + * unless the caller holds the folio lock. Ditto. Apart from that, it looks okay. David