From owner-freebsd-scsi@freebsd.org Sun Nov 10 21:01:01 2019 Return-Path: Delivered-To: freebsd-scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9607717D492 for ; Sun, 10 Nov 2019 21:01:01 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47B5yP24cLz4NNh for ; Sun, 10 Nov 2019 21:01:01 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 4340117D47F; Sun, 10 Nov 2019 21:01:01 +0000 (UTC) Delivered-To: scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 429BA17D47E for ; Sun, 10 Nov 2019 21:01:01 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B5yN63Zrz4NNY for ; Sun, 10 Nov 2019 21:01:00 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A20724DA0 for ; Sun, 10 Nov 2019 21:01:00 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xAAL10kr083623 for ; Sun, 10 Nov 2019 21:01:00 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xAAL10dG083622 for scsi@FreeBSD.org; Sun, 10 Nov 2019 21:01:00 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201911102101.xAAL10dG083622@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: scsi@FreeBSD.org Subject: Problem reports for scsi@FreeBSD.org that need special attention Date: Sun, 10 Nov 2019 21:01:00 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2019 21:01:01 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 221952 | cam iosched: Fix trim statistics 1 problems total for which you should take action. From owner-freebsd-scsi@freebsd.org Tue Nov 12 13:02:46 2019 Return-Path: Delivered-To: freebsd-scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C45791AD17F for ; Tue, 12 Nov 2019 13:02:46 +0000 (UTC) (envelope-from info@denlaptev.ru) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47C7Ff4vf4z4X8y for ; Tue, 12 Nov 2019 13:02:46 +0000 (UTC) (envelope-from info@denlaptev.ru) Received: by mailman.nyi.freebsd.org (Postfix) id A851C1AD17E; Tue, 12 Nov 2019 13:02:46 +0000 (UTC) Delivered-To: scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A81AE1AD17D for ; Tue, 12 Nov 2019 13:02:46 +0000 (UTC) (envelope-from info@denlaptev.ru) Received: from denlaptev.ru (denlaptev.ru [80.249.144.16]) by mx1.freebsd.org (Postfix) with ESMTP id 47C7Ff2L8cz4X8x for ; Tue, 12 Nov 2019 13:02:46 +0000 (UTC) (envelope-from info@denlaptev.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=mail; d=denlaptev.ru; h=MIME-Version:Subject:Content-Type:From:To:Date:Message-ID:List-Archive: List-Help:List-ID; bh=/v3PMJxfL6SW2SxO+HjlxOkE8laj0NztRT2Z4rBqjUw=; b=hPlKqSgQKVK2rvyRJXGls1pox3DZyJwd61a/I+9jwTNgcWgpTRpzjF0fHB1zaxR+fUznyUfH+L8t vaK2f+rxqDMKnWUUyeFWyiobRh3Flt05ijP84iwuuR8p5GmodTgaFqyZ46jquAmIUHAEBMtJRw6+ 0BRCwLzme6TUYTYJR5A= MIME-Version: 1.0 Subject: =?utf-8?B?0KPQstCw0LbQsNC10LzRi9C5INC/0L7Qu9GM0LfQvtCy?= =?utf-8?B?0LDRgtC10LvRjCBzY3NpQGZyZWVic2Qub3Jn?= From: info@denlaptev.ru To: scsi@freebsd.org Date: Tue, 12 Nov 2019 15:27:29 +0300 (AST) Message-ID: <32007901334571.0.7454E5V51T9G4R72@denlaptev.ru> X-rpcampaign: 2907 X-Rspamd-Queue-Id: 47C7Ff2L8cz4X8x X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=denlaptev.ru header.s=mail header.b=hPlKqSgQ; dmarc=pass (policy=none) header.from=denlaptev.ru; spf=pass (mx1.freebsd.org: domain of info@denlaptev.ru designates 80.249.144.16 as permitted sender) smtp.mailfrom=info@denlaptev.ru X-Spamd-Result: default: False [1.44 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; R_DKIM_ALLOW(0.00)[denlaptev.ru:s=mail]; RBL_NIXSPAM(4.00)[16.144.249.80.ix.dnsbl.manitu.net]; R_SPF_ALLOW(0.00)[+ip4:80.249.144.16:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; DKIM_TRACE(0.00)[denlaptev.ru:+]; DMARC_POLICY_ALLOW(0.00)[denlaptev.ru,none]; FROM_NO_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.57)[ip: (-3.40), ipnet: 80.249.144.0/22(-1.59), asn: 49505(2.14), country: RU(0.01)]; ASN(0.00)[asn:49505, ipnet:80.249.144.0/22, country:RU]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2019 13:02:46 -0000 =D0=97=D0=B4=D1=80=D0=B0=D0=B2=D1=81=D1=82=D0=B2=D1=83=D0=B9=D1=82=D0=B5! =D0=9F=D1=80=D0=B8=D0=BC=D0=B8=D1=82=D0=B5 =D1=83=D1=87=D0=B0=D1=81=D1=82= =D0=B8=D0=B5 =D0=B2 =D0=B0=D0=BA=D1=86=D0=B8=D0=B8 https://drive.google.com/file/d/1SVyMFZ39Gri7SGkC-gMC6IOY8uFy2DpW/preview From owner-freebsd-scsi@freebsd.org Wed Nov 13 15:12:15 2019 Return-Path: Delivered-To: freebsd-scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13BBA1B3693 for ; Wed, 13 Nov 2019 15:12:15 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Cp4Z10Tzz48Fq for ; Wed, 13 Nov 2019 15:12:13 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f169.google.com with SMTP id y23so2952061ljh.10 for ; Wed, 13 Nov 2019 07:12:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:openpgp:autocrypt:message-id :date:user-agent:mime-version:content-language :content-transfer-encoding; bh=bC2IlsVoq8uj25cKX9CNmqnvk1r/1zW0mObsoOBa26w=; b=X6b6tyOih0XlH9skg3WPNFfio6QzHsB/+DwsNqAcyEENXht2OhVM6YU88KEQC74WaA JvuX6ObXgDt9gX7dZHi3Z5p1/IzudzvutwOe2ngG/U34sMqPm3dN8qUMtuxw8zKeF4Sb gYDj08C4+NAUVgEALyASzDMG9/Xjjn9RzGmtcPiizHjBaOApOfCVdozayPEDGoJ2cGMu 9/w9gSTiKYvv8aD+RMmNQjlA+2P0vvb/ZgctM4zk4Px0EvJybJupgdPyi919ioWZ2bgq veu6bSTFSIMOqNlxXXKxvteXBwDOMmkeucvLzewp+4BxOyw4dXE+pzz/bKh3enxSmvq9 0pcw== X-Gm-Message-State: APjAAAVEMcO8+rTvMGr2naS2aP7Y/GGwHWmfC5mLkbxohqV0wLUff+MX LcFXaHHjaiGtYLD7ExRNJUhbLr04HzI= X-Google-Smtp-Source: APXvYqyraCcSZGq+7h51kVD3OMOLDzMFQ8yF1q+IGV+yG+4navd4Z2M++9C747zVkJ9k94I6vwhHdA== X-Received: by 2002:a2e:63c9:: with SMTP id s70mr3073830lje.73.1573657929914; Wed, 13 Nov 2019 07:12:09 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id e27sm1268409lfb.79.2019.11.13.07.12.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Nov 2019 07:12:08 -0800 (PST) To: freebsd-scsi@freebsd.org From: Andriy Gapon Subject: port of linux patch for hyperv storvsc -- works but how? Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulb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V5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Wed, 13 Nov 2019 17:12:07 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47Cp4Z10Tzz48Fq X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.169 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.13 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[96.151.72.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-scsi@freebsd.org]; DMARC_NA(0.00)[FreeBSD.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-1.13)[ip: (-0.43), ipnet: 209.85.128.0/17(-3.19), asn: 15169(-1.99), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[169.208.85.209.list.dnswl.org : 127.0.5.0]; SUBJECT_ENDS_QUESTION(1.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[169.208.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2019 15:12:15 -0000 I would like to ask you to review a patch in this review request: https://reviews.freebsd.org/D22312 The patch comes from Linux: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=40630f462824ee24bc00d692865c86c3828094e0 The change is quite simple, but I have a hard time understanding how it works. ccb->csio.scsi_status = (vm_srb->scsi_status & 0xFF); - ccb->csio.resid = ccb->csio.dxfer_len - vm_srb->transfer_len; + if (srb_status == SRB_STATUS_SUCCESS || + srb_status == SRB_STATUS_DATA_OVERRUN) + ccb->csio.resid = ccb->csio.dxfer_len - vm_srb->transfer_len; + else + ccb->csio.resid = ccb->csio.dxfer_len; My motivation for porting that change is a report from a user that they are getting a lot of zpool checksum errors while concurrently running zpool scrub and iozone -l 1 -s 100G on a pool created on top of storvsc devices. The user reports that the change fixes the problem. I have not been able to analyze the earlier errors in details, so I am not sure if they were getting any SRB_STATUS_DATA_OVERRUN errors. Also, I don't know what kind of sense data was provided for errors. I do know that they were getting a lot of these messages duirng the test when booverbose was enabled: storvsc scsi_status = 2, srb_status = 4 scsi_status = 2 is SCSI_STATUS_CHECK_COND srb_status = 4 is SRB_STATUS_ERROR So, nothing unusual. I would like to understand how the change can possibly make a difference. As far as I can tell, csio.resid is completely ignored if a ccb fails. Also, as far as I can see, it's ignored for ccb retries as well. That is, we never modify dxfer_len. And if the ccb succeeds then resid would be set the same with the old and new code. The only possibility I could come up with is the ccb's sense data having SSD_KEY_RECOVERED_ERROR. In that case, the ccb would be considered successful. But I am not sure even about that case. Thanks! -- Andriy Gapon From owner-freebsd-scsi@freebsd.org Wed Nov 13 15:39:24 2019 Return-Path: Delivered-To: freebsd-scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D09831B40FA for ; Wed, 13 Nov 2019 15:39:24 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Cpgv6dxNz49nj for ; Wed, 13 Nov 2019 15:39:23 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-x329.google.com with SMTP id n23so1941888otr.13 for ; Wed, 13 Nov 2019 07:39:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=8jNYcE0DDk+YueoFQ3FvtvvEzYfHeiNrwOjXx/aZqjw=; b=h+ZVbWNu0o1QG8d/ie2GHR66O32CkEFl77rGonDc/KKhx/VH3EnFIJG2wwCzhAcxH4 05tUswnjM38Yn7FDLtMimvunrAJQHmF3GE+CzfTmf8v+iNNcfQ28/S8+wGhzoq2u3jEV LhfNznsEYFp2n86+S0+owtKSDaMMq5CNv+jWBTgIfbA28tLvoAEjBa6WNlYZwBfXunpZ C6KCj2Ya0O5+o7TSpGaGxTTwh8ZR9isq8qahRLYUVg2+wS7zmNV1I1bd4r4GHtYlPIAi n571VK2zzUCT5zmIZK+ANzdYXMWcuxeGy/BE43a4v3Cdh6jVZBMi5qiGrXOl9Vr6HXIC E6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8jNYcE0DDk+YueoFQ3FvtvvEzYfHeiNrwOjXx/aZqjw=; b=bc2c897fcOOi63FBNwoobnCbroAiTZmxuXTSP95KyM2YVDCRPr52PCZfFjj6Zn8aa4 LNROf+FfgQJ8Z/wz8AzALp+SocGJ4DC1UCcoZQm8kWjxarE2slphXvF1/PPkHF19a/Ax CRjFo9CuNCHJ3K/zCAV80LwoR13BEdaIJwMvXPTsMJ8EJMpqS498Uqf7e1e/b2JEg1bN 50/MK2d7Gx+7Kk0+09qtK+haw4PVEIOYADq49FoM0eiWCw3zIp+Gf2ciAh06JYYqItb5 WgoIY0gxn5m3bb6oSAo2eKQfXCbJrVkf1iT7Z7xlOCVs+dg9kwGUX41CGPVCXm3E2XGn saHQ== X-Gm-Message-State: APjAAAWRyZMAWWIlJ7TztMSkFcizJ7Kj5UIJ02kxTy20kqZVYejOouds JGxPEb9EAXvJ7vMDNx9Vbq1foDDWABd3Rfmw+AMtg4+dxsQ= X-Google-Smtp-Source: APXvYqyTi7+mwEN2rt3j1hr1opS7XiOC6eGpyw859KarrOYmgZxSGkrWLMd9FWhLq1BZyL1JNjZkACXx8JOudrezb9c= X-Received: by 2002:a9d:6084:: with SMTP id m4mr3877947otj.18.1573659562318; Wed, 13 Nov 2019 07:39:22 -0800 (PST) MIME-Version: 1.0 From: alan somers Date: Wed, 13 Nov 2019 08:39:11 -0700 Message-ID: Subject: gmultipath test suite To: FreeBSD-scsi X-Rspamd-Queue-Id: 47Cpgv6dxNz49nj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=h+ZVbWNu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 2607:f8b0:4864:20::329 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-scsi@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-8.50), ipnet: 2607:f8b0::/32(-2.33), asn: 15169(-1.99), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[9.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2019 15:39:24 -0000 I wrote an ATF test suite for gmultipath while investigating bug 178473. If anybody is interested in gmultipath, could you please review it? If not, I'll commit in a week or so. https://reviews.freebsd.org/D22235 -Alan From owner-freebsd-scsi@freebsd.org Wed Nov 13 16:04:20 2019 Return-Path: Delivered-To: freebsd-scsi@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E948E1B4954 for ; Wed, 13 Nov 2019 16:04:20 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47CqDh5yDfz4CGy; Wed, 13 Nov 2019 16:04:20 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id CCDB32102F; Wed, 13 Nov 2019 11:04:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 13 Nov 2019 11:04:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=a chST7o/xvgVWHNjFLf9VIluh+e1VdwBewsSdjkol88=; b=L8yZSqnXxA2jwX5g/ K6d2XWjdnUUZ4HneCn6ojtppBXAcXfPZb+ftSuWSESN+3tiYMW/rQIV3BtESruat BMKC6otybGmkalAh1SyO/JiUiKFnz8EkBtnTKvdg2tw5TZslsM6B3HVPNpvxaNhy gMW3pafhFmDpzyoNQMXSeXphywFBf1BRCmLm1ZRz63bx6S8cRsuNubLle0k11Qs7 4GYNI0nk4FAo0j7o80nyQ4r5cblU1hWOsfE4TRdLC4vJWCPuyu4X8IWwfFZJBjqj O0aVzFKda4zwzRru0Q1MnwjWMO1o5K165GwM66eU7fg7RTG8tl17RUX4VLk+cbs5 VbMcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=achST7o/xvgVWHNjFLf9VIluh+e1VdwBewsSdjkol 88=; b=LpgsadaxPowfJm5dqzlRUppB3f4WfyFF8p2qSY3AhakSNqWvwOESib8Ow HBpZty/o6F5sjJR/YQ2zmc649pzzfWUGCbcZCtGdj4EnoxFV0FAY2wZ2bwCHtsAr wShXJ5iXS+Wke+SUdUJ4Stn1y44Qe3mp7LpxztrkjdMAFALOzMk8SmEwbkrUGN5/ S25ua1LM0ZS1ItE4EPlOCxsng11+4KTPTe6cYUj9jZlDdA62tQA0Z9Szf5oEhq3z +hOu8eco++LcGBRiBwVUBC4fEE6+nZ7NJhkCLwBZ/IZvpoPbvHAME0n3AhrHLUe0 RhabLzQg9xLZHWX1RGyEcdi/eThkg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefuddgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegtggfuhfgjfffgkfhfvffosehtqh hmtdhhtdejnecuhfhrohhmpefutghothhtucfnohhnghcuoehstghothhtlhesshgrmhhs tghordhorhhgqeenucffohhmrghinhepfhhrvggvsghsugdrohhrghdpkhgvrhhnvghlrd horhhgnecukfhppeekrdegiedrkeelrddvudefnecurfgrrhgrmhepmhgrihhlfhhrohhm pehstghothhtlhesshgrmhhstghordhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.0.129] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id DB827306005B; Wed, 13 Nov 2019 11:04:17 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: port of linux patch for hyperv storvsc -- works but how? From: Scott Long In-Reply-To: Date: Wed, 13 Nov 2019 09:04:16 -0700 Cc: freebsd-scsi@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4FDD746E-EF61-421F-ADC8-CBD21C17D25D@samsco.org> References: To: Andriy Gapon X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47CqDh5yDfz4CGy X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Nov 2019 16:04:21 -0000 > On Nov 13, 2019, at 8:12 AM, Andriy Gapon wrote: >=20 >=20 > I would like to ask you to review a patch in this review request: > https://reviews.freebsd.org/D22312 > The patch comes from Linux: > = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/= ?id=3D40630f462824ee24bc00d692865c86c3828094e0 >=20 > The change is quite simple, but I have a hard time understanding how = it works. >=20 > ccb->csio.scsi_status =3D (vm_srb->scsi_status & 0xFF); > - ccb->csio.resid =3D ccb->csio.dxfer_len - vm_srb->transfer_len; > + if (srb_status =3D=3D SRB_STATUS_SUCCESS || > + srb_status =3D=3D SRB_STATUS_DATA_OVERRUN) > + ccb->csio.resid =3D ccb->csio.dxfer_len - = vm_srb->transfer_len; > + else > + ccb->csio.resid =3D ccb->csio.dxfer_len; >=20 > My motivation for porting that change is a report from a user that = they are > getting a lot of zpool checksum errors while concurrently running = zpool scrub > and iozone -l 1 -s 100G on a pool created on top of storvsc devices. > The user reports that the change fixes the problem. > I have not been able to analyze the earlier errors in details, so I am = not sure > if they were getting any SRB_STATUS_DATA_OVERRUN errors. Also, I = don't know > what kind of sense data was provided for errors. > I do know that they were getting a lot of these messages duirng the = test when > booverbose was enabled: > storvsc scsi_status =3D 2, srb_status =3D 4 > scsi_status =3D 2 is SCSI_STATUS_CHECK_COND > srb_status =3D 4 is SRB_STATUS_ERROR > So, nothing unusual. >=20 > I would like to understand how the change can possibly make a = difference. > As far as I can tell, csio.resid is completely ignored if a ccb fails. The csio.resid is passed to bp->bio_resid in dadone() in the event of an = error. This in turn is passed up to callers, and probably informs ZFS on how much = data did not actually make it to the device in the event of an error (I=E2=80=99m not = going to dig into that right now, though). > Also, as far as I can see, it's ignored for ccb retries as well. > That is, we never modify dxfer_len. Disk I/O needs to be atomic and idempotent; if we tried to restart = partially failed transactions, we might race another process that is doing I/O to the = same area, and get merged results. Thus, we always retry full transactions. > And if the ccb succeeds then resid would be set the same with the old = and new code. Presumably this will be =E2=80=9C0=E2=80=9D, which is good. > The only possibility I could come up with is the ccb's sense data = having > SSD_KEY_RECOVERED_ERROR. In that case, the ccb would be considered = successful. > But I am not sure even about that case. >=20 Yeah, there=E2=80=99s a lot more logic that is needed, and i think the = problem is that the hyperV model doesn=E2=80=99t provide a useful resid value, forcing us to = guess at what it should be. I think that SRB_STATUS_DATA_UNDERRUN might also require special = handling. Scott