From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (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 1EBBE1CDA1C; Tue, 15 Oct 2024 08:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.153.30 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728982239; cv=fail; b=JjZ10cgKBgyLW20qIf7a/jU+SyfTJs/3Ks86WXlcQzcl+A4/thVwHr+bL6J6uSQdECqfKcmzRwp3Zzsj8GnTjcasRAKS+kkfVtgxdlyLeOoOcpZTNjV/UZajGCb1HfYEmgg+LSSZLoRoj2YoK4fODdG8aHfN9fSSuoQVrVvToyM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728982239; c=relaxed/simple; bh=AWMshC5EQIRqZ4/MICxqubkvy775QQUgUfEjntXNLq4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=dU9+jJEcU+5QnBYHuTWZwfhoXZ6a195MqAus3Cn2uqbQtJOr2FHx1LNJDm9WtlZDAcONYw5LK6mV8kL8QavGzZbnyHNhZVCmpxWvARoFKiwhOWO/E+8hznXTXrpyn6sWmtlLYpC0fLrbumHvXeR6n4+IvsehDddR17PBSSmw49Q= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com; spf=pass smtp.mailfrom=meta.com; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b=UvS+L7DJ; arc=fail smtp.client-ip=67.231.153.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=meta.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b="UvS+L7DJ" Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49F6QIka016493; Tue, 15 Oct 2024 01:50:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=cc :content-id:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= s2048-2021-q4; bh=AWMshC5EQIRqZ4/MICxqubkvy775QQUgUfEjntXNLq4=; b= UvS+L7DJLU42DtVA92K/RQ3LPWYIkoHJd+Q1Hu2t+YuYOCF+K3QqI2kAM3y/EVbJ UYWoaxnq/TmlGMUCXMIug8e0JwVKGODZpakSH4gWZLZ/DSxRYSCONulsBYQ8enlA 8x56es0qAfPxT8LdOwpkidkn2CZwYQT2lKZkKZDwt5ld5o1it3jBxsqU/41MEU0/ bDYmlU6F/Hv5xVMoqTI9nqqT+ek3YsNrOsmSamAEVFwcQ0BLirjF7f1ap6IaqejE guFcnjo9CHXPeF3KzueYqnnwRy7tuHJfwFwqlYK/TtYEFpsPIMYdcOcJREDNLfSZ hc17PFf8d9MZ6xFDY3h6Jw== Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 428c4stx1s-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2024 01:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VnOWP7Cnc84Ij0AwwPI22H6TNaffKgejncGTQzUX9NQuKaK5Ct6d6vpmB9rR68ofDm9c+vdJGMa1hXxNC7l1jtXbiIZ1etnK1vSPnRq0WaIWFUYSMLE1XU7+MNjOQOSgI9ZZby0lUtWM5wlCzEdishcO8k9uPJwoOw7M9QhgPu2lrTjNZRMg73X1/adO9doVcapASdvPWwRIKRy815OetZLuMgDgqAS7zF6lw/jdfCWkVIisjKClqsJlqXTqjUrz4z09igCsYejDRcJuYsuMRdtkd5UGVW5QM164149OINKy5w2hQ06gcuxV9UV5Vqg5GCGXBUCz/FeACyxISGFlUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Dk8KnLIfN90I3etmTPxUEzwaZU3W1NTgFeHvA4iw/+4=; b=QIB9KYLwSrHRd9qGH/yev01qVka2Je8Mc53SGG11HomW5PC0yvOeykTPyCDU/Xw97xl7t8bqGLuNfzHwETm7GyxrVH/Eo8sxbWdbMszugVV8oda/Y9xTrO3WLeWKHeVcPk1WGlmxjeHm7dsu5h4DrCVNkMXJ4B+XmwHQ8wJYerujrXnp6bJ1cQwLAdaQz9jyVy6CPkQylFFJziScKvwaQmL/41eq41ZGG2pbYuvPawyCkJTuq7hJ511DJFlJdM0jyt46uJBTdU9uNBjQARVHlGa5kPknsXCInazDZfjj9vCnHhFoAEe6Vfl7hJGCoB2X3dm28Z9sZXx529Y96Jv7xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com; dkim=pass header.d=meta.com; arc=none Received: from PH0PR15MB5659.namprd15.prod.outlook.com (2603:10b6:510:282::21) by MW4PR15MB4555.namprd15.prod.outlook.com (2603:10b6:303:108::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Tue, 15 Oct 2024 08:50:33 +0000 Received: from PH0PR15MB5659.namprd15.prod.outlook.com ([fe80::dffe:b107:49d:a49d]) by PH0PR15MB5659.namprd15.prod.outlook.com ([fe80::dffe:b107:49d:a49d%3]) with mapi id 15.20.8048.020; Tue, 15 Oct 2024 08:50:33 +0000 From: Mark Harmstone To: Boris Burkov , Mark Harmstone CC: "linux-btrfs@vger.kernel.org" , "io-uring@vger.kernel.org" Subject: Re: [PATCH v3 0/5] btrfs: encoded reads via io_uring Thread-Topic: [PATCH v3 0/5] btrfs: encoded reads via io_uring Thread-Index: AQHbHl0hWvUhKg3cm02UtrvBgL2H/rKGhLiAgAD9IwA= Date: Tue, 15 Oct 2024 08:50:33 +0000 Message-ID: <9e42d2da-4160-4f9f-af24-c5e90a555cac@meta.com> References: <20241014171838.304953-1-maharmstone@fb.com> <20241014174431.GA879246@zen.localdomain> In-Reply-To: <20241014174431.GA879246@zen.localdomain> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR15MB5659:EE_|MW4PR15MB4555:EE_ x-ms-office365-filtering-correlation-id: edac03d4-a028-4e94-13d1-08dcecf66e31 x-fb-source: Internal x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?utf-8?B?cmZ1Z3NqQ3FDQzM0cnVKSXVLRnRiUkNEMVRMenJsOERrbkw3QU1ZRUwrR3lG?= =?utf-8?B?a25lTWhWRFBsbVhaYmlMM2tXb2MzZTNuWmRqekt0WmgyWmYySTUwTms3S2FQ?= =?utf-8?B?NHdLajZLWFdVR3I4MWo4dXRCV2ZvTEJPbUNCS2NWektCbWVZeWVBSlRHWXAw?= =?utf-8?B?V2cvcW5KZ2ZFWVkrWkQxRTZIS2xVRVhrU1NhMDE0ak45REdhRjk3MjBSUkJy?= =?utf-8?B?UXJHWkFLZUJUREQ0czJUTHlQSVFtQ0ZnRUxyQW9iL1hOY3BSZGlPSVk3L01J?= =?utf-8?B?ZW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24yZmxOVlAw?= =?utf-8?B?djR2M0t0ZEU5VE5RVTV4eTMxZDUrN3VQSW5MeWZndUt6djdTUjEwRVBwOWhy?= =?utf-8?B?UlVHRFEyMUdxOTJYUG1tUC9ZcHdrenlCNjdSOVRjMytsaUpLQS9CNk9OcTZ1?= =?utf-8?B?Y3h1Z25iSVNKS29PbU05YnhrNEgzRTFqdGNZcTVrd2ZHa29BMW9jdDZVQ0tj?= =?utf-8?B?TjNaVzBuSmFYWGh2Vm9BMGJOZTNETTZ0MVRYTzRJYU1BRy9MV2UyeEY2N1c2?= =?utf-8?B?R3lDM0cyc0hTTXB3V1lBN1RQclBwMmVTMUp2cmZXWXRHT0Y5S3pzQndtMmVi?= =?utf-8?B?RW1CZDJoT0o0SnhQSXZxaWdTNXF1NGZic1NQQmpzZ2QrK3hpMXdabDdGaFA2?= =?utf-8?B?V0lZeHhTVTlBM0U1VTFBNkJyaERFK1hkbldPMlJFN29oZGIzMFdpUE1rcUxO?= =?utf-8?B?QnZZb2crVVlUMW5xbTg5NkdkWXNMM0xQNG1vZWI0T3ZuV05tTVR3WmI4WFZP?= =?utf-8?B?SHRtSjBRaWVlcTNtMk9kcjVXVitJeUlzeVpNck8wbGJYem9uSWlTbU9CdldN?= =?utf-8?B?VXlOeU1NWE5XZE8wRllNL0hDSHVZMXd0QUtQS1YxSHhVQkQrUkNNSnE5TXgz?= =?utf-8?B?a0VEWWFUaXNDcGlkT25QQT09?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR15MB5659.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?aE1tdkJ3UmtJV2pNeUMySUsvSTY0NE5Xc1orR0s5dW94Ujg3VzRQR3luS0ZF?= =?utf-8?B?UUIxTE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V2dMVEhDcGNvR2MrUXNz?= =?utf-8?B?YmhsY3djSVVJTUtweTR2bVl2b2hBZDlkM3FNYXRvRXFLUlllQkFIV0Jldlo2?= =?utf-8?B?YnJQZDhRUjJEZ2RzTVVia2xvemFRK1diakhJVlFUcjJLa2piTVV2bGt0TGV3?= =?utf-8?B?ZFdiZ0p0K29zaTJnZ0VWeGkvNDJUUkV4cXJYLzNKeUw3OXZwRkd4ZDBXZ3c1?= =?utf-8?B?alRYOFBtM3QyVkk0enhjcFRGT3lFbTZjRitJcWpsQjVFOVdYN0drRHlPSkZ4?= =?utf-8?Q?fTcQ=3D?= Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR15MB5659.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: edac03d4-a028-4e94-13d1-08dcecf66e31 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Oct 2024 08:50:33.4233 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: A1hr61YmwPG86AsAjKfROcsOfP/5PMpI6MInJQPhPwBxyh4kjYmiXK6Q4DIEdKRCypC3pf9NgluK6BOFGbIdPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR15MB4555 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-ID: X-Proofpoint-GUID: Es7TorHWxX0-W0Drn6A9T-W8iSGCKlfc X-Proofpoint-ORIG-GUID: Es7TorHWxX0-W0Drn6A9T-W8iSGCKlfc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-05_03,2024-10-04_01,2024-09-30_01 On 14/10/24 18:44, Boris Burkov wrote: > >=20 > On Mon, Oct 14, 2024 at 06:18:22PM +0100, Mark Harmstone wrote: >> This is a re-do of my previous patchsets: I wasn't happy with how >> synchronous the previous version was in many ways, nor quite how badly >> it butchered the existing ioctl. >> >> This adds an io_uring cmd to btrfs to match the behaviour of the >> existing BTRFS_IOC_ENCODED_READ ioctl, which allows the reading of >> potentially compressed extents directly from the disk. >> >> Pavel mentioned on the previous patches whether we definitely need to >> keep the inode and the extent locked while doing I/O; I think the answer >> is probably yes, a) to prevent races with no-COW extents, and b) to >> prevent the extent from being deallocated from under us. But I think >> it's possible to resolve this, as a future optimization. >=20 > What branch is this based off of? I attempted to apply it to the current > btrfs for-next and > "btrfs: change btrfs_encoded_read_regular_fill_pages to take a callback" > did not apply cleanly. This is against v6.11, because it's the latest stable version. I'm=20 guessing it ought to have been against upstream/master... Mark