Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp359777ybb; Wed, 25 Mar 2020 00:55:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt9rBbaQCc7jjhlwjG5/p4h02YF5BByft3fOT7aB1Lx9r93pBg6uWI7XU5hw016IPlT29Ui X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr1582222oth.208.1585122919654; Wed, 25 Mar 2020 00:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585122919; cv=none; d=google.com; s=arc-20160816; b=l6Zcnlk6ryfPGwNj/RLAdkId0YYjTcZIfEcd/mzw2833CrdLjlalRLL+FiI1gTml0F ekRUtMadtH/RzXEWnjaU05AQqxSJy+JyNID4own+ynFd1VPO5ZkrXgGgNpBRZ7U9FPZP wYZdZzvWa5lKMP8TuWXMyvmiAzfvsveT1BN+R9Poxu4XZ9ioUqIKa0F+vmi7W/fqJUZU gyU4R9w5n4y0s8dCCcCIXPYyRqTMT6TRoKki4u81YQjMN47oG3kfe5zxoqrXldhafXvx sICicv3ocdIlN6RjGzlrUWLFByHQVUpYrxPY0tnuS+nLXzO2+RLHdLdze9oPV8NZQE6Z RRFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=afcLyau34OKxj4QI+8zUCwkGWuJzCC31Q34i4nnDw8Y=; b=RT3nfPpTw77S4SWLwIT7tsO2e61DlWHstRbaCir0NT16URu/F5v1rdZq++0Jjn/FGB rPxL0kovBOYUVxbLyJsCbCkaybVUhcmZS5n5GwmXM29jhgKfsA+STAmjal4OBNAabFjA buwEYYgQvQ5cc3RWb+P+G2b1whEkYeYS380ILRzYJjdaBjdkB2sQdGRMImZpaiocBbvQ twSKSSO+vKDOsTTzU+w6J5M47WweStR+TcnbO5BuGutTsKSaRnLdmuj9uP6YQhXArc6B FgMynTULg0D9SiUAbylJ4OLb1fzOJYP9nh59CNPgeHAG93p7L1HxxsLTPaqoDILCEzIy bLSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x136si10440668oif.122.2020.03.25.00.55.07; Wed, 25 Mar 2020 00:55:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727279AbgCYHyP (ORCPT + 99 others); Wed, 25 Mar 2020 03:54:15 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:56512 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726103AbgCYHyP (ORCPT ); Wed, 25 Mar 2020 03:54:15 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DD25C3C7575C8B8A45B8; Wed, 25 Mar 2020 15:54:02 +0800 (CST) Received: from [127.0.0.1] (10.67.102.197) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 25 Mar 2020 15:53:52 +0800 Subject: Re: [PATCH] mtd:Fix issue where write_cached_data() fails but write() still returns success To: Miquel Raynal CC: , , , , , References: <1584674111-101462-1-git-send-email-nixiaoming@huawei.com> <20200324230620.174db1a7@xps13> From: Xiaoming Ni Message-ID: Date: Wed, 25 Mar 2020 15:53:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200324230620.174db1a7@xps13> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.102.197] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/3/25 6:06, Miquel Raynal wrote: > Hi Xiaoming, > > Xiaoming Ni wrote on Fri, 20 Mar 2020 11:15:11 > +0800: > >> mtdblock_flush() >> -->write_cached_data() >> --->erase_write() >> mtdblock: erase of region [0x40000, 0x20000] on "xxx" failed >> >> Because mtdblock_flush() always returns 0, >> even if write_cached_data() fails and data is not written to the device, >> syscall_write() still returns success > > I reworded a bit the commit log and also added a ' ' after 'mtd:' in > the title when applying. > > Thanks, > Miquèl Your revised commit log is more accurate and clearer, thanks for your correction Thanks. Xiaoming Ni