Received: by 10.213.65.68 with SMTP id h4csp1411237imn; Wed, 14 Mar 2018 21:13:32 -0700 (PDT) X-Google-Smtp-Source: AG47ELsPo/UlxRL/HI7qptu7/8RpoMazDUpkQht2Z60gwk+yyZNtFKtGwZ17z/MNX5AfesBaR7As X-Received: by 10.99.106.68 with SMTP id f65mr5630199pgc.343.1521087212449; Wed, 14 Mar 2018 21:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521087212; cv=none; d=google.com; s=arc-20160816; b=Y+gjQNEHu+K4CAIsA2ojxWor9Rq/WA4m3yvLo6LB/n9bTTQxuIOYVMq3JAg7mzh4wB 6vIn1Ei+B+fjYNDTMKts7x/YF31gOOuNAKcizcquaTKdX8IVwqS62YBhRoyt0soI9LT6 52JvonYmglQm6jq9dF/wSvnVGgzWqekLkapi1WYrQu55s7x2TjywUmRALMGuKLrDmwpk Sj87lS6xWczm3M7t28/Z/zxIFpDjt4s1yg134KSxdvvmwntiaOTHcnS1HMO8zzJp0aIB 465ONK/zQRYWnjROHNypaC9VvNOpYG7i9a4kQfC0N0Pem8ZHpY8sRIQ1UqizegjTHkpG 8ugw== 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=FH6Xox8RRQ7pj7JZsLzpB6mBUWjCdcID3uyv0sNu45Q=; b=sXTaAO1hLeriF5HXLtfASq7I1xX6XMJtBeG5JdPBp3ozPIJzhjnrJQH/qgql2uRqMJ nDm5vhqyGhCQOPHKx22UJOQZMh5vYppV+tqgGbkBBSI7bSEc2AnyfkMCnI5r6WIgbrWu dkUlmYqq+ZcjUsSftwq1YEV+/gVim4UsV17EqV7nqHa1XU954JS2hWpWcO/88YPQ4grv eJsufCmk0d9Yri8Tg6c01r5mh4Q5/yJCYPpiRKIIDgO5NJ97vpOy9ulDVqTZUuSBqb1q A/A/Yuasa8bABN3mmx6rGJliz0FmjJurC6uPsg8no5ujhgweRH0o/xfyt/UyD0EazBkt 3z6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qeWsiFFG; 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 t11si2883008pgn.624.2018.03.14.21.13.18; Wed, 14 Mar 2018 21:13:32 -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=qeWsiFFG; 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 S1751770AbeCOEL5 (ORCPT + 99 others); Thu, 15 Mar 2018 00:11:57 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:53196 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683AbeCOEL4 (ORCPT ); Thu, 15 Mar 2018 00:11:56 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2F4BnLc102983; Thu, 15 Mar 2018 04:11:49 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=FH6Xox8RRQ7pj7JZsLzpB6mBUWjCdcID3uyv0sNu45Q=; b=qeWsiFFGnE0iY8k+Yi+5gtCQQREp4DVzRVvn8ZO8WQ3J52XvISJk6pnu8eYeCeX8kaf4 vC/tkRcMTpy+YKZKGiwouVEUjp0hBa4d2rlgnilJZxB/Nk1EQDd7Df8ZTBPZ5zSCe/Mb SsUPiTod1ZGo6EEJfl6xRT60+96gM6dqIVYl1v7WUh655owTosYxFzvQsqaM2okU349s Dxy7oHYsRzvYUjpn+zys7qzMXHakCSZexDv+V9DFGQSKhcz9TDslqaxvf1KZzZ4gWVgE N/YIXVk0tOhS8s6pmviXvG6LZzBVQpI1zwpEbci0remzaNb/5Je5gNL4XvslizCQ+2w7 Jw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2gqg8fh8f8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Mar 2018 04:11:49 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2F4BmeD011283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Mar 2018 04:11:48 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2F4BlCS002788; Thu, 15 Mar 2018 04:11:47 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Mar 2018 21:11:47 -0700 To: lduncan@suse.com, cleech@redhat.com Cc: Jianchao Wang , 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: Thu, 15 Mar 2018 00:11:45 -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=8832 signatures=668690 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803150047 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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. Lee, Chris: Please review! -- Martin K. Petersen Oracle Linux Engineering