public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* scsi_set_medium_removal timeout issue
@ 2018-10-30  8:28 Zengtao (B)
  2018-10-30  8:56 ` Oliver Neukum
  2018-10-30 14:08 ` Alan Stern
  0 siblings, 2 replies; 13+ messages in thread
From: Zengtao (B) @ 2018-10-30  8:28 UTC (permalink / raw)
  To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
	stern@rowland.harvard.edu, gregkh@linuxfoundation.org
  Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net

Hi 

I have recently met a scsi_set_medium_removal timeout issue, and it's related
 to both SCSI and USB MASS storage. 
Since i am not an expert in either scsi or usb mass storage, i am writing to report
the issue and ask for a solution from you guys.

My test scenario is as follow:
1.Linux HOST-----Linux mass storage gadget(the back store is a flash partition).
2.Host mount the device.
3.Host writes some data to the Mass storage device.
4.Host Unmount the device.
Both Linux kernels(Host and Device) are Linux 4.9.  
Some has reported the same issue a long time ago, but it remains there.
https://www.spinics.net/lists/linux-usb/msg53739.html

For the issue itself, there is my observation:
In the step 4, the Host will issue an PREVENT_ALLOW_MEDIUM_REMOVAL scsi command.
and and timeout happens due to the device 's very slow fsg_lun_fsync_sub.
I found there are two methods to workaround the issue: 
1. Change the timeout value of host scsi command PREVENT_ALLOW_MEDIUM_REMOVAL to
to about 60 seconds from 10 seconds.
2. Remove the fsg_lun_fsync_sub in the device's Mass storage gadget driver.

Thanks

Regards
zentao

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-01 20:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-30  8:28 scsi_set_medium_removal timeout issue Zengtao (B)
2018-10-30  8:56 ` Oliver Neukum
2018-10-30  9:24   ` Zengtao (B)
2018-10-30 14:08 ` Alan Stern
2018-10-31  2:34   ` Zengtao (B)
2018-10-31 14:19     ` Alan Stern
2018-11-12 11:56       ` Zengtao (B)
2018-11-12 15:33         ` Alan Stern
2018-11-14  2:46           ` Zengtao (B)
2018-11-14 15:35             ` Alan Stern
2018-11-29  3:13               ` Zengtao (B)
2018-12-04 16:36                 ` Alan Stern
2019-04-01 20:27                   ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox