Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp819194lqp; Thu, 23 May 2024 00:19:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5PZkRUoE60oRUbRhsnAnbs7gh6aMgCqGCoGfL+7bOyWr+vDfvHRkIJoqgfkiUFvM5ZCM2qO+f7wY33UH8qf0cDGfqJww6Pdt8lGr54Q== X-Google-Smtp-Source: AGHT+IF67UJAfHZNpCy4c+p9S7Mv9CVB1toyu+02+WBguzly7ztO0PyR5I7urgX41C4/rP7p2vxP X-Received: by 2002:a05:6214:3986:b0:6ab:6ea1:e32b with SMTP id 6a1803df08f44-6ab7f332cb5mr41221896d6.11.1716448782377; Thu, 23 May 2024 00:19:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716448782; cv=pass; d=google.com; s=arc-20160816; b=m1t6edMxWjgA4G8mxkKd/H9IE174qc0+RZAmVdpoI/YTlysmRzfifH7X9CCOGNWm8B Xy1kFPICKkvYgt3m3I9dHK/4sOj6/OcQgWtpBUdLG4KhEijqipXV7LpRSl7AWw6N1Pmz 99f9GvfVaiBFRiqu7FSC3d3alrZ3dEc5Hs7LoDqi5NkGkCphHrwZhl8q6X43M/wm4Gru P5u0WuApceEKdxlaT3N6eJAZW4djBrNkM3FSLZfdrGpTy0rJukU4pr82hHCn/fxmfn8l T642/W/gRCbCZ6zrniWo/3k5KijfLR/ivRx72uSNBmGIf6OeQdjK2Ro9VWyVHquLzy4t a4Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :from:date:dkim-signature:dkim-filter:message-id; bh=bCWU7Lc3U6Gf5GeFq7c4kfDiTYQheurIl1SgCCmRW2E=; fh=YLd9IbdBOj0P4PR96j+f2rfPLb7/dchyclgdvoY1PWc=; b=CU6aDV9LdFfJLuvk+efVqxERxPUp5oPe6t5S2D7+Z/lDqG0esRnJF+stuRlbUtHx5L YZIFcNpKtyVxUiXT4GBNe4ju2ttNM6M3iXiVRYKwK4ja7xSQvbklZ7X0LMs5oDD0QcO3 +gx0cL1130ZF3HAh14uXNmvWc8Ad0kK2f84jEVvZgo5e5gHBg6NK8oVmipxWVXt854wo uv4DaqNtGdEt+cJ4BgqrbvlDM8APitcE+oQl9PhBSk7wtSfRIh7L8JnSl621IusoAo2l 78cojWdGLZOS9c3GhwOgyRAeGyM0d3QfR/+jjkId9TNzBecomDOkwEFRbVm6KvY4zOxe XkEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Tf7+WlgL; 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-187083-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187083-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 6a1803df08f44-6ab6ddc037asi12051066d6.326.2024.05.23.00.19.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 00:19:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187083-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=Tf7+WlgL; 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-187083-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Message-ID: <664eee0e.d40a0220.3fe4a.8d09SMTPIN_ADDED_BROKEN@mx.google.com> X-Google-Original-Message-ID: <20240523070512.kku7gtw5qanmsrjg@nj.shetty@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 DE0A91C211A5 for ; Thu, 23 May 2024 07:19:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1172E13C677; Thu, 23 May 2024 07:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="Tf7+WlgL" Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (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 3B10913CAB2 for ; Thu, 23 May 2024 07:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716448745; cv=none; b=Dy23q7gvaugop4LTko65YWDVPtrLr1uE9KVra6ts1uCQUulosw9ySnjVE2LSLcUORoCr5wwUAOERCpBI79A9JJN2vzYvMAxKfE8vmNHId80iPOapuKcfHuaE1yaMZkjZ3uFn+sD5rqzajx3cMOmYYWof8sNZn+Fh+aIVEmB+0eU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716448745; c=relaxed/simple; bh=bCWU7Lc3U6Gf5GeFq7c4kfDiTYQheurIl1SgCCmRW2E=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:In-Reply-To: Content-Type:References; b=bHtf+ES2AcYy8ijX70K5ETq+89f9rQ41MftfoC1KHycHqp7sxBM7nG1s6Upxmx8k5AX+FD2EEmX+EZn8NkpCLEQrRGQlW9Jgfl/s9QZ/sSTHEO+Ie+oC61OK5MbNv6jb2SyrSMe+9eXvCCc1H71VoB72GTwsyJk6jE0NUFjTrIM= 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=Tf7+WlgL; arc=none smtp.client-ip=203.254.224.33 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 epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240523071856epoutp031c8934a568159b361f0d9a3424593d39~SDQgPd3k62876628766epoutp03j for ; Thu, 23 May 2024 07:18:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240523071856epoutp031c8934a568159b361f0d9a3424593d39~SDQgPd3k62876628766epoutp03j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1716448736; bh=bCWU7Lc3U6Gf5GeFq7c4kfDiTYQheurIl1SgCCmRW2E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Tf7+WlgLBawm/YVOH/7VyF+LvicAHD0h0EumnzsVsMKnmsCiKN2AkWy84PN9iJnKp +RebvJV1T9GTPfAAmOZu4LW9sRvt0qIW48Lviixv5JtcgHibp4Uio+HXD9yWoCQMMo LVATUhIpbuu6Zu2t+8LNCan3lF+j5b5MGS0tNRlU= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20240523071855epcas5p21aeec08c159e8d0f1adcdf6b64938e3f~SDQfodwgx1031010310epcas5p29; Thu, 23 May 2024 07:18:55 +0000 (GMT) Received: from epsmges5p1new.samsung.com (unknown [182.195.38.180]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4VlKKV11Gxz4x9Q5; Thu, 23 May 2024 07:18:54 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 18.17.09666.DDDEE466; Thu, 23 May 2024 16:18:54 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20240523071219epcas5p2e8a92db80cd848b52d49715b1c010006~SDKu17ZOh2481924819epcas5p2x; Thu, 23 May 2024 07:12:19 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240523071219epsmtrp21c79b655e9d0043b667ac9556b156183~SDKu0vTEG1280012800epsmtrp2G; Thu, 23 May 2024 07:12:19 +0000 (GMT) X-AuditID: b6c32a49-f53fa700000025c2-ba-664eedddf85d Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 45.46.08924.35CEE466; Thu, 23 May 2024 16:12:19 +0900 (KST) Received: from nj.shetty?samsung.com (unknown [107.99.41.245]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240523071215epsmtip14cb2b6df4b2fd21744f10ec306679a1d~SDKrOsSq10670606706epsmtip1T; Thu, 23 May 2024 07:12:15 +0000 (GMT) Date: Thu, 23 May 2024 07:05:12 +0000 From: Nitesh Shetty To: Bart Van Assche Cc: Jens Axboe , Jonathan Corbet , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Keith Busch , Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Alexander Viro , Christian Brauner , Jan Kara , martin.petersen@oracle.com, david@fromorbit.com, hare@suse.de, damien.lemoal@opensource.wdc.com, anuj20.g@samsung.com, joshi.k@samsung.com, nitheshshetty@gmail.com, gost.dev@samsung.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, dm-devel@lists.linux.dev, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v20 01/12] block: Introduce queue limits and sysfs for copy-offload support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <174d4908-b81c-4775-9b99-b0941451cb0e@acm.org> X-Brightmail-Tracker: H4sIAAAAAAAAA02TezBcdxTH+7t39+6lo9kSyS9LRLbTNKTYTdAfsdIJ096OtEw7bVKZdm3s DYLdzT5KHjPWK8I0IkLMIi1qyKII247XtrKK0Kh0kJQpMkGnRdhEPFpFl0sn/33O95zvnPM7 Z34kblvP4ZFRMjWtlEli+IQ16/s2F1e3kScfnBZktOKoprsDR0lZKziqHL5KoKm2ZwDdMP+N o/HWNICWe3pxZOgYAaio5CYLDbY2YqilJBtD+sp2DBXkJWOofe0JgbJNDwCaGMjHkHHoACq+ VMpCLcYuFuprKiTQ12UTHFTeuYqha5cHMNQwnghQ9dQsC90dckC9K53stx2ovv4gqrsEUo35 wxyqd+Q2i+rr0VB1FekEVV+aQP1ZrwNU86CWoL7JvM6mriTPEFRj6iibejoxxKJmfxggqExD BaDuFf3ECbELjfaLpCVSWulMy8Ll0ihZhIgf9JE4QOzlLRC6CX3QW3xnmSSWFvEDj4W4vRMV Y1kO3/kLSYzGIoVIVCq+h7+fUq5R086RcpVaxKcV0hiFp8JdJYlVaWQR7jJa7SsUCA56WQrD oiO1aX6K+1bxl2r7MS3QkRnAioRcT9j+eIyVAaxJW24zgJXfjhFM8AxAbfFlNhMsAFh2/yF7 y1J1p23TYgTQmNnFYYI5S9W0jlivYnFfh0uGcQuTJME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nFok4bFz1l12j/P3NrJ4XD5b6rFpVSeb x+Yl9R4vNs9k9Nh9s4HNY3HfZFaP3uZ3bB47W++zenx8eovF4/2+q2wefVtWMXqcWXCEPUA4 issmJTUnsyy1SN8ugSvj6Pn9zAUP2SreXtrI3sB4nLWLkZNDQsBEYs3BwyxdjFwcQgK7GSVu PPrBBJGQlFj29wgzhC0ssfLfc3aIoo+MEv1z14IlWARUJX5secLWxcjBwSagLXH6PwdIWERA Q+Lbg+VgQ5kFlrJJXNz/mx0kISyQKLH85l5GEJtXwFni8qu/UEPPMEkcv9fDDJEQlDg58wkL iM0sYCYxb/NDZpAFzALSEsv/cUCE5SWat84GK+cUsJZYN2U14wRGwVlIumch6Z6F0D0LSfcC RpZVjJKpBcW56bnFhgWGeanlesWJucWleel6yfm5mxjBiURLcwfj9lUf9A4xMnEwHmKU4GBW EuGNXumbJsSbklhZlVqUH19UmpNafIhRmoNFSZxX/EVvipBAemJJanZqakFqEUyWiYNTqoGJ 12jVtS5O83NXWjMCK4OfL/jV1f7rstbeyCmnPonvWNboZ7OCO/Nlp4v557eCcyZr7NV64t/i fuc/U752aQ/n0z6Dcxc6ttftKr9/VK+bXX/+Bk9pRvc5MZHTK/RsM9mVGd5uWsQW8yPs0xeH i08DTxl/OLWrcuOLLPGdWveWc4idWL46yeGO7mHHvPlRps3O658wqt04l9e3/94+tfp4ywOt rRPWft69+/HVyh2uv8Q2cjOvsP+ecEDKlH9ZulnstL1V0U71Qpt/lcVfq2afZvabebITf1SG v57o9YjKzIq4HbVnamL2G39wKWt8pRI882vndZ73+xd8kYh6fVj2p7rLf+2ezl0tny38tiso sRRnJBpqMRcVJwIAAu4TPpMDAAA= X-CMS-MailID: 20240523071219epcas5p2e8a92db80cd848b52d49715b1c010006 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----Fualeei1.f5fhWGYL679EBd0hH5-OLgtfrOtH6wInDZGwDEe=_1f672_" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240520102830epcas5p27274901f3d0c2738c515709890b1dec4 References: <20240520102033.9361-1-nj.shetty@samsung.com> <20240520102033.9361-2-nj.shetty@samsung.com> <20240521142509.o7fu7gpxcvsrviav@green245> <174d4908-b81c-4775-9b99-b0941451cb0e@acm.org> ------Fualeei1.f5fhWGYL679EBd0hH5-OLgtfrOtH6wInDZGwDEe=_1f672_ Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Disposition: inline On 22/05/24 10:49AM, Bart Van Assche wrote: >On 5/21/24 07:25, Nitesh Shetty wrote: >>On 20/05/24 03:42PM, Bart Van Assche wrote: >>>On 5/20/24 03:20, Nitesh Shetty wrote: >>>>+    if (max_copy_bytes & (queue_logical_block_size(q) - 1)) >>>>+        return -EINVAL; >>> >>>Wouldn't it be more user-friendly if this check would be left out? Does any code >>>depend on max_copy_bytes being a multiple of the logical block size? >>> >>In block layer, we use max_copy_bytes to split larger copy into >>device supported copy size. >>Simple copy spec requires length to be logical block size aligned. >>Hence this check. > >Will blkdev_copy_sanity_check() reject invalid copy requests even if this >check is left out? > Yes, you are right. We have checks both places. We will remove checks in one of the places. Thank you, Nitesh Shetty ------Fualeei1.f5fhWGYL679EBd0hH5-OLgtfrOtH6wInDZGwDEe=_1f672_ Content-Type: text/plain; charset="utf-8" ------Fualeei1.f5fhWGYL679EBd0hH5-OLgtfrOtH6wInDZGwDEe=_1f672_--