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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B70EDC47089 for ; Tue, 6 Dec 2022 03:17:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38C078E0002; Mon, 5 Dec 2022 22:17:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33CD18E0001; Mon, 5 Dec 2022 22:17:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 203C18E0002; Mon, 5 Dec 2022 22:17:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 102AB8E0001 for ; Mon, 5 Dec 2022 22:17:42 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C822E12033B for ; Tue, 6 Dec 2022 03:17:41 +0000 (UTC) X-FDA: 80210421522.23.375EFB5 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf26.hostedemail.com (Postfix) with ESMTP id 585DA140004 for ; Tue, 6 Dec 2022 03:17:40 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b=aRpJDRAu; spf=pass (imf26.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu; dmarc=pass (policy=none) header.from=mit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670296660; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=p1r2m88M/QKxRRtpTpgy5FK3fYeYkJFhKXuPxwPZugY=; b=AfcTjAZ4M30ErI1Z/GiUvM4NGXfmjsBaGzLHS67CPrUTa/Fk/HkcOWMENl325dEl6U2ulK x/KNVvOuMCShHAH/pKQfRIhCNNOWnJXxKEnHDFXNk7yHnIajp5TMJ+MJ5wD//jZ26af6xW cKxdI4wvgcouE/PpqxWGQYq9Y/qg/t4= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b=aRpJDRAu; spf=pass (imf26.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu; dmarc=pass (policy=none) header.from=mit.edu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670296660; a=rsa-sha256; cv=none; b=rZmoLR5i0NdfH5qy/mm/hXSZgqI3Rk7z/fm6XMK7cw2NowdCL+DLejy4wp12xy6rrLpbKn k8dnZD2nfe7WdEVE5AzywcOWGSxzJB/DNjpUiEE5lyqT1D0SjU1t/nYzYZOGEz5yD7u+fa ITuMCwvbktz3adDr5Kjk7JscPB++uEY= Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 2B63HQlj024202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 5 Dec 2022 22:17:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1670296648; bh=p1r2m88M/QKxRRtpTpgy5FK3fYeYkJFhKXuPxwPZugY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=aRpJDRAuqxWMPU4dGvibIhN2/2z2ufbg1ZNl6qkOTu0UOUVE7q8F8ZOyCDQ2vm7XW H28PHOqdyaEPenkrvz2IpqytM70PW9yXPK2eDQVMfR3cCSzYxSJkNf2To9MxDdQwyA po3Rs64k2ageddjaK1CIW3yd7EBWHBG7anjSukPK+JuS5ibXUQXWGVE7P1fhpb8maM zmWiALPZyCjJ82ymscpgTKOEwbPXF7jTok8iQS6JUh4hAj3nToZo1QAMkSyvVzMmcD WiDlHaIS5y7Gq1vaeLNSddhVXWeUNz/sJ82ZKNXl7lxZlJc49KsfmoqZkx1sZCWS9T qXkloXX/UwVXw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 8884415C3489; Mon, 5 Dec 2022 22:17:26 -0500 (EST) Date: Mon, 5 Dec 2022 22:17:26 -0500 From: "Theodore Ts'o" To: Jan Kara Cc: linux-ext4@vger.kernel.org, Christoph Hellwig , "Ritesh Harjani (IBM)" , Christoph Hellwig , Matthew Wilcox , linux-mm@kvack.org Subject: Re: [PATCH v3 11/12] ext4: Stop providing .writepage hook Message-ID: References: <20221205122604.25994-1-jack@suse.cz> <20221205122928.21959-11-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221205122928.21959-11-jack@suse.cz> X-Stat-Signature: o7rg6es6ws4s6hk84risri1p6kbwmepb X-Rspam-User: X-Spamd-Result: default: False [0.13 / 9.00]; SUSPICIOUS_RECIPS(1.50)[]; BAYES_HAM(-0.67)[76.07%]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_POLICY_ALLOW(0.00)[mit.edu,none]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[mit.edu:-]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_DKIM_REJECT(0.00)[mit.edu:s=outgoing]; ARC_SIGNED(0.00)[hostedemail.com:s=arc-20220608:i=1]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 585DA140004 X-Rspamd-Server: rspam06 X-HE-Tag: 1670296660-934896 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: On Mon, Dec 05, 2022 at 01:29:25PM +0100, Jan Kara wrote: > Now we don't need .writepage hook for anything anymore. Reclaim is fine > with relying on .writepages to clean pages and we often couldn't do much > from the .writepage callback anyway. We only need to provide > .migrate_folio callback for the ext4_journalled_aops - let's use > buffer_migrate_page_norefs() there so that buffers cannot be modified ^^^^^^^^^^^^^^^^^^^^^^^^^^ this should be buffer_migrate_folio_norefs, no? > under jdb2's hands. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Jan Kara Could you clarify in the commit how critical it is to use the _norefs() variant? It's not entirely clear what you mean by "let's use...". I think what is meant is that we need to use ..._noref() or we can get in trouble if while the page update is getting committed, there is an attempted to migrate the folio containing the page. buffer_migrate_folio_norefs() is currently not exported (although buffer_migrate_folio is). So if we need it for ext4, we're going to have to EXPORT_SYMBOL buffer_migrate_folio_norefs. Any objections from the mm folks? - Ted