From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-00364e01.pphosted.com (mx0a-00364e01.pphosted.com [148.163.135.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67F6E3B42ED for ; Mon, 3 Aug 2026 11:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785755029; cv=none; b=LDckpBltC0h6VlpucgIov5YLCkscQK2IXp9MCnz8g7kxb1z51D/8b910xT5TyyGv3aYV4uXggeCoKOW3oIPF80l06+V39gVrhbUirXdN+83g7hIgbEMoLkDPODSl3nGFYNh6vVOQyq/lapJkStrF1wp67Htc8Bk1PURPKpQkDrk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785755029; c=relaxed/simple; bh=EcUm1EZpbOH7hDMFYcgFDbbz1hSfyheIni/Kbqi18G8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YE7lUBltIFHQQ0SDgHp4fv/hYU4Pf2Qmt2sYGnkGEyKbEiwa469rWRqt0KtQkbgnOCvyCyY+vVJhiI/evCT4xv4qsYv5Z6wQNm/Xh3GsoiZcesV1XFxTSStTOew/L41hfNo4kgWo5WFstU1v3vyNOZeK0QTDRbmOxFWYldh9IDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu; spf=pass smtp.mailfrom=columbia.edu; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b=FsuiiLhk; arc=none smtp.client-ip=148.163.135.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=columbia.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=columbia.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=columbia.edu header.i=@columbia.edu header.b="FsuiiLhk" Received: from pps.filterd (m0167071.ppops.net [127.0.0.1]) by mx0a-00364e01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6738mSD81667430 for ; Mon, 3 Aug 2026 07:03:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=columbia.edu; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pps01; bh=1Ldi kCzHnIi62dfq8/K9AYncVOh5mbXj++hGhsLbls4=; b=FsuiiLhkIM09zlFAK1ZR JVBQqODgbbTmdK7mFuJSxhXTopBvkbrNFB/WpquLaWIsitYZYWCYXiXaXCfDtTT5 GdrzCPLsWv6MkkNF+diFTM7EQ6q3jHrYEA0waXyQA+2pz0m76GgQ25G09ifvp2YJ TK7Z3mOqNsAxOL4Gm4JGj7cTkndGZrsaU+Rr6SST3K3fa/ONGFVF75rtAhEsCE3w 5Gd1vyctR+V1kpokQCyeQE9iNs/46Ok3e0MT7tHdxbGNunrFuWPXSPeDLPf+sLUp q3Cg85erO9ZtUBIb+jMtk4enoDZODaZH7tGUGX1CRUaZACL2E6BH1fyvMKzP5cnr mw== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-00364e01.pphosted.com (PPS) with ESMTPS id 4ftcx9t8nw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 07:03:42 -0400 (EDT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-51c26012cd0so27468891cf.0 for ; Mon, 03 Aug 2026 04:03:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785755021; x=1786359821; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1LdikCzHnIi62dfq8/K9AYncVOh5mbXj++hGhsLbls4=; b=iXTpULQA6XgNGTEn9chjfu9vftmKVBj+lzsDkloU+jFSXTn4YZguwQ94pBKlF9p47s qK/EGdza9LJZRUSF80ZNFJ76cHUbycV5Y1TkV5XhR2SQccKe17QLU5f8MCzvvYTqKw8X RiJ8KzlZ/TBB7lzvhsSt10rILokukunojvWu5lisgs4+cBq5FveBEmwEzZNHM/+gk9e2 h9zNQMFvsc9IbulnKHME2eivL4XXpQZtao2Y30t34te7ekGb79EXQaSNvBnXylm92ILR 4P41S6ccVGaJ9LFpPtw4dpPrAPtOygSbpXSYaEL3CYAsLb4Hn1ObdRoChYFAI8WKAQ4V 7Ydg== X-Forwarded-Encrypted: i=1; AHgh+RomAv1MX8piyngxG3+PGKkKm+VWSh2AeWwXsfkeVVw+j5ilPjCw3u9bwE84vqUc/OKHxA4JgmJKnmINCvY=@vger.kernel.org X-Gm-Message-State: AOJu0YwnMyQXUwXONtf1jY9w7v0iAIo3WfSgzIu+RlbICQj0IzHSw751 drlwY0tNiKni1n11zBJG/dM3u3c181DUve+Cy4WxNFWMvYykVnkrVQtYu00u03DJ/XA5p0MMwS3 OQBatuIbb/AU2kaVR472O6kVwAH/MrywU06YP3OFHTdxyn/Slrr+/qNw4BqJbZQ== X-Gm-Gg: AR+sD10Q/YRxsYruIRCvYIyaHMNy0nT4lG1bVPc2Fcy9f1OF5LdS1uGFn5ffD5yaKtU W88ukWAOf5bqJFtSRUH14uiQFeeNrMODh8H8SjgOkO0m57UEUTqonbPOa4ZqAtnS7j3cySa6zsv CjhDLGpS7wV9oWBy+eKNNj3BNaNduTa6gi3dHKNOwB0Mhrwq7gkIYuTq2hrF6z02/yahTpMeUYg ZpXMTNoFKNPwIfq0YSZO/naBKSWWNfKOkxGmmjiKTAnb1CSO3WEdZXb1FmzZwi1E2u0LcX/SkLl 3e2CswmXVtPVSMeRtg/ZKE9R97Dw6g/115QqGbzEc6aH+Lr66I8Asb3Q6TV8x4oy0yyIoQtxHzY tRIdzRrFYLDVDIBheeh1D0f8p2OFv42Zbppacvv71FhCKFAJ9U7poYtOy X-Received: by 2002:ac8:5fc8:0:b0:51c:1532:ae84 with SMTP id d75a77b69052e-52b5669dca5mr178425531cf.6.1785755021066; Mon, 03 Aug 2026 04:03:41 -0700 (PDT) X-Received: by 2002:ac8:5fc8:0:b0:51c:1532:ae84 with SMTP id d75a77b69052e-52b5669dca5mr178424591cf.6.1785755020521; Mon, 03 Aug 2026 04:03:40 -0700 (PDT) Received: from [10.100.102.30] (CBL217-132-158-98.bb.netvision.net.il. [217.132.158.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd41d0064sm30745913f8f.5.2026.08.03.04.03.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Aug 2026 04:03:39 -0700 (PDT) Message-ID: <08c19cc8-c28e-4098-b137-fc9721deebbb@columbia.edu> Date: Mon, 3 Aug 2026 14:03:37 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] ceph: remove page_snap_context() To: Matthew Wilcox Cc: Ilya Dryomov , Alex Markuze , Viacheslav Dubeyko , Jan Kara , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Zi Yan , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20260802-remove-wait-on-page-writeback-v1-0-6c35d6b3ad36@columbia.edu> <20260802-remove-wait-on-page-writeback-v1-4-6c35d6b3ad36@columbia.edu> Content-Language: en-US From: Tal Zussman In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA5OCBTYWx0ZWRfX4899NPkYLy6r LtKnuYHOsgEHktFVAIrBUvsN+0yhdqj/vNPYNrTuaGDuVly7DX+qBoJgqxr2TGj5Dp+LVhy17dj 236+UHAo7uzOWxtOYrY4AKoK6pRfA4xsN1v8XwLeoJHhuOTKqkPcGvoJ1NG7GpY9lsjOs0v+jWv Vj38ZtusAhPffxEk6LS3SIPC+Gg1o8BKQuolQSFf00SSyvb/JGvsogluFCrPdrop0kSfmkD2vxF wluznX24zOcfkJy9b9kud9AzsIYsy2lY9XHf2uPkOK16LmfcxlbL0prEGtuto6Maq2Sw9uJ26F2 yt0SLB+3hKnXpUuUqDsL6s3qdQBrwSeXsLopXv+FwDeCaaicXquXKCoMyS5sOOcI534hBde4/jr L83NSpO3KZxfrgHvy1N0kxpXXiUix+8SeTaxbDrWoUl2pnZ7c877hJ4imrFkzWXOVESFfgaOq1Z 1o1MXKbfxbWxi5yF9jw== X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA5OCBTYWx0ZWRfX6FMbWRMjTcbZ ht/CssQLYyCdjMiwgIR/CQVsojajCqscywx4klyK6gAWuh6eSJNi3wP9PcUE7RIvfUDox7/6dF4 1cdP+vGrc6VRogFiC/maPHPclaJD2a/awGwW5p8VYrRBSJE5kaYO X-Proofpoint-GUID: w5KVV-X6N_tEnGoQxywyJhCDZWJeKwQ1 X-Authority-Analysis: v=2.4 cv=O/0Jeh9W c=1 sm=1 tr=0 ts=6a70758e cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=C4zMR0+CEq2lM/mtmjScOA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=x7bEGLp0ZPQA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Da8U98TiO7q1upZEImrf:22 a=79PYxaXUQd1wl-QFWJnA:22 a=tvZamFcuqidHLa0JVA0A:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-ORIG-GUID: w5KVV-X6N_tEnGoQxywyJhCDZWJeKwQ1 X-Proofpoint-Virus-Version: vendor=nai engine=6900 definitions=11863 signatures=596817 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 phishscore=0 lowpriorityscore=10 malwarescore=0 bulkscore=10 spamscore=0 impostorscore=10 priorityscore=1501 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030098 On 8/2/26 10:06 PM, Matthew Wilcox wrote: > On Sun, Aug 02, 2026 at 12:50:05PM -0400, Tal Zussman wrote: >> Convert the final caller in get_writepages_data_length() to use a folio >> and ceph_folio_snap_context(), then remove page_snap_context(). >> >> This drops the last open-coded use of page->private in ceph's writeback >> path. > > This one I'm deeply conflicted about. It's adding an extra call to > compound_head() ... and we're not getting much for it. > > I'd feel better about it if it started with:: > > static u64 get_writepages_data_length(struct inode *inode, > struct page *page, u64 start) > { > + struct folio *folio = page_folio(page); > > and then we had a ceph_fscrypt_pagecache_folio() function and > ceph_fscrypt_folio_offset() (we already have a fscrypt_is_bounce_page()) If we're adding these, I might as well do a few more conversions... > That way we'd have this function entirely converted except for its > argument, and a future patch can do the conversion with little fuss. > And we'd get rid of one of the four remaining calls to > fscrypt_is_bounce_page() I'm tempted to convert the argument as well, offload the page_folio to the single caller (ceph_submit_write), and be done with this function in one go. Although now that I look at it again, ceph_submit_write can also be converted with the fscrypt helpers (albeit with a healthy dose of page_folio() due to ceph's pages arrays...).