Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp802176pxb; Tue, 2 Feb 2021 19:23:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAHQvMHqEfLGOwKZtw7zGCA/CDc7unzE00wETIt9AaGf5O0zOGpdpCUt0lNFDLpGcX9Uzl X-Received: by 2002:a17:906:7cd8:: with SMTP id h24mr1067735ejp.511.1612322595488; Tue, 02 Feb 2021 19:23:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1612322595; cv=pass; d=google.com; s=arc-20160816; b=ZL9EwWb65PbzQi+Md8lacdVulz7Da+g0x8D6ABcTjYHIZbko8ba84aCiUpBzsm725t Yhw1hMg1JCJGz67NdGtF/Qp5xHeS6MmN09m/U54JFOYzVj+fKkYCTM+cNJSSgJOMehI9 pVZPwkV1inFMGukg4fuPD8dQPcyBdfsUf1ut56N5eoZ8eWzbKY82I/SccP3XFgH3W8G1 pkIY2UGQgtu2HJb5+U3PRj7pm8p0LF8IAdFzcNLsPEYXtwrSk3v86bYmjMsxZo7j71zR GXSuMApYkR28iXnY5ZM8sdc8pSddW/5pLFc4b96wD4mA4qZzGIo19lJ2g0vwpkl1DRd9 riEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature:ironport-sdr:dkim-signature; bh=YMQhKFtRtLqPjRV70p4EozidkO/ti34R32K5b8W4n40=; b=GPWJ9Qh+MS1h2h0njBb/B/rddKBTKrEDD7hlZvUHUx/IjGTEnSuYYHWG3bgGmh/Jk2 hPfgYeDuZLGS/axto1KFiGPoQzlYmWgjO9LTPCxwBvE9zj+hb51MI/aQCro+1GqgN4Bb 0KLhH6FecvwYxxDHDmIM2UTTSg+N7rnqLRquaFGH3214C4TNJ1ZlYLYm9Vrzsj8vqPQn HUFB6KqzFIbdYvzC9qoIriOXAiZO280rikw2vVm082fkAExH/EFraJDKebjQPMUB5vBM D4DWvIOFBqDetK4eZR4sVMuLZujb2zOZgy3Uvww+tcGqIx0aWNpdAirxCKvSvdargFvV gazQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=q48cq8xp; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=C0amVrCr; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si388555edc.411.2021.02.02.19.22.49; Tue, 02 Feb 2021 19:23:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=q48cq8xp; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=C0amVrCr; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232813AbhBCDUu (ORCPT + 99 others); Tue, 2 Feb 2021 22:20:50 -0500 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:41956 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbhBCDTV (ORCPT ); Tue, 2 Feb 2021 22:19:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1612322403; x=1643858403; h=from:to:cc:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=gdJQwA7+aePYlkEbGLSqq6gZsKndJ5GziS16JpPBdNQ=; b=q48cq8xp9Z7WS+zUi5+zog9nGln+NJpg6a8jnGQoScjXU12S5eve0tBq IYVcVjIopcN19HCCtP1Y7IwN9pu2hyZ5uTyUv8zQDJyzphmQHVrHPSh5C 6Wu5bf954b+2QmDhd4J8x6c05Cd5Xo83DI8BnFxGn+QDS+ZNjAiZxwFt2 xhEDK3PvKghFOqAtblUQ9MDGzQbxlJvlWM5sKgFF4KyPTJEkoHBv+cOij qN1pcK9XUY98+HnIZjvGWSJlsDhywUEzgBWyFpOwiIv7H/j1jSeeIYrYH vWcrQIgnEb++33upRpyIlZVwgKIMyYZTMPuZ1QPZsysyE2RDJmLuj4I4Z g==; IronPort-SDR: 0Dwf4sDUqebxWLFD8yi/1OtPbFbf7xCwdPv9M6PoyIWztL4+AnTZGgda0tQ9tQoiJNFUtaWvdh QlNLtdwIjqYCzoiw2wQj+AuL+5Zj5zlIQeTX4EdWtigvZQHOCa9Po2JkGp+8pWU9aDlpYEWnZ7 UPXHb6NdBLDkb/KW8BxKo7Ig/vZFXvqdi6JvTbPvloernJLcBTE16XnyUQz//r0Kl7+Qr4z3Nv JHiUzOMF0CFnQK1r4Jy6R5PEC/WXzV6DU7OUaXjsRKCZIDpjXEizbrlOPBq3Cbb06nEB9MPiol pYU= X-IronPort-AV: E=Sophos;i="5.79,397,1602518400"; d="scan'208";a="158984215" Received: from mail-mw2nam10lp2106.outbound.protection.outlook.com (HELO NAM10-MW2-obe.outbound.protection.outlook.com) ([104.47.55.106]) by ob1.hgst.iphmx.com with ESMTP; 03 Feb 2021 11:18:49 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pa6GpK+U5SCrD3hcaX4KuLr+sx0MXUQZsL2GR4K729T003YqUaDydxM1ErbzreiCHK+BGs5HxTRiQy24fnrJaTMAV+d6MaGOLhspYT8Xli/CFLIOqCwc0dEMO9Q4Ltfe07qAlj46WPDFwy7M5cG5vpQXtzGD7MreLOrbqRlaIzw3WRihVVVHZPtR8sksJ8q4/GVPOpE2X9mb5Rh3FFwc0j+gVHTsaGM+x18YVm18tyF0FuYu5KZC9K12EzWO90fo0srEwWfbWi+ytBcma/puMaZMrg8EGRpLkUQtJfarIF7nGifzDgiLmNmklhaNc1LnslbAceZ06QxVKwxFWEjo4Q== 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-SenderADCheck; bh=YMQhKFtRtLqPjRV70p4EozidkO/ti34R32K5b8W4n40=; b=QVCXxVxdXxPWcaDz2mpaSzf2HJVco456puJNnLjv5C7yQaA+A4PirRTYSsCCT9NZybJB46DvulUZ/tedKqAwaQahBMjB6Qp7iu/CEiTsUl9viQ7CtxoY8mTr34lfzF+M2Z/nPf2XMQI+fW7cmuiboNBAcQQYF8DhzC1hunqgTXYBs9vcO9IDbOUtTlRk4pqWB4cwgLYwWu69iOlsfk5P0sNKfTTdUUcsWUg26H+tzIXdxIvjz6yEBGn4v1c5xoAW4yr+AD5ESVNGk7vsiq5R86qvAQK1lisxFKIkyebki8KBrYystdP+FYjmbIj/HmsXXdy4hUwvL3CIdsXUyWFAEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YMQhKFtRtLqPjRV70p4EozidkO/ti34R32K5b8W4n40=; b=C0amVrCr2X91XvlurfyvBKfWXuz44ccyN7jdT1aRaxTpOOu4NtP+wYzkt+vUcGOM3Z/Gyp6MXgrrEQ2bo6Ud4A86pseYIAfItpQD+bJJBvN6XAzuPfRY5b7ne8F7rTgAMnj/v4uvLQLljCGJbTmnU+wMrjPne9kIRS1cQKcnPS8= Received: from BYAPR04MB4965.namprd04.prod.outlook.com (2603:10b6:a03:4d::25) by BYAPR04MB4328.namprd04.prod.outlook.com (2603:10b6:a02:ef::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Wed, 3 Feb 2021 03:18:48 +0000 Received: from BYAPR04MB4965.namprd04.prod.outlook.com ([fe80::1d83:38d9:143:4c9c]) by BYAPR04MB4965.namprd04.prod.outlook.com ([fe80::1d83:38d9:143:4c9c%5]) with mapi id 15.20.3805.024; Wed, 3 Feb 2021 03:18:48 +0000 From: Chaitanya Kulkarni To: Ming Lei , David Jeffery CC: "linux-block@vger.kernel.org" , Jens Axboe , "linux-kernel@vger.kernel.org" , Laurence Oberman Subject: Re: [PATCH] block: recalculate segment count for multi-segment discard requests correctly Thread-Topic: [PATCH] block: recalculate segment count for multi-segment discard requests correctly Thread-Index: AQHW+LqCC5Q5kKmvR0+PLotT7t4iaw== Date: Wed, 3 Feb 2021 03:18:48 +0000 Message-ID: References: <20210201164850.391332-1-djeffery@redhat.com> <20210202033343.GA165584@T590> <20210202204355.GA31803@redhat> <20210203023517.GA948998@T590> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=wdc.com; x-originating-ip: [199.255.45.62] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 49c004f4-581e-4fe3-2dfc-08d8c7f26c49 x-ms-traffictypediagnostic: BYAPR04MB4328: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:2201; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SOfBH0bh0rQ3kBrmG9aiTEtQQo6QYmmv6a1SZQygBfRCYe8a5naPXbVeKzzGCmfsQyfWI8jprdzBqBCzyqwdA/sxm8jJvTHKZ27vhlLHiA8oYqowxI0HgCZUDIkC3s+M/y7fDDVO5Xlx3JxgYExG5Vg9RTrxv6DFNAO1dfd4dSdEcsQ8WtR81+F/Hg23ctTOLZFfJ3OKh+k91kRYoaYnqcO9ocOSMfQKjQXm72julz3IKzYz1TLWaqUkuHaTKOA/HIvSsFzRMdw/JW1EUQOCn5uRZLG+nnyrmjh5ZkTX4K5nebPtBfVSi6wC/qVYcUjvDQ736FcuYYAvGupZ+D4Wp1suQylsuZDUwFjGE7OLecCGGMgxWlDG4t06WTmhMYxH+zyS5AqTpBhn3Eveb2W+eG4WWRLmFe+/MvVSvQiPeq6Pkr3bI/kkhHQX8r/OyClp7Y4A1WwPsxOPgBBg0+FNqFtMmqGsyEn1VZm983jrCjWwEIcAKXTJpQExA1i/Hg88PHWKYzf5jBGB07WOfDZRnA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR04MB4965.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(396003)(39860400002)(136003)(376002)(346002)(8936002)(5660300002)(66556008)(55016002)(2906002)(110136005)(54906003)(52536014)(64756008)(66476007)(186003)(558084003)(478600001)(316002)(9686003)(71200400001)(66446008)(26005)(7696005)(83380400001)(66946007)(4326008)(8676002)(6506007)(86362001)(33656002)(53546011)(76116006);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?uexuoMuK1fu2303Fq9CLeggn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= =?us-ascii?Q?tzCI1DBGd0NPHJgZ0Lh2m9PoT+g+S0bPT6mW0IluEuMvaSWkvozZFw38yAVg?= =?us-ascii?Q?tOJXJugZ+MxIBitwZ/MfnoKeQGWgPdqWxjS4AsV0VZ48r1kdSBa8qfqc3hei?= =?us-ascii?Q?X+9hxSR8qqhfh7eLpgtZ9jm9SHax/7ajBbyvgCS3eoLcvfJH1oxmPNUGgkrf?= =?us-ascii?Q?XrW+VWbqyaA87g2OEuBbYPuiX1jYfA=3D=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR04MB4965.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49c004f4-581e-4fe3-2dfc-08d8c7f26c49 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2021 03:18:48.4883 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VQ3hrzhm1xsvvgUDFIuGlJ/mSX8iik99w/bIG4GAaa4CGc4Gl+fxTjtZR9q5vRuXiAQg21kMXyo+G78lOtQSYwKt0+4iXo7nwoV/hNSXvX8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB4328 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/2/21 18:39, Ming Lei wrote:=0A= > + struct bio *bio =3D rq->bio;=0A= > + for_each_bio(bio)=0A= > + nr_phys_segs++;=0A= > + return nr_phys_segs;=0A= > + }=0A= Also, you need to add a new line after declaration of bio in the above=0A= code block.=0A=