From nobody@FreeBSD.org  Thu Apr  7 07:28:11 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DF49A106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  7 Apr 2011 07:28:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id CFB438FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  7 Apr 2011 07:28:11 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p377SBNg023485
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 7 Apr 2011 07:28:11 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p377SBaJ023484;
	Thu, 7 Apr 2011 07:28:11 GMT
	(envelope-from nobody)
Message-Id: <201104070728.p377SBaJ023484@red.freebsd.org>
Date: Thu, 7 Apr 2011 07:28:11 GMT
From: Mickal Canvet <canevet@embl.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 'zfs send' does not prevents disks to suspend if no other activity
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156241
>Category:       kern
>Synopsis:       [mfi] 'zfs send' does not prevents disks to suspend if no other activity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-hardware
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 07 07:30:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Dec 17 11:10:00 UTC 2012
>Originator:     Mickal Canvet
>Release:        8.2-RELEASE
>Organization:
EMBL
>Environment:
FreeBSD 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I have a backup server with almost no I/O activity on which I want to export a ZPOOL to a USB disk.

When I do a 'zfs send my_backup_pool| zfs receive my_usb_backup_pool', the process hangs after a few minutes and dmesg reports this error message:

mfi1: COMMAND 0xffffff80004fe268 TIMEOUT AFTER 59 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 59 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 89 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 120 SECONDS
..

The problem solves as soon as I do a read on the source.

Is it possible that 'zfs send' bypasses some low level layers that prevents disks to suspend ?
>How-To-Repeat:
If you do this on a server with no I/O activity:

zfs send a_big_zpool | cat - > /dev/null

after a few minutes, you should have:

mfi1: COMMAND 0xffffff80004fe268 TIMEOUT AFTER 59 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 59 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 89 SECONDS
mfi1: COMMAND 0xffffff80004fbcb0 TIMEOUT AFTER 120 SECONDS
..

And as soon as you do a 'ls' for example on the zpool, 'zfs send' continues.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Apr 9 20:09:50 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156241 
Responsible-Changed-From-To: freebsd-fs->freebsd-hardware 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Apr 13 05:47:55 UTC 2011 
Responsible-Changed-Why:  
Pawel says this might be hardware related, assign it to that 
group and tag the ticket as [mfi]. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156241 
State-Changed-From-To: open->feedback 
State-Changed-By: smh 
State-Changed-When: Thu Dec 13 22:37:50 UTC 2012 
State-Changed-Why:  
What MFI controller is this and what firmware version is it? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156241 

From: Aymeric Peuch <peuch@embl.fr>
To: bug-followup@FreeBSD.org, canevet@embl.fr
Cc:  
Subject: Re: kern/156241: [mfi] &#39;zfs send&#39; does not prevents disks
 to suspend if no other activity
Date: Mon, 17 Dec 2012 12:05:40 +0100

 As a followup in the originator stead
 
 > # mfiutil show firmware
 > mfi0 Firmware Package Version: 12.10.0-0025
 > mfi0 Firmware Images:
 > Name  Version                        Date           Time      Status
 > BIOS  3.18.00_4.09.05.00_0x0416A000  00_0x0416A000            active
 > APP   2.100.03-1046                  Oct 24 2010    04:38:35  active
 > PCLI  04.04-010:#%00008              May 31 2010    20:21:52  active
 > CTLR  2.02-0025                      Aug 12 2010    14:46:17  active
 > NVDT  2.07.03-0003                   Jul 14 2010    15:53:29  active
 > BTBL  2.02.00.00-0000                Sep 16 2009    21:37:06  active
 > BOOT  01.250.04.219                  4/28/2009      12:51:38  active
 > 
 > 
 > # mfiutil show adapter
 > mfi0 Adapter:
 >     Product Name: PERC H700 Integrated
 >    Serial Number: 0BC0310
 >         Firmware: 12.10.0-0025
 >      RAID Levels: JBOD, RAID0, RAID1, RAID5, RAID6, RAID10, RAID50
 >   Battery Backup: present
 >            NVRAM: 32K
 >   Onboard Memory: 512M
 >   Minimum Stripe: 8k
 >   Maximum Stripe: 1M
 
>Unformatted:
