From patchwork Thu Jan 12 15:52:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9513487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6256E60476 for ; Thu, 12 Jan 2017 15:54:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 552A4286DB for ; Thu, 12 Jan 2017 15:54:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49D60286DE; Thu, 12 Jan 2017 15:54:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC4C9286DB for ; Thu, 12 Jan 2017 15:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751188AbdALPxf (ORCPT ); Thu, 12 Jan 2017 10:53:35 -0500 Received: from verein.lst.de ([213.95.11.211]:46990 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbdALPxJ (ORCPT ); Thu, 12 Jan 2017 10:53:09 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 37BC2DE407; Thu, 12 Jan 2017 16:52:42 +0100 (CET) Date: Thu, 12 Jan 2017 16:52:41 +0100 From: Christoph Hellwig To: Dexuan Cui Cc: Christoph Hellwig , "linux-block@vger.kernel.org" , Jens Axboe , Vitaly Kuznetsov , "linux-kernel@vger.kernel.org" , KY Srinivasan , "Chris Valean (Cloudbase Solutions SRL)" Subject: Re: [Regression] fstrim hangs on Hyper-V: caused by "block: improve handling of the magic discard payload" Message-ID: <20170112155241.GA18147@lst.de> References: <20170112134412.GB15178@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Can you check if this debug printk triggers for the discard commands? --- -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);