Message ID | 20240209142901.126894-2-da.gomez@samsung.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 4EF2EC4828F for <linux-mm@archiver.kernel.org>; Fri, 9 Feb 2024 14:29:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B5FFB6B0089; Fri, 9 Feb 2024 09:29:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A9AFC6B008C; Fri, 9 Feb 2024 09:29:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89DA36B0088; Fri, 9 Feb 2024 09:29:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 797346B0085 for <linux-mm@kvack.org>; Fri, 9 Feb 2024 09:29:11 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 426831A1097 for <linux-mm@kvack.org>; Fri, 9 Feb 2024 14:29:11 +0000 (UTC) X-FDA: 81772497702.05.BDE5BF8 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf13.hostedemail.com (Postfix) with ESMTP id DFCC420019 for <linux-mm@kvack.org>; Fri, 9 Feb 2024 14:29:06 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=LzdQ56ug; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf13.hostedemail.com: domain of da.gomez@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=da.gomez@samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707488947; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Xp/CDCIv8x19lL1UbiGyRLdd/wr0PppohAnD3gAfH/c=; b=nElGouck55XqwtrT4KeVmMZdAQPM/vSAw34c44zhqFLJIpOMyQGpIGZKqYD6KdyxVcS/Ak 4BuJg89qrFUfqmYSZ1TNCp/0lhIRQMcJkCTia64VOkYcrSf+Y1hSLexHYRzdzVeuRiA9av PiBmw1jS2RoSXdl2cZqX8nrP9/7tqGE= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=LzdQ56ug; dmarc=pass (policy=none) header.from=samsung.com; spf=pass (imf13.hostedemail.com: domain of da.gomez@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=da.gomez@samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707488947; a=rsa-sha256; cv=none; b=1RoyKyU+AKONMpkJV3Bd3hkDKAEjAuD1vtdm00kWH+IaB5Ooh2vzyMV6mw75cOFCQbNwhA tGT2kd1XCHEN9QL9Jf+NfZxtjtfhEwedxgpRxR2jo8dPNUyAeUcOYXjXhcHbaqKG+XZ7z3 JRlarvzp2n8Tbx0yXCKnZZhbfvecg2o= Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240209142904euoutp01bc019a533662469c4e95e3f0c45a72e9~yOCX82mxB2559825598euoutp01O for <linux-mm@kvack.org>; Fri, 9 Feb 2024 14:29:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240209142904euoutp01bc019a533662469c4e95e3f0c45a72e9~yOCX82mxB2559825598euoutp01O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1707488944; bh=Xp/CDCIv8x19lL1UbiGyRLdd/wr0PppohAnD3gAfH/c=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=LzdQ56uglyxjaJchOqqToC0c03bgWaOs+RPDfGhHNU9nsIH+BF6X887k+qb9pBDBM MQgLLEY70ciK0e/b+vB/b4SQGZiKoMEKA77+j6Pyunniki1dNFeugxTTAy4Eml3nR+ bF64C58U7sasaiGtG9I6zpBtSo2oSuhVUIoRNCMk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240209142904eucas1p21b3aca7b96105d3b5578a9ff3ae31d1f~yOCXp-XiZ0208902089eucas1p2U; Fri, 9 Feb 2024 14:29:04 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id E8.2E.09552.0B636C56; Fri, 9 Feb 2024 14:29:04 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240209142903eucas1p17f73779c6b38276cd7cefbe0a40f355e~yOCXQxwuN0937209372eucas1p1W; Fri, 9 Feb 2024 14:29:03 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240209142903eusmtrp2f9b51616ff70cd7034716594c79ec1a4~yOCXQJcRl2110121101eusmtrp2Y; Fri, 9 Feb 2024 14:29:03 +0000 (GMT) X-AuditID: cbfec7f5-83dff70000002550-89-65c636b0a566 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 06.6F.09146.FA636C56; Fri, 9 Feb 2024 14:29:03 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240209142903eusmtip1cba34f5186d87344c625af1f3f3dac53~yOCXDXR-x2720027200eusmtip1v; Fri, 9 Feb 2024 14:29:03 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 9 Feb 2024 14:29:03 +0000 Received: from CAMSVWEXC02.scsc.local ([::1]) by CAMSVWEXC02.scsc.local ([fe80::3c08:6c51:fa0a:6384%13]) with mapi id 15.00.1497.012; Fri, 9 Feb 2024 14:29:03 +0000 From: Daniel Gomez <da.gomez@samsung.com> To: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>, "brauner@kernel.org" <brauner@kernel.org>, "jack@suse.cz" <jack@suse.cz>, "hughd@google.com" <hughd@google.com>, "akpm@linux-foundation.org" <akpm@linux-foundation.org> CC: "dagmcr@gmail.com" <dagmcr@gmail.com>, "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-mm@kvack.org" <linux-mm@kvack.org>, "willy@infradead.org" <willy@infradead.org>, "hch@infradead.org" <hch@infradead.org>, "mcgrof@kernel.org" <mcgrof@kernel.org>, Pankaj Raghav <p.raghav@samsung.com>, "gost.dev@samsung.com" <gost.dev@samsung.com>, Daniel Gomez <da.gomez@samsung.com> Subject: [RFC PATCH 1/9] splice: don't check for uptodate if partially uptodate is impl Thread-Topic: [RFC PATCH 1/9] splice: don't check for uptodate if partially uptodate is impl Thread-Index: AQHaW2RTk/uEtIw1W0yBH2EezPFdkg== Date: Fri, 9 Feb 2024 14:29:02 +0000 Message-ID: <20240209142901.126894-2-da.gomez@samsung.com> In-Reply-To: <20240209142901.126894-1-da.gomez@samsung.com> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [106.110.32.67] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02SaUwTURSFfTPT6VBtGAqRJ66AK9IKwehEjZGocRKMQYMmGBeqjHVpETpU kERFAVEkFQluhUBVEFAitioqm9pioRbDDyOCUZZaRFFBioBaBWkHE/59991z7zk3eQQqauT5 EAdi4hlljFTuhwuwCtOvJvHdZSYmSK0RUHnlZTj1xWgH1Eu1A6csWdcRqsuuxqjcyykIVV1j xqhXlXk41VY2yqNasroA1fS3nkc5fubha6bQjzXv+bRWr6LvlQTQ+ltncVpvz+bTDVccGN2o rePTA/pZtN72DQl32y5YFc3IDxxhlEtWRwn2tw7U8mMz3RNPvhjGksH3yRnAjYDkUlh6LxnJ AAJCRJYAWP68DOeKHwBaU/swp0pEDgDY/3TH/4mK7AKUey8GsP3dNG5gTDNythTjCguAP9su 8jjV2F7DOy8n4+QiWGvW850iL7IbwLSqfleBkq0obH7dNGZOEJ5kJLydss054EXugrcr0hCO JfD+07euSBg5F2qL2l0xhOQKWKbrd2ncyJUw31qOOxmQM6G19DffySjpDd/aChDuBA94Pbca 5XgqHKnsxDkOhC/f2ADHQfBBUS3GsS88Y2rFuT0S2HIxZ5wXw5vXvoxn8IDmqzbX9ZDMEEDj k6Fxs3XQ+Kdl3MAT9tTf53M8A44+LkCywGLNhHyaCR6aCR6aCR5agN0C3oyKVcgYNiSGSZCw UgWripFJ9h5W6MHYh7OM1A8+AiU9/RIDQAhgAJBA/byEEYV1jEgYLT2axCgP71aq5AxrANMJ zM9bOC96NiMiZdJ45hDDxDLK/12EcPNJRk5Z1nYEnLjj+Nh4p3tIc9JenqpjfRsa8iMjrBsS H84R//KdygZHBgZ1V4t1uqr0uGnhO0/dKLSt1W0pVmxJ68DT5722mGtS5T57Pxf6SxslvTU5 gwnxYUWhjLU9dDDjtN0e0jts67o8SXgBkW2uKxDmfJ3f1NFjjvoUmiAJ3rjv2J6Ku31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veKF97XaNV/uLPh0 dt3KuJr6asOH8S+v3F4d6Hjq5Ytjq55c7X8nnyasYP/pwIpjtZOyPJPXnSpN3i+hMf/474/H mv48Tp2daSt08d7+N36bYx/WMD3s3bGvPccl/TP/t5bsmJ8H+t4YX3SdX2C6oOHJ7h23nI5H HT3HkPpq+sr596enssyZZsx5ZP7jtLVrXkZNTlT/+uLL7bM/jj5w/ZFjWx6RZV6bvmaZVwxD 3/NG8ZU8a37r/HUuuckkwdX07oF28sMs7c9v/GdMskmqFpjEcqEpft3GXVxmV5eIt7Xzx1eb lR/8/jPYv1heifkQ+5zVaq/fR/4p8BYrtGqRPa7EUpyRaKjFXFScCAAnnUg83AMAAA== X-CMS-MailID: 20240209142903eucas1p17f73779c6b38276cd7cefbe0a40f355e X-Msg-Generator: CA X-RootMTR: 20240209142903eucas1p17f73779c6b38276cd7cefbe0a40f355e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240209142903eucas1p17f73779c6b38276cd7cefbe0a40f355e References: <20240209142901.126894-1-da.gomez@samsung.com> <CGME20240209142903eucas1p17f73779c6b38276cd7cefbe0a40f355e@eucas1p1.samsung.com> X-Rspamd-Queue-Id: DFCC420019 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: a48xia85hityi4a7rh1c6dr3xqfipgd5 X-HE-Tag: 1707488946-864800 X-HE-Meta: U2FsdGVkX1/qRC6UwvNDt6tWvhK4MYkbUNXkCTcaN46MFBMITkL9svmHju+DVPUPbeckP/jVDepgEpxu086tl9M5/hcIdRz9DjY8sAoX0vuJFyb1V9SXryQFpTJoVR8jo2YPkQcaPDOxzFqEKMamr+Pk+d7AjEouqNLEbz7yhhaDBGrjIcMa+tv3ulCFt4m1ovRTkZp6D4HxAtIcL4WDyZSKbOugJf5pW1GkLwKY2+4AqpS74H1zZd4rDb77PPSq+B6IjQ5pM1Rt9zPEbRmPthTOWblvP3DaSVi3GaAYvUCZBASMioJmpvSCHpomnA9g/5Qfxvy4TSRNtplG5NG0bf9MwGoOwf+UqQZmGdfhaZHBEoBfhhCg5kE7JzIE15o7OO7jr/m9gPZD1r3qAXluOGE8F/RaiZlWIgbtO5S37KxqemdaOKV5fMUqihsDHulvXDL4KYwEaBTAKKteRRdkTwiey057h9em07gzB7P5dRi/nt+QZbXBoOTRPi3Ct6G1UqMNtBeW+SJzCAM8WIr8xlTmx9uc+KX8tYYKV9gHgOTKbfexITvmO/4KkEN8zXG5Ewm0dQZ1VjH5vHFp83bk/3Xh2diGcDFNlUyJseCjjJgwdmcGRpv0pi+U/sgT6QVZk2mOzKS/sT3ZTF4fcNhv8/p24tdFc5A0Kie0WVgFTS61ZfeMqt3bDHDX8pGtZ5HCG5qAeCSQyY+wIBBm48mxDnw3cKoZbZleO6BtxwZeEn+fAVfYB2SCO3KHU/JV+pgsHa+icERCwgHZvUttq5dpd6AJpDMyJ1NAFL56n7x25v3ONIe3zyORiUnebmA0M8u10yeGu8OcT1HO0P01SkFHYOELEkWarYsgXtTRRhncVlx82j9rPk/vNZJW5V1vXl48NlygPLF/ha81jHQTJfRL0NyBLp5+4wcLHbpDaK1DFHC/hUWbTOVw2VGheSo/BaYzY8IZ/NqMGy9N9Vqx0Mx yAt2mBgy 2X7CTqu4+Q6UN1ZZebQFd4b9r8P2x4Ys5+MBawlP+bO2cuMARLhQiV5JN/pxm6bBxzW98+4Kx9BGFGpnUKeEGnFoNvDawhCaQwrmY1j/W5z59Ipu0qTZ3BvKVkqhD2L/tKI6k6sjVkq/FCZFLyrQ92uK5Yja9ZReea0yy 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[RFC,1/9] splice: don't check for uptodate if partially uptodate is impl
|
expand
|
diff --git a/fs/splice.c b/fs/splice.c index 218e24b1ac40..e6ac57795590 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -120,7 +120,9 @@ static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { struct folio *folio = page_folio(buf->page); + const struct address_space_operations *ops; int err; + off_t off = folio_page_idx(folio, buf->page) * PAGE_SIZE + buf->offset; if (!folio_test_uptodate(folio)) { folio_lock(folio); @@ -134,12 +136,21 @@ static int page_cache_pipe_buf_confirm(struct pipe_inode_info *pipe, goto error; } + ops = folio->mapping->a_ops; /* * Uh oh, read-error from disk. */ - if (!folio_test_uptodate(folio)) { - err = -EIO; - goto error; + if (!ops->is_partially_uptodate) { + if (!folio_test_uptodate(folio)) { + err = -EIO; + goto error; + } + } else { + if (!ops->is_partially_uptodate(folio, off, + buf->len)) { + err = -EIO; + goto error; + } } /* Folio is ok after all, we are done */