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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFAE6C2D0E9 for ; Tue, 31 Mar 2020 01:07:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBD202072A for ; Tue, 31 Mar 2020 01:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729421AbgCaBHT (ORCPT ); Mon, 30 Mar 2020 21:07:19 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:42610 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729129AbgCaBHT (ORCPT ); Mon, 30 Mar 2020 21:07:19 -0400 Received: by mail-pg1-f193.google.com with SMTP id h8so9546395pgs.9; Mon, 30 Mar 2020 18:07:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZhOw+cmsFZegzfDW5fDINEwsMjwUxjfPEvGqp7eI5u4=; b=bo5ZEfa9Nxm/Fx6IjrFKls3j31XopQ7j2KdR/RslF+/FzrvFKfNyoKdQt5zMTLf8wo dYMt2gS1N53NJQmGFn1OskJLB62NTkqENx05UauPOkBUI+wFhGkuBnkLX0xO6CrtGwMX nMX6zxzK7R5LvbIHiBKtroRnNKQGqnuEg0H6EqdKghvbBrqKAiQvbvvTsoJM1whg9bKB MJx8ge9CyZtKstluw2PvYae8P/aIfbizv15JHD7Ro86XLnFZmM1KlDD6TlzgnYeo+eN3 VUS8MhPRxIAWX54CVUgeID43waS3G+CjT4C+YhFDrU+sbzCIfrp/w/mUFMUnjKn8Sryz AXmw== X-Gm-Message-State: AGi0PuafC6oghmkh/9jb2828EMxgjiN0EWtbI8/3V0ZLTfp1E9aUPy4K om+FW2dJ0xriC11IIHUtwhc= X-Google-Smtp-Source: APiQypJIdVuKuKZ7Aa3Vg7gQq1G9lVCm+lr+jCVHNNN8BOlt4XPlTODgILTRDlepSvF3t5O1Nic12A== X-Received: by 2002:a62:7d4e:: with SMTP id y75mr1984803pfc.32.1585616836680; Mon, 30 Mar 2020 18:07:16 -0700 (PDT) Received: from ?IPv6:2601:647:4802:9070:b015:431e:549a:54d? ([2601:647:4802:9070:b015:431e:549a:54d]) by smtp.gmail.com with ESMTPSA id a3sm600490pjq.36.2020.03.30.18.07.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2020 18:07:15 -0700 (PDT) Subject: Re: Data corruption in kernel 5.1+ with iSER attached ramdisk To: Stephen Rust Cc: Ming Lei , Rob Townley , Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, target-devel@vger.kernel.org, Doug Ledford , Jason Gunthorpe , Max Gurtovoy References: <20191203005849.GB25002@ming.t460p> <20191203031444.GB6245@ming.t460p> <20191203124558.GA22805@ming.t460p> <20191204010529.GA3910@ming.t460p> <20191204230225.GA26189@ming.t460p> From: Sagi Grimberg Message-ID: <82bbbdf2-cf61-d523-29e0-d756b7f208f4@grimberg.me> Date: Mon, 30 Mar 2020 18:07:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org >> Can you try attached patch and see if it solves your issue? >> WARNING: very lightly tested... > > I have run our tests against this patch and it is working well for our > "basic" testing as well. The test case that previously failed, now > passes with this patch. So that's encouraging! Thanks for the quick > response and quick patch. Good to know.. > One question we had is regarding the hard coded header length: What > happens if the initiator sends an extended CDB, like a WRITE32? Are > there any concerns with an additional header segment (AHS)? You are absolutely correct! t10-dif is broken with this patch as 32 byte cdb would break into two buffers which is not expected by the target core... I take back this patch, I guess we should keep contiguous allocation but just make the recv wr such that the data is aligned for 16 bytes cdbs, and for 32-byte cdbs we never support immediate data anyways...