Received: by 10.213.65.68 with SMTP id h4csp82307imn; Mon, 19 Mar 2018 20:28:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELvP6tTOGTAaCyoEzEugKFxySRqDR+kgY8syiHB+C/Mjm6xo3KuK2UcCse8j6K7EZz+e2OSe X-Received: by 10.167.130.130 with SMTP id s2mr12141091pfm.136.1521516534620; Mon, 19 Mar 2018 20:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521516534; cv=none; d=google.com; s=arc-20160816; b=O+xTd24cYanOHgSQ/9iYWbzyl1k2hpwaaZjGWIOoyPAk3F5uQcwjWVbSslfbK82kj+ ic4HD4PdbwVutFS5ilV4g5t4fAzl6UTA0HSP4PXkmZfU0Ti6hZp3EUzx3QAUoHw11VHB l13f99CkD4X+sWqvgVytjYQmWz6Q5I/XXQtB8FoGRcB2kRyoJVBREC6KxzdmVJHSPMSN tBAnS+e3yYoimy0HynlCVjckNSWMw2CvK2tKFmhkvW7KL8oJ/zoGd8cx+7wC9ipAI/IB eab0cYmV7gGNRTEzuor4nWdXoH4v8k2CPPWCOnJJfFigkABr93OthlYCl3cPCmaCmhTc z1nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature:arc-authentication-results; bh=dTZ5MWQ901Mwxi1XnBm/nLqc2j4Wbf9iza2Nfvgsu4Q=; b=MoNREW2RUWkG3BGsEfwvg5cYCGAV4A+SBHLZwrvGQqMrTGZ5/W+iifdVS5AsVqeUFe g0meEGt0dAyAwO05/22NU+r88t1XiboLuPBK4cNP56xdUBcOAjmmZe5sOxoaX7lrqGK8 m3koH7otnR1dIP+uvCi70QdkA5LeyvGgqvw+5ecvp429KmrLRLANyvg7Cy4tVU8BqASt crQSMqPpuwlSJAW9+x2u8YfIE8WFuH8TPrC36sUsQ+2YuZDz9RZuvAthMN5PDkh6FG29 ta6LV2bSrPdGUZwuWSSbMBewlyD9/RblrUrqPqH7U4yakqg6PV98HT5fdTQQZ5bf205u wXWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=AYCVV7d2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 200si539955pga.50.2018.03.19.20.28.39; Mon, 19 Mar 2018 20:28:54 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=AYCVV7d2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751597AbeCTD0j (ORCPT + 99 others); Mon, 19 Mar 2018 23:26:39 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:38190 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbeCTD0f (ORCPT ); Mon, 19 Mar 2018 23:26:35 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2K3D62G012894; Tue, 20 Mar 2018 03:26:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2017-10-26; bh=dTZ5MWQ901Mwxi1XnBm/nLqc2j4Wbf9iza2Nfvgsu4Q=; b=AYCVV7d2YQmZZB0MaiL72CHI44yswuhWkkK5A+/VTZyVvf9kLAGssaIwB3gfnaNUj7EP vKq54WyKmxXUqW7Hih58TVtJSzn2oGU6+wZnhpt8acKfr8ACn4XGbzarh1wV8kt7Wlu6 z/AaoP155LYdd0C37s3nosfyNZDCoDf8pEz6sF6L25lTrmAl+kmlmYnxuTBVaoYJ2P1S aDtL6r0TIQuTuVeTQ/FMikxbR29B3mTpJapkcp8cbpGlI+cDimTw9Azs9fMJYL7mShZL JJnHollRUKAC8k5VpNNAqQZ/8LBCRv7ZmbhbCIGk3tRFz1y3RVLJ/5U8Eedow3QpzG/y rA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2gtt7000rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 03:26:28 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2K3QSeV018615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 03:26:28 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2K3QRdu013862; Tue, 20 Mar 2018 03:26:28 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Mar 2018 20:26:27 -0700 To: Jianchao Wang Cc: lduncan@suse.com, cleech@redhat.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: iscsi_tcp: set BDI_CAP_STABLE_WRITES when data digest enabled From: "Martin K. Petersen" Organization: Oracle Corporation References: <1520425743-1923-1-git-send-email-jianchao.w.wang@oracle.com> Date: Mon, 19 Mar 2018 23:26:25 -0400 In-Reply-To: <1520425743-1923-1-git-send-email-jianchao.w.wang@oracle.com> (Jianchao Wang's message of "Wed, 7 Mar 2018 20:29:03 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8837 signatures=668693 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=951 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803200006 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jianchao, > iscsi tcp will first send out data, then calculate and send data > digest. If we don't have BDI_CAP_STABLE_WRITES, the page cache will > be written in spite of the on going writeback. Consequently, wrong > digest will be got and sent to target. > > To fix this, set BDI_CAP_STABLE_WRITES when data digest is enabled > in iscsi_tcp .slave_configure callback. Applied to 4.16/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering