Message ID | 20240530132629.4180932-4-ofir.gal@volumez.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2113.outbound.protection.outlook.com [40.107.7.113]) (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 41242183996; Thu, 30 May 2024 13:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.113 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717075628; cv=fail; b=TH0V5GLPuwgc1Nr9R9/vg0pncYd6DgwTUgen/TffVJMhyf9Fegz5ovzoKtxMc40HqUCw+fvdN92zFp1al9Yf1jiTvhI6rVznvxb9DYAx09nuJxqZUyo8fdyvAQRWyPFr9OfJAiU54+QVfI1hHvtV1o20gBBAxn07stLfHnw9cj8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717075628; c=relaxed/simple; bh=n+30LPrgh3ECtE4vwoN9GQnQtWDt8J1uBwKgssKCb6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=W4wgIc3vSwCKmIKKGH/zDlaD++kj5AQoyiMfSuctJtaN/9mb6V0E4RzWcYpSTOzPF7wQIUAWVQlgmED95SmOju1p2km938V9ISxaSrIbke46EaVgKYQBp0e2IqtJsDjcGa+nbTLNwPUUjCy2GK+DQOC0o9sVMSWuGLiS7VrKnPM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=volumez.com; spf=pass smtp.mailfrom=volumez.com; dkim=pass (2048-bit key) header.d=storingio.onmicrosoft.com header.i=@storingio.onmicrosoft.com header.b=ORLnKGVO; arc=fail smtp.client-ip=40.107.7.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=volumez.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=volumez.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=storingio.onmicrosoft.com header.i=@storingio.onmicrosoft.com header.b="ORLnKGVO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cg2lccXUpDlJpbxejW54v7u6XGsnlmiZpULlsNtw2lCAVAqconPPhIzRYIPaWpeK8PKgURS30E2M0FXaSAwoiQUGYMbN7y7P5fYT4PhAyazkNYD2h1jfsJBQbKAv9153AMNxrbMJUoCN/RkwYvosnlkIQ59MM2kzspjh8YCfxJGbnM/JHNJcdTFJagRI1LxA3aFGHErae7vgNaJSCSIr1jXSCwPXnHFAO9c85vSQkQyfvvevVtjf3kHiLNqSAty16wUljX4UYtbOhNZIDWAnH+Oa2FlmzUjT7rpRJNPYRyVrOz5g4ZzJmq3SaSIDKtG+h1mU+STHXkH398oHDYmN2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=mXyPTjSX0sG4zzXDMHIlAtzkqrxPxSoExsIIIIGAj/c=; b=HxjLLVlYBE3RALblSQcF1OJcNB1/EiAh1hT2RqfMhHNe0lFNJ6cilok4zT+9KcqBABsQ9QCT3vSXtF/Ko9Db5LKsQ6raNZApqImUH/C+StfN6ZBmCG33vOvhmavtuDSEaKiTd/nWcdE2KVrWQe/ymTGIpJ1uGwp4RuJ0NBhpq6zA66t0OsoFdQGiGjhPiTywSjqXiTrQDSQhogggJC0iO5Ry1XYDLK1MkF8sDQ0NUkQX0z3iso8kNGhYwqe4oU7nnTPmWJHwJ9KFEOD0/eeNBqEH6hQBOgiBFjGxk3rMIuDW0ICIzgTqnvaFIeAcR8RBbYEfLjqUuQ1VjdULmJ/Bpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=volumez.com; dmarc=pass action=none header.from=volumez.com; dkim=pass header.d=volumez.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=storingio.onmicrosoft.com; s=selector1-storingio-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mXyPTjSX0sG4zzXDMHIlAtzkqrxPxSoExsIIIIGAj/c=; b=ORLnKGVO9v4WbHExX/gWFY9cs2nqZcm/nt0NL3ra3m/DEyPa/hKcpzFFalkXpFrrzddpWSwwI9TOAvOIXisMM4n80ZaFwqw2RzPlILbygenIn9zDnz/U9O0S4SJYgbrWpLurpxXZF6fG/hjhipZmeNBcmaps+7guTqfZscdFAxaMgztJp5HM1QzLLNCO2ZE5YNU1ojkldOPaxO0kV+OJQsRXTt4nU1b0anlUmesQA7FLG9GUHayiENgmrefgQ1vS3zOP4cW1hI7PVTDNxytSOGK5gSFaNQ+3gsqjZ67/+KgmTrdKjLDBFY+7UqmiJxQ8jfw6tXRTZy2/K4g0gQi0yA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=volumez.com; Received: from AM0PR04MB5107.eurprd04.prod.outlook.com (2603:10a6:208:cb::11) by PAXPR04MB8814.eurprd04.prod.outlook.com (2603:10a6:102:20d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Thu, 30 May 2024 13:27:00 +0000 Received: from AM0PR04MB5107.eurprd04.prod.outlook.com ([fe80::de53:c058:7ef:21fb]) by AM0PR04MB5107.eurprd04.prod.outlook.com ([fe80::de53:c058:7ef:21fb%3]) with mapi id 15.20.7611.030; Thu, 30 May 2024 13:27:00 +0000 From: Ofir Gal <ofir.gal@volumez.com> To: davem@davemloft.net, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, netdev@vger.kernel.org, ceph-devel@vger.kernel.org Cc: dhowells@redhat.com, edumazet@google.com, pabeni@redhat.com, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, christoph.boehmwalder@linbit.com Subject: [PATCH 3/4] drbd: use sendpages_ok() to instead of sendpage_ok() Date: Thu, 30 May 2024 16:26:25 +0300 Message-ID: <20240530132629.4180932-4-ofir.gal@volumez.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240530132629.4180932-1-ofir.gal@volumez.com> References: <20240530132629.4180932-1-ofir.gal@volumez.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TL2P290CA0005.ISRP290.PROD.OUTLOOK.COM (2603:1096:950:2::15) To AM0PR04MB5107.eurprd04.prod.outlook.com (2603:10a6:208:cb::11) Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: <linux-block.vger.kernel.org> List-Subscribe: <mailto:linux-block+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-block+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB5107:EE_|PAXPR04MB8814:EE_ X-MS-Office365-Filtering-Correlation-Id: c72a5bf4-f563-4af2-6311-08dc80ac2feb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007|52116005|38350700005; X-Microsoft-Antispam-Message-Info: 0dUSThsx+paOeDmM6vWFAIWw8FYzn/i1UK2So8ziSqnjj6LB+RMyqNPzeuycYfNPZf9D9EfMOgJGhkRPC9lYMdvXnWTKT1l4bPgs2Rc7brkSsuXAbuMhO6ZY858aqeMupTV6WUX3+3NgYsoqFLjhbbFzxYht2qZp3ggSBQvJyxFzkZM2TbIcKiKK7aoDubyykxhU3FOY8C+ogxebNXLkGpqGbcSjHX70ErR/TjzArFDGcw/9HhFupj2J6Tn4ttlnDemVETZ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bdnq7UTvHtMp7sNws3XsWXS5npC91SQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB5107.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(7416005)(1800799015)(366007)(52116005)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hK1FQ4r0SWg9mRO6dHBu/N2kaV2QK/JzHdQ49qqXkPN68+Cjugn8zb0Khdo4zhLqEA5luPX6j1F+bVvItQLAYMxn37Dm+XnIgJ2baSSP8om/VS8VVxfhcBTe5rqNcCN6ii7N5lMJpAgpXs+y6u7+QFT8qeGQzvfTbWNMoXQdNPJbLxMM2lUJJXiUDNW7Nbvc1GKCSCqKz/YTnYNaJW2uesmy36e8b4kIGAbnQmluOed3hXg6AN9him1WGJt4mDxhXX2bbpuNMvQzgsp9s45r/8V0rQkYgHekqr+twfInC/K5IzWraRv8urbBjDCvZUl0yddecZPK9VHARhuJeGw1ywdNTz5migCiSgMiDJLyjF9gMPo7LnrT0N6zL+wKpfOqnTOEmXpMqlZddkmWEFdTS1apDuP6YOMvWLTzVaFJi09EBx7N0qdyAZAdAu0m82W96vk3jHBLG7z1CHYtG02IE0FTuvdzUu7ILQsyLZa0wBj7dqdDjvYuWTZmsTtDRUnPmq6t42BEWnsz+tDOClr2btJRLuyztbPuCdP8skYRc9KnjOgDT/SaXP18w6vMaVPaF0I+Y7L+326ijPoiILs8K1A2O62KFr7GmMtWruuV8VMQyqNRmXJgIsI/dZ6GdH+iU2U4MOThNfkDZV3Y60kQAmHD1q+/Ks0Psl3TXUi7bOsW0Xo46aLsaKoSvUr3R0qctjDaWY3wyymFPRl4PZnGpZTQqlLYrZSaRx1Pbfzm2yilbBcTuyjImDhLH+uZsUp0zwpB9kVDgOkk2RPcWQbZWX62Ity5kqlXQGbvkHZVCf2Yw9PofXzibk58dxzzy6i1yJiTlwATr16WveBV1uE3pGHDYCYOh+tjlrCuJXsC7SgUt2iHtp2JNIk5vatvGGXHTe/pNAohHMSEo0xzNeQbaKa1WU1WrGy79SCFOIg4gZDc/o2lqGthJR4bsL8BIYsFWUJRwXStsnKDhT7Yqbo8yY6Nu0gsnkRBLkdHmhwIXRASr127+3f03hkUjvRjya4uu4dkzuuZ5fdaJ5M4DSMkFX8QgsKvF0Fervxc684gC9KA89gUY2f9iBYRY2TEC88CqxqDD9ToeOgW0VOWJjL0tyeHX9ysQhTjzNaWI1ehaYxa/1uRAGFV+RN1V0yhPO2SdvliN0vJdpeWkeAM4dRlP5m53uvkfPr+Jbho3QJi4nX+qtBsOWGK5NsEIn6tYwuv1C83ODBnWmzV/yx6HhGRJFdwaZSM9D7qNwLKMseqv/dscM9fwBbJivy0cuY2xeMiwmUBUJ/v2AFzlgyfEp7W6Clwr0NlxeUz0PtKeBqj5DdZ8Bf28CVIzCy9DSCNUW9VYCCBX3x/P3cLKJ5uvr+ysvqgOuXZfmIM5nuoQZ0F6tkGbUu1TfzakL0bYCtIJUPyIaXxOX/HZVbo9QhIJhjeqMcmOf9/XEeBtsw2THkQUkrTQKjG6W9OZF0hKZJJhUe6lX4Wl6XBMfoRxJ8zffobV1H2/f26DEWSRsF38M4QsvkOZuB1kqW5mFJwaf6c+r9jQxehDUUV7yVxPqibuAHUm+7PvD8zU5m5BHl7xclMRslTZV6kXNdk71jl3cbE2zcN X-OriginatorOrg: volumez.com X-MS-Exchange-CrossTenant-Network-Message-Id: c72a5bf4-f563-4af2-6311-08dc80ac2feb X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5107.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 13:27:00.7379 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b1841924-914b-4377-bb23-9f1fac784a1d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: l1gaQRCjkAfJbNzjEqspmGGjjibHX2ML6ytmEfBBgf/4xWRefDgikVIin9rm+Jtl6kgZPknaNgThKyR5w+xQgQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8814 |
Series |
[1/4] net: introduce helper sendpages_ok()
|
expand
|
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 113b441d4d36..a5dbbf6cce23 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -1550,7 +1550,7 @@ static int _drbd_send_page(struct drbd_peer_device *peer_device, struct page *pa * put_page(); and would cause either a VM_BUG directly, or * __page_cache_release a page that would actually still be referenced * by someone, leading to some obscure delayed Oops somewhere else. */ - if (!drbd_disable_sendpage && sendpage_ok(page)) + if (!drbd_disable_sendpage && sendpages_ok(page, len, offset)) msg.msg_flags |= MSG_NOSIGNAL | MSG_SPLICE_PAGES; drbd_update_congested(peer_device->connection);
Currently _drbd_send_page() use sendpage_ok() in order to enable MSG_SPLICE_PAGES, it check the first page of the iterator, the iterator may represent contiguous pages. MSG_SPLICE_PAGES enables skb_splice_from_iter() which checks all the pages it sends with sendpage_ok(). When _drbd_send_page() sends an iterator that the first page is sendable, but one of the other pages isn't skb_splice_from_iter() warns and aborts the data transfer. Using the new helper sendpages_ok() in order to enable MSG_SPLICE_PAGES solves the issue. Signed-off-by: Ofir Gal <ofir.gal@volumez.com> --- drivers/block/drbd/drbd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)