From: Christoph Hellwig <hch@lst.de>
To: Dexuan Cui <decui@microsoft.com>
Cc: Christoph Hellwig <hch@lst.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Jens Axboe <axboe@fb.com>, Vitaly Kuznetsov <vkuznets@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
KY Srinivasan <kys@microsoft.com>,
"Chris Valean (Cloudbase Solutions SRL)" <v-chvale@microsoft.com>
Subject: Re: [Regression] fstrim hangs on Hyper-V: caused by "block: improve handling of the magic discard payload"
Date: Thu, 12 Jan 2017 16:52:41 +0100 [thread overview]
Message-ID: <20170112155241.GA18147@lst.de> (raw)
In-Reply-To: <MWHPR03MB26695378D0512A7C840A0A30BF790@MWHPR03MB2669.namprd03.prod.outlook.com>
Can you check if this debug printk triggers for the discard commands?
---
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 888e16e..7ab7d08 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1031,6 +1031,10 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request,
data_transfer_length = 0;
}
+ if (cmd_request->payload->range.len != data_transfer_length)
+ printk_ratelimited("request len: %u, transfer len: %u\n",
+ cmd_request->payload->range.len,
+ data_transfer_length);
scsi_set_resid(scmnd,
cmd_request->payload->range.len - data_transfer_length);
next prev parent reply other threads:[~2017-01-12 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <MWHPR03MB26693D8327D27CA1CFDA50A8BF790@MWHPR03MB2669.namprd03.prod.outlook.com>
2017-01-12 13:44 ` [Regression] fstrim hangs on Hyper-V: caused by "block: improve handling of the magic discard payload" Christoph Hellwig
[not found] ` <MWHPR03MB26695378D0512A7C840A0A30BF790@MWHPR03MB2669.namprd03.prod.outlook.com>
2017-01-12 15:52 ` Christoph Hellwig [this message]
[not found] ` <MWHPR03MB26694FAE82E6D0FAEA02BE04BF790@MWHPR03MB2669.namprd03.prod.outlook.com>
2017-01-12 18:18 ` Christoph Hellwig
[not found] ` <MWHPR03MB2669B1BD87F79243F17ADB23BF780@MWHPR03MB2669.namprd03.prod.outlook.com>
2017-01-13 7:39 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170112155241.GA18147@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=decui@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v-chvale@microsoft.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).