Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

2019-07-03 Thread Johannes Thumshirn
On Wed, Jul 03, 2019 at 12:36:30AM +0200, Andrea Vai wrote: > On 02/07/19 13:51:17, Johannes Thumshirn wrote: > > On Tue, Jul 02, 2019 at 12:46:45PM +0200, Andrea Vai wrote: > > > Hi, > > > I have a problem writing data to a USB pendrive, and it seems > > > kernel-related. With the help of Greg a

Re: [RESEND PATCH] scsi: target/iblock: Fix overrun in WRITE SAME emulation

2019-07-03 Thread Roman Bolshakov
On Wed, Jul 03, 2019 at 12:40:29PM +0900, Michael Christie wrote: > On 07/03/2019 04:16 AM, Roman Bolshakov wrote: > > WRITE SAME corrupts data on the block device behind iblock if the > > command is emulated. The emulation code issues (M - 1) * N times more > > bios than requested, where M is the

Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

2019-07-03 Thread Alan Stern
On Wed, 3 Jul 2019, Johannes Thumshirn wrote: > On Wed, Jul 03, 2019 at 12:36:30AM +0200, Andrea Vai wrote: > > On 02/07/19 13:51:17, Johannes Thumshirn wrote: > > > On Tue, Jul 02, 2019 at 12:46:45PM +0200, Andrea Vai wrote: > > > > Hi, > > > > I have a problem writing data to a USB pendrive, a

Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6

2019-07-03 Thread Chris Murphy
On Wed, Jul 3, 2019 at 12:36 AM Ming Lei wrote: > > BTW, 'rotational' shouldn't be set for USB drive, except for USB HDD, > but that shouldn't be related with your issue. I get /sys/block/sdb/queue/rotational:1 for all USB flash drives on all computers with every kernel since forever, including 5

[PATCH v2 14/35] message/fusion: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH v2 24/35] scsi/qla4xxx: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH v2 22/35] scsi/aic7xxx: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use

[PATCH v2 23/35] scsi: Use kmemdup rather than duplicating its implementation

2019-07-03 Thread Fuqian Huang
kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use