From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0051BC77B7A for ; Tue, 16 May 2023 13:24:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232619AbjEPNYb (ORCPT ); Tue, 16 May 2023 09:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232603AbjEPNYa (ORCPT ); Tue, 16 May 2023 09:24:30 -0400 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5BC65B98 for ; Tue, 16 May 2023 06:24:17 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20230516132414epoutp0369b6ee8b84c40dc6b6d96585865431a7~fon_Wpgwe0983509835epoutp030 for ; Tue, 16 May 2023 13:24:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20230516132414epoutp0369b6ee8b84c40dc6b6d96585865431a7~fon_Wpgwe0983509835epoutp030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1684243454; bh=cg4C7x99d6gMeddzSh0dDTiOK7SmEUwxAYZsbOtNGmc=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=RHduGJ+mox1uwvkL9CrWTwdjQY64J+OI+raGGaQy72CRRpH3JriElZYia6c1jwp9F 9GaQB7xwDbxZZFrvZUNIDHUOxobum8hoo1gdK+NuhwiZs5GnJ0VneDKXfQXK23tUQa vyA9Gvbug2YRGMkMPXIu1CgTzFBi96BnyqXjbMSc= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20230516132413epcas2p15f78b10667e670c1546ca1dd981b3745~fon91tdyG0107401074epcas2p1h; Tue, 16 May 2023 13:24:13 +0000 (GMT) Received: from epsmges2p4.samsung.com (unknown [182.195.36.100]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4QLH5935Ddz4x9Px; Tue, 16 May 2023 13:24:13 +0000 (GMT) X-AuditID: b6c32a48-475ff70000005998-c3-646383fdb5d3 Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id E4.7C.22936.DF383646; Tue, 16 May 2023 22:24:13 +0900 (KST) Mime-Version: 1.0 Subject: RE:(2) [PATCH v2 05/14] block: blk-merge: fix to add the number of integrity segments to the request twice Reply-To: j-young.choi@samsung.com Sender: Jinyoung CHOI From: Jinyoung CHOI To: "hch@lst.de" CC: "axboe@kernel.dk" , "kbusch@kernel.org" , "sagi@grimberg.me" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "johannes.thumshirn@wdc.com" , "kch@nvidia.com" , "willy@infradead.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20230512135136.GD32242@lst.de> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20230516132412epcms2p2549c58f92db9919002c7e05ed044bcc8@epcms2p2> Date: Tue, 16 May 2023 22:24:12 +0900 X-CMS-MailID: 20230516132412epcms2p2549c58f92db9919002c7e05ed044bcc8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P X-CPGSPASS: Y X-CPGSPASS: Y X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMJsWRmVeSWpSXmKPExsWy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v2e46mK65N1PNMeplgZ9F/caxZYMlPL4qvEOsey 0jD3pDVGEp5rlVYf+lfFsiRwVbTXptj8RwXpWqdq3yq+fpy+8UCM1v/Y0ik3Ltx51/p6x6ug /u03nJmUCw7dFDkV8er+NjFfhx1q+Qel79itOdwdu9S/adnayP+TzE4V5gY7bhVVYinOSDTU Yi4qTgQAsFJUy0YEAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684 References: <20230512135136.GD32242@lst.de> <20230510084407epcms2p123f17696d3c30c749897eeaf2c4de684@epcms2p1> <20230510085208epcms2p52a6dec8da80152ec2101f11ce2ea5321@epcms2p5> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org >The subject looks a bit odd, I think you're trying to say: > >=22do not add the number of integrity segments to the request twice=22 > >based on the actual patch, is this correct? > Yes. I will fix it. >> +static inline bool blk_integrity_bypass_check(struct request *req, >> + =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0= =20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20= =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0struct=20bio=20= *bio)=0D=0A>>=20+=7B=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0return= =20blk_integrity_rq(req)=20=3D=3D=200=20&&=20bio_integrity(bio)=20=3D=3D=20= NULL;=0D=0A>>=20+=7D=0D=0A>=0D=0A>No=20need=20for=20the=20explicit=20compar= isms,=20this=20could=20just=20be:=0D=0A>=0D=0A>=20=C2=A0=20=C2=A0=20=C2=A0= =20=C2=A0return=20=21blk_integrity_rq(req)=20&&=20=21bio_integrity(bio);=0D= =0A>=0D=0A>and=20given=20that=20it=20just=20has=20two=20callers=20I'm=20not= =20sure=20the=20helper=20is=0D=0A>all=20that=20useful=20to=20start=20with.= =0D=0A=0D=0AThere=20are=20many=20conditional=20sentences=20like=20that,=20s= o=20I=20left=20them=20for=20unity,=0D=0AIf=20it's=20okay=20to=20change,=20I= 'll=20do=20so.=0D=0A=0D=0A>>=20+static=20bool=20__blk_integrity_mergeable(s= truct=20request_queue=20*q,=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0= =20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20= =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0struct=20reques= t=20*req,=20struct=20bio=20*bio)=0D=0A>>=20+=7B=0D=0A>>=20+=20=C2=A0=20=C2= =A0=20=C2=A0=20=C2=A0if=20(blk_integrity_rq(req)=20=3D=3D=200=20=7C=7C=20bi= o_integrity(bio)=20=3D=3D=20NULL)=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20= =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0return=20false;=0D=0A>>=20+=0D=0A= >>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0if=20(bio_integrity(req->bio)->bi= p_flags=20=21=3D=20bio_integrity(bio)->bip_flags)=0D=0A>>=20+=20=C2=A0=20= =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0return=20false;= =0D=0A>>=20+=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0return=20true;= =0D=0A>>=20+=7D=0D=0A>>=20+=0D=0A>>=20+bool=20blk_integrity_mergeable(struc= t=20request_queue=20*q,=20struct=20request=20*req,=0D=0A>>=20+=20=C2=A0=20= =C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2= =A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20struct=20bio=20*bio)=0D=0A>>=20+= =7B=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0if=20(blk_integrity_bypa= ss_check(req,=20bio))=0D=0A>>=20+=20=C2=A0=20=C2=A0=20=C2=A0=20=C2=A0=20=C2= =A0=20=C2=A0=20=C2=A0=20=C2=A0return=20true;=0D=0A>>=20+=0D=0A>>=20+=20=C2= =A0=20=C2=A0=20=C2=A0=20=C2=A0return=20__blk_integrity_mergeable(q,=20req,= =20bio);=0D=0A>>=20+=7D=0D=0A>=0D=0A>Similarly=20here,=20I'm=20not=20even= =20sure=20we=20need=20all=20these=20helpers.=20=C2=A0I=20supect=0D=0A>the= =20code=20would=20become=20more=20readable=20by=20dropping=20these=20helper= s=20and=20just=0D=0A>making=20the=20checks=20explicitl=E1=BA=8F=0D=0A=0D=0A= OK.=20I=20will=20drop=20this.=0D=0A=0D=0ABest=20Regards,=0D=0AJinyoung.