Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1098675pxf; Fri, 2 Apr 2021 00:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxe2tA5rcnLRmfO1SMD9WgqONWSig6AyMQ7QqLRTOt3F2HwzlYI8CQNK9h88HE39fnGva1D X-Received: by 2002:a17:906:b341:: with SMTP id cd1mr12694996ejb.391.1617349731050; Fri, 02 Apr 2021 00:48:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1617349731; cv=pass; d=google.com; s=arc-20160816; b=mozM9ki66UGNJdyZ9/flcVpIkhgMFlBU3xOc1dk/6U1cpJHRo8CEZoIfNxnxjrE9KR HGoXLwZ0qHL6LYQOTlj2eVt9pR02YcjvzvcKcScfP7pTlcVZRsIt0B/hQNz0bXpuPSDA 3Bm33NF3xHr+peoB+ab8eWPSuU38d0Z7jPA6wV7Asr0oKTMPNrBvwLaCglpO7puEmhet c7uLybwjRMXko1PR/oXLE68DZ9s3uiH+tr6ZFcRYPJkrASU9/uDF0srKQDVy2frNbv4T eLz6x9dCNplnzb5WfNIooGMNinkno1M2yuDi4hHjmLqbiwn9rAZ9+1lF6z4BQlIKP5Yx Wnsw== 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:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature :ironport-sdr:dkim-signature; bh=0xQLj03wqgxFsDutGf5dPvH9zHchpTKioSuv90CUSWw=; b=uy249B5ayji0sd0Bb2NvQY8a1Kj7Uk6Hioi5WfkjbSbhzHVPyV0ADH1ILgpBZnSqhe iNUV5Ie5WNj9qDjYSuyM5/z1ipxp2sAl7pOidUWeDHUlUP67+dliXEdah6bWktWWthR6 02jY+rtuRugLBEUwEXSpZ/fPr/z7s07WN4Qc0PIP7LoqxYBWCYCB0ikZGdmjVliokuo9 FjnKMyezLG21RKLOrb3iXkj2cUkgnSGH+L9CDeF3VUHvX9DznUsg2kekY9W8T5Qc5NM8 YcsuWxRjYB51IdJgQ/tC31n7JwmfvifPY34KQLb+KttZtx8HWyF4l05DMNdUl53Gf/i5 DKHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=X2Jqh0TG; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=E4hTDew5; 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 gs18si5975229ejb.648.2021.04.02.00.48.27; Fri, 02 Apr 2021 00:48:51 -0700 (PDT) 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=X2Jqh0TG; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=E4hTDew5; 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 S234356AbhDBHru (ORCPT + 99 others); Fri, 2 Apr 2021 03:47:50 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:2651 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbhDBHrt (ORCPT ); Fri, 2 Apr 2021 03:47:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1617349672; x=1648885672; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=I3B6jC49pW/7QgxPCLRNB1ZIA/iSKPr6K41Egnk08gc=; b=X2Jqh0TGDzyynW8lZ9sFPS5jauP7Q9Jo1oLMJMIKxNtsgtmKiFTUL2cr d0V1K0EEJ+T76GEXBXEJL8szeTghJm0KCl0jk8Cb3HgAZEhsr3n3gJiip zgtGrFez1fW8tcDOpnORYnQAskc5kUZ7Blz41cEFyfEGNBPCO41lyZOyf JDUDC87uA1L+CcNxZO9b1YXqKqaidc0oqWWJ9uK2LKRo82pWMHo8VNPrg plIwqRNtHKhPwNtZMhDkpjg5vtL9c4NYbezReJltlDikLD45vqasIf8tB U/siBSH+SpD1DPkvnF5/MzTve9ea4pBn0qgjb9FX0ER8HHD3lBAtfWdHz Q==; IronPort-SDR: JG87bHAPFM6IvOklwvrKa5JUOhDTbkbzg/UjcIJRJdqcYHbo0HeE9kRPCuUXHdWcTl+8G0Iq4x 2aX1on7J0tpddSSP/oPEp1inlQDtttbGHsdFUzO96k3ydiUs/NXhJuAs21GhlrYLpW+chy1ak3 KjNRJyhP+TLn9/Y+lMosIjURsprIfW1rFTAvE5QOuv/KDltEUNHLJNzm6GIz80+hs4S8UdzBHS N5xee6D3/2TvQ9ZyN7KbOFGGAPjckhWXGeS56gkaiFtjwVvHwiOCpB6f45K71HetGxcAS8aU59 nVU= X-IronPort-AV: E=Sophos;i="5.81,299,1610380800"; d="scan'208";a="268028862" Received: from mail-bn8nam11lp2174.outbound.protection.outlook.com (HELO NAM11-BN8-obe.outbound.protection.outlook.com) ([104.47.58.174]) by ob1.hgst.iphmx.com with ESMTP; 02 Apr 2021 15:46:44 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+NqacIm64FAsxOAdAUBqUhcY8BCPHBc1B8xW7Ampwat5j5kZ9A9e1CYfReNThRdo93N4xWfUnqURtTGr2l7NEwQphGotOsh/HVHCVirQM5W3Itt7joFnTocLEaX+HcRQ5tVd1vQrpqhwATGJ3gBR2KPmnoCVRX7+wudakwookp+kuOQn9StoS+Mlk72XI1/bQ6XO3FzBYN0kyrXubGm/aZkcG5Fk8tPDt1bd8EelUVygPOS8cbC8vvF1QBNe0U3pBc90eBlE8zM/ekxthUTqf+gOZClq7OlChVNrdGowYHXYhw5xiAkZMaLTtsg9hxuBY6dpyVoXUinrtFS3AllfA== 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=0xQLj03wqgxFsDutGf5dPvH9zHchpTKioSuv90CUSWw=; b=asZUGaAtsX22iTYpwYFgjAIshdVO9RsuW7dO4dz/7Cw4/t9ZXTp16J2tgBoB89og7zAxyAdaJAVSFfsTN7bSGtNBtC05geW6QynmOL62QZwz3gl0vTLgMY4HKZXAfW7lVyobwxijlkiGb8C2N7jYu8TxKgo+9/A57NyEn9X2L719yi1E48tCjuEA8KcbEYH0+Ar882h4JnNdhCeCtGrske4/h0w1tXOGjEzlvxxVwJBhJblKy70MyOlXdl7ZrQjaL4QVwatz4xnpd9Kno/Vaira0ZDwMbOlvYb/U57EhiQLAKNm1pu92C6T21uIwZk2Z2ZkjUws9jAL/28TmASCMSw== 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=0xQLj03wqgxFsDutGf5dPvH9zHchpTKioSuv90CUSWw=; b=E4hTDew5pXccSzn14Pk3rL8B8ibTGxhEHKtvLps4YX+j/659vLgtsPa/tD+31Fn2j6pjsobDu3Wc8YCyhj1PvytrdroVAyEWobYb0E8JFIF1KKJBn38j+uT4YPhmmgqndBfOTj6gHbgd1H1znHNE85iEzP6yNkvazsvXSddzYbc= Received: from DM6PR04MB6575.namprd04.prod.outlook.com (2603:10b6:5:1b7::7) by DM6PR04MB5626.namprd04.prod.outlook.com (2603:10b6:5:167::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Fri, 2 Apr 2021 07:46:51 +0000 Received: from DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::ed2d:4ccc:f42b:9966]) by DM6PR04MB6575.namprd04.prod.outlook.com ([fe80::ed2d:4ccc:f42b:9966%5]) with mapi id 15.20.3999.028; Fri, 2 Apr 2021 07:46:51 +0000 From: Avri Altman To: "adrian.hunter@intel.com" CC: Avri Altman , "bpeter@lytx.com" , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "ulf.hansson@linaro.org" Subject: Re: [PATCH 1/2] mmc: block: Issue flush only if allowed Thread-Topic: Re: [PATCH 1/2] mmc: block: Issue flush only if allowed Thread-Index: Adcnk8DrfYl5cGeLTJWc5CWz12wyzA== Date: Fri, 2 Apr 2021 07:46:51 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=wdc.com; x-originating-ip: [77.138.4.172] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 47c23beb-af9c-4f0b-b0a6-08d8f5ab7a9b x-ms-traffictypediagnostic: DM6PR04MB5626: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V6BFO+WHHOScXUvoWdn3NJLK/UMw8YdtdoriZkLF0dJFiSTy6SYTfX6h3xAa3Zs5+UsBiEeKwmnKKL2cMT9BkSLFiyGSC7VOso3TJi/RJBMpJDEZL9I4iS6qjVOdUXgmlbvf7mNC/J5gM4CuKhwfx4vluv/ZRDuwdsW5942wyWtLDPXwSxpng8IOzfi89aGyGBJMmdXufBG/yEdFyWaTEL5YtdF1TbZYbydgbyLRMx3tdbsVLOU4nB1isHq5m5sRTJR/p2BO0hIi91lJjSIHXu55r9K9Ld4eeMffk29kUQPx8WNnE4QZ3bcSfkletY8qIS1fqwexk8XeDmzVfw2vU+lPDwnJljh8o8WBbC/3EajPE7PPcqMbUrDH0eVqBgI14Fv9BYln8tNDnvJGRsCMtqd0zpa4EHkUxgRYteUWahWBbphNzPaJqAR+XNghHDZAajswOa17HWISacsx4wPRXshxKeBrizlBgPAdYGwFT5e7jVm7g89DvmtaNcWtOkf5QBH0IDCARJ3ogk4aU0Ggdm2S7kFu6Eud9/0QWujzVhTRR+Y+KQ+uDZqWIB+yJNqo0hJdXTIE0daIvOHxsy5hAixdezf18JE+lqPJa2A48KKT7qS6FGNF5xjiE+xFvLj+3pYR+vRSptiTf6DI8yddsvsInOd6zAmqBRB0g6jxgkc= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR04MB6575.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(366004)(346002)(39860400002)(376002)(136003)(76116006)(38100700001)(83380400001)(478600001)(7696005)(8676002)(66476007)(186003)(66946007)(5660300002)(66556008)(52536014)(64756008)(66446008)(26005)(33656002)(2906002)(6916009)(4326008)(54906003)(8936002)(6506007)(55016002)(9686003)(71200400001)(316002)(4744005)(86362001);DIR:OUT;SFP:1102; x-ms-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Xux55bdq5NKdSWsptQ9c2w6msm1BAKRwmMvLMlHoWQddf?= =?us-ascii?Q?pE6k8ct5hmGrjeHrlMgkRnlbL+ZRATYZ74Z+TDh2CtfwieChnhaDHlna3Kta?= =?us-ascii?Q?M23qzmqWlcUt+X/CkCSwQEtUY0nNNfsu3NybBGdzreB7tnq6jMnEKL6I2IH/?= =?us-ascii?Q?KTuUepAGn5ieosDTkjjOrfWYV3svvSisI9FsjGUIhefzpt0mUs3ebEbescs7?= =?us-ascii?Q?fwz25cCS2Aw5iw6FBoyWMSvSlI5SFCfkz/IK4vhjTyE749hFD/nKVwyzmifL?= =?us-ascii?Q?1pl8TOw7d9hQqjldis0jSZhsg5xtjuGuJIN3Ch7a48PNU/UZ9EjnLx6SheUd?= =?us-ascii?Q?VR0MFp56/xxlGO9eQwWJkxGzmmF5AQbnUuFSwu29lPab7CNfVeT9mLHm17ci?= =?us-ascii?Q?9Za0HGCdi4ebnnA9An8Bnfe6m3g8Y4/5CTIOi2Q4zn9XeZjPlEdMBLroEteT?= =?us-ascii?Q?peE=3D?= 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: DM6PR04MB6575.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47c23beb-af9c-4f0b-b0a6-08d8f5ab7a9b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Apr 2021 07:46:51.5204 (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: C4hMP82XrlmaylOVEw/3UapkRD4fPPxd+d43m+bfQFonempAj3F/8tkFmRAs9IRtg2A0naUtSiiCHfh064MV2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB5626 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> @@ -1473,6 +1473,9 @@ static int mmc_blk_cqe_issue_flush(struct mmc_queu= e *mq, struct request *req) >> struct mmc_queue_req *mqrq =3D req_to_mmc_queue_req(req); >> struct mmc_request *mrq =3D mmc_blk_cqe_prep_dcmd(mqrq, req); >> =20 >> + if (mmc_card_mmc(mq->card) && !mmc_flush_allowed(mq->card)) >> + return 0; > Returning 0 means the flush was issued successfully. i.e. it is in > flight. > > Instead, a call to blk_mq_end_request(req, BLK_STS_OK) is needed, > and mmc_blk_mq_issue_rq() must be amended so that it will return > MMC_REQ_DONE for this case. Done. Thanks, Avri