Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3111019lqo; Tue, 14 May 2024 23:00:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1lkw6BZ8jxMAg1RDt4Nj4u2NdE5EtbIdDV0vvTqRKiJZFSEAZNUXg/boPVMRtP4jCFNbARrieu0WPxJWkhGO/B80OJTk8J3iMYQa8bQ== X-Google-Smtp-Source: AGHT+IExgSvZN+M1evvUA4bowCAiyLwinjeEw+ONEtp7UEJ0rmOMsFhtgoqmzgf4IY3U2boxX0cR X-Received: by 2002:a05:620a:5dc4:b0:792:bd06:d4eb with SMTP id af79cd13be357-792c75ffb8cmr1533441785a.64.1715752801561; Tue, 14 May 2024 23:00:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715752801; cv=pass; d=google.com; s=arc-20160816; b=lQfHEqYMFqIUXpzl1UHV0iCXZ2m6QXq3Bl39NWpIXbcc65TSZPnqX1zejeubEzF79e V9/8ubsNuPwDjgaitTUZfniySYrl8JHDDK+yDjMDm2ijCZarYKbE6TUkEbayDaCHOBKV QqKfVR9BVysiZiYWs4KCoOTg30k2gZZFOYfDsYQ/QG1fA17ahdLpuMlfcPAnJrjbnL6V 9amk30N2WYSztzmUIHE5WciWZl4+7/zGVabUgjCllEIoD/nO+eTNLA31TjXdJdw2jvP3 w+7E0W8cRZFmT+WFQJ/6rJcLmB9vw/0aXIPyGFLszwzqT+Mq7wArNtMWN6yOEB+OIKdV zCXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:content-transfer-encoding:content-language :accept-language:in-reply-to:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-filter; bh=t+LtSI8A+WgybP8NqP+rojjUG/bT6woZXyJ+I7vfPH0=; fh=boE2T1tfXWhPiAXKUEd+pJodvJpwHMz3xvNd2cVdM48=; b=WAdjF1fn4vr47H3uC56Yn+M1hZ7EvNlLN0U7THtbnbgo26nXrTH0c9XmPce7MYr7rI UiWRJvN8Ztw2hRz+AVJ8VfLX9A4DspsXvYgzkXYAIvD1Iz/z1guBor64r59ala9J/yDk CwAnrRAzt/cqT3UQNwFArspJaZ66plYMA+lVMw9LwiO7CjEioDcRcozgYhRrPiznSYQq ZEtD0gBGT8Ta00MMRWYTjY7aSFBv4dX2Ad7eU7x+vehY6gvHONMzBSG7jY0BvsB+Hnzs ft8mNeAGXfV0gZ6NDHaDraD0eTwbz32uO5jz73MQ3NVPr1suUcpKQA3ZWfGqJH7RMSQM 6mOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HEognthI; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-179492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf38f1ccsi1392601585a.768.2024.05.14.23.00.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 23:00:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=HEognthI; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-179492-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179492-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3F2901C21AEB for ; Wed, 15 May 2024 06:00:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 126B953392; Wed, 15 May 2024 05:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="HEognthI" Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 EE3E44C61C for ; Wed, 15 May 2024 05:57:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752661; cv=none; b=SKwhNMv6uOwlFTWVcuGauTU+IeMVernY1VHGZ8Y3fRG+LKYKp+F+8T6XrRYGcceM3XvyVVteApiEqEb4cOKYrHV6TpKL0xFtU7qqd1ibbzmvfx2ISEVJQTicOOEkN6ewcABu/fmRSVtHGyWSp5HMmdnSeaGenq/jDk516B95bzw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715752661; c=relaxed/simple; bh=XBBTszZS8nSEUwCRzHqmScQZNOWKWiftnOHPAays+8Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:Content-Type: MIME-Version:References; b=oihe14up1fclWvkeK3y/6GAMhjxx5Vyg/Q4Qt339s4e+XqbkaE/gh99Z8bWhUamKPkEkabCG9L7mzDFRYa0Kfd9Cd5IeiCkLqEmhD621qGdOUZexIk5kEK+cQn2vg6ZJ2CjGtrIs60+HfCWgEMF66H0k9GGvqToCBr6v9tKvCZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=HEognthI; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240515055737euoutp0269c0a11217255b71483674c193b30c1a~Pk-OfPKlR2047820478euoutp02C for ; Wed, 15 May 2024 05:57:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240515055737euoutp0269c0a11217255b71483674c193b30c1a~Pk-OfPKlR2047820478euoutp02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1715752657; bh=t+LtSI8A+WgybP8NqP+rojjUG/bT6woZXyJ+I7vfPH0=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=HEognthIkmnPhdriZmRVNdoD04/O3Jx12OyZQOvs8XEUQzLhmTjExcmavKd/QTIJ6 QD+bRgRur7e2X1q8N4G3leH8yfJKGyRPLzQtTWKsY3LrlnINuMIMKA15SFLMg9VqMU HpWo8N22zTYQVCRt7km9m1RtlQ8/cMa9GMrkwhUQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240515055736eucas1p2f25fe01f090462c69e1148cea0c1d5a8~Pk-NBWHHN1079110791eucas1p2h; Wed, 15 May 2024 05:57:36 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 37.D8.09875.FCE44466; Wed, 15 May 2024 06:57:35 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d~Pk-MUqVPC0808808088eucas1p2V; Wed, 15 May 2024 05:57:35 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240515055735eusmtrp2b5840e2e22c2bff3b8f61569b97ef6b3~Pk-MUA_zl0256302563eusmtrp2P; Wed, 15 May 2024 05:57:35 +0000 (GMT) X-AuditID: cbfec7f4-11bff70000002693-ef-66444ecfdcc6 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 5F.16.08810.FCE44466; Wed, 15 May 2024 06:57:35 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240515055735eusmtip17eac0a1eafc6d97691a64a17f60abd3d~Pk-MHq1jo0512205122eusmtip1a; Wed, 15 May 2024 05:57:35 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 May 2024 06:57:34 +0100 Received: from CAMSVWEXC02.scsc.local ([::1]) by CAMSVWEXC02.scsc.local ([fe80::3c08:6c51:fa0a:6384%13]) with mapi id 15.00.1497.012; Wed, 15 May 2024 06:57:34 +0100 From: Daniel Gomez To: "hughd@google.com" , "akpm@linux-foundation.org" , "willy@infradead.org" , "jack@suse.cz" , "mcgrof@kernel.org" CC: "linux-mm@kvack.org" , "linux-xfs@vger.kernel.org" , "djwong@kernel.org" , "Pankaj Raghav" , "dagmcr@gmail.com" , "yosryahmed@google.com" , "baolin.wang@linux.alibaba.com" , "ritesh.list@gmail.com" , "lsf-pc@lists.linux-foundation.org" , "david@redhat.com" , "chandan.babu@oracle.com" , "linux-kernel@vger.kernel.org" , "brauner@kernel.org" , Daniel Gomez Subject: [PATCH 09/12] shmem: enable per-block uptodate Thread-Topic: [PATCH 09/12] shmem: enable per-block uptodate Thread-Index: AQHapozH2Ew2w2FSxkCziesEgQoVNA== Date: Wed, 15 May 2024 05:57:33 +0000 Message-ID: <20240515055719.32577-10-da.gomez@samsung.com> In-Reply-To: <20240515055719.32577-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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAKsWRmVeSWpSXmKPExsWy7djPc7rn/VzSDPbNtrKYs34Nm8X/vccY LV4f/sRocemonMXZvt9sFl/X/2K2uPyEz+Lppz4Wi9nTm5ksLu+aw2Zxb81/Votdf3awW+x7 vZfZ4saEp4wWB091sFv8/gGU3b4r0kHQY+esu+weCzaVemxeoeWxaVUnm8emT5PYPU7M+M3i sfOhpcfkG8sZPT4+vcXi8X7fVTaPMwuOsHt83iQXwBPFZZOSmpNZllqkb5fAlbHpkl7BRdaK /s7TTA2Md1m6GDk5JARMJH5/bWMHsYUEVjBKzL7F1sXIBWR/YZRoef2WEcL5zCjx4soiuI65 Mx6yQiSWM0o83vCJFaIdqOrydhGIxBlGidYHD9kgEisZJS421oHYbAKaEvtObmIHKRIRuM0o 8fTUGTCHWeAkq8SfzTvBdggLmEtcWD4RrFtEwEbi4cYOdghbT+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RvZ5OSmpNZllqkb5egl7Hpkl7BRdaK/s7TTA2Md1m6GDk5JARMJObO eMjaxcjFISSwlFFi19cfUAkZiY1frrJC2MISf651sUEUfWSUuL33AwuEc4ZRYsGa/cwQzkpG iZN7voK1sAloSuw7uYkdJCEicJtR4umpM2AOs8BJVokDpz+zg1QJC5hLXFg+kQ3EFhGwkXi4 sYMdwtaT+Nh4HcxmEVCVWLjgBjOIzStgJbF10ypGEFtIwFLi0qvtYDYnUPzu/K9gcxgFZCUe rfwF1sssIC5x68l8JognBCSW7DnPDGGLSrx8/A/qOR2Js9efMELYBhJbl+6DBoCyxPp3bUwQ c/QkbkydwgZha0ssW/ga6h5BiZMzn7BMYJSehWTdLCQts5C0zELSsoCRZRWjSGppcW56brGh XnFibnFpXrpecn7uJkZgwtt27OfmHYzzXn3UO8TIxMF4iFGCg1lJhFckzTlNiDclsbIqtSg/ vqg0J7X4EKMpMIwmMkuJJucDU25eSbyhmYGpoYmZpYGppZmxkjivZ0FHopBAemJJanZqakFq EUwfEwenVAPTxKx7kpMdTk1gaEwzlotyMuPwMubXuvOr9bfb8lfK98zW6h0yT1/RGp7sZX1U ULTKx8Zo6ZzSZ+8/lRnKRiuclAj9+T+i5M5MI0WTF8mfJmyudbWVbgg22uCvtqYqS63nfGFV lkrQXDsldc5Y/2kvF1qkty7S2bWWP7ZapONfpPaluxHlT36ZbZC7GniT48RR9u2cBT/KhRfx 3Up5KrRzYpAv1wf3qa8zV3EF8B8tf9fpoZipnSTX7rSAZc/dBW+yLNanvxRmnbNo/tSF9eVv DaTP79r1JHjf9Yr/N1Jir5df7pG3l2zWubP6iclxzeWxs9dcnetiVtXqfPFJ9sOUIJfnNqZt AlHiC/UXMSmxFGckGmoxFxUnAgA2YmL4AQQAAA== X-CMS-MailID: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d X-Msg-Generator: CA X-RootMTR: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240515055735eucas1p2a967b4eebc8e059588cd62139f006b0d References: <20240515055719.32577-1-da.gomez@samsung.com> In the write_end() function, mark only the blocks that are being written as uptodate. Signed-off-by: Daniel Gomez --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index d5e6c8eba983..7a6ad678e2ff 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2991,7 +2991,7 @@ shmem_write_end(struct file *file, struct address_spa= ce *mapping, if (pos + copied > inode->i_size) i_size_write(inode, pos + copied); =20 - shmem_set_range_uptodate(folio, 0, folio_size(folio)); + shmem_set_range_uptodate(folio, offset_in_folio(folio, pos), len); folio_mark_dirty(folio); folio_unlock(folio); folio_put(folio); --=20 2.43.0