Re: dd hangs when reading large partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2019-01-18 at 10:48 -0700, Jens Axboe wrote:
+AD4 It's UFS that totally buggy, if you look at its queuecommand, it does:
+AD4 
+AD4         if (+ACE-down+AF8-read+AF8-trylock(+ACY-hba-+AD4-clk+AF8-scaling+AF8-lock))                         
+AD4                 return SCSI+AF8-MLQUEUE+AF8-HOST+AF8-BUSY+ADs
+AD4 
+AD4 UFS either needs to get fixed up, or we'll want a way to do something like
+AD4 the below.
+AD4 
+AD4 Marc, can you test this?
+AD4 
+AD4 
+AD4 diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
+AD4 index eaf329db3973..e28c3420a9d9 100644
+AD4 --- a/drivers/scsi/hosts.c
+AD4 +-+-+- b/drivers/scsi/hosts.c
+AD4 +AEAAQA -412,6 +-412,7 +AEAAQA struct Scsi+AF8-Host +ACo-scsi+AF8-host+AF8-alloc(struct scsi+AF8-host+AF8-template +ACo-sht, int privsize)
+AD4  	shost-+AD4-hostt +AD0 sht+ADs
+AD4  	shost-+AD4-this+AF8-id +AD0 sht-+AD4-this+AF8-id+ADs
+AD4  	shost-+AD4-can+AF8-queue +AD0 sht-+AD4-can+AF8-queue+ADs
+AD4 +-	shost-+AD4-queue+AF8-may+AF8-block +AD0 sht-+AD4-queue+AF8-may+AF8-block+ADs
+AD4  	shost-+AD4-sg+AF8-tablesize +AD0 sht-+AD4-sg+AF8-tablesize+ADs
+AD4  	shost-+AD4-sg+AF8-prot+AF8-tablesize +AD0 sht-+AD4-sg+AF8-prot+AF8-tablesize+ADs
+AD4  	shost-+AD4-cmd+AF8-per+AF8-lun +AD0 sht-+AD4-cmd+AF8-per+AF8-lun+ADs
+AD4 diff --git a/drivers/scsi/scsi+AF8-lib.c b/drivers/scsi/scsi+AF8-lib.c
+AD4 index b13cc9288ba0..4e266af2871f 100644
+AD4 --- a/drivers/scsi/scsi+AF8-lib.c
+AD4 +-+-+- b/drivers/scsi/scsi+AF8-lib.c
+AD4 +AEAAQA -1902,6 +-1902,8 +AEAAQA int scsi+AF8-mq+AF8-setup+AF8-tags(struct Scsi+AF8-Host +ACo-shost)
+AD4  	shost-+AD4-tag+AF8-set.flags +AD0 BLK+AF8-MQ+AF8-F+AF8-SHOULD+AF8-MERGE +AHw BLK+AF8-MQ+AF8-F+AF8-SG+AF8-MERGE+ADs
+AD4  	shost-+AD4-tag+AF8-set.flags +AHwAPQ
+AD4  		BLK+AF8-ALLOC+AF8-POLICY+AF8-TO+AF8-MQ+AF8-FLAG(shost-+AD4-hostt-+AD4-tag+AF8-alloc+AF8-policy)+ADs
+AD4 +-	if (shost-+AD4-queue+AF8-may+AF8-blocK)
+AD4 +-		shost-+AD4-tag+AF8-set.flags +AHwAPQ BLK+AF8-MQ+AF8-F+AF8-BLOCKING+ADs
+AD4  	shost-+AD4-tag+AF8-set.driver+AF8-data +AD0 shost+ADs
+AD4  
+AD4  	return blk+AF8-mq+AF8-alloc+AF8-tag+AF8-set(+ACY-shost-+AD4-tag+AF8-set)+ADs
+AD4 diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
+AD4 index 9ba7671b84f8..9ab354e43630 100644
+AD4 --- a/drivers/scsi/ufs/ufshcd.c
+AD4 +-+-+- b/drivers/scsi/ufs/ufshcd.c
+AD4 +AEAAQA -6981,6 +-6981,7 +AEAAQA static struct scsi+AF8-host+AF8-template ufshcd+AF8-driver+AF8-template +AD0 +AHs
+AD4  	.sg+AF8-tablesize		+AD0 SG+AF8-ALL,
+AD4  	.cmd+AF8-per+AF8-lun		+AD0 UFSHCD+AF8-CMD+AF8-PER+AF8-LUN,
+AD4  	.can+AF8-queue		+AD0 UFSHCD+AF8-CAN+AF8-QUEUE,
+AD4 +-	.queue+AF8-may+AF8-block	+AD0 1,
+AD4  	.max+AF8-host+AF8-blocked	+AD0 1,
+AD4  	.track+AF8-queue+AF8-depth	+AD0 1,
+AD4  	.sdev+AF8-groups		+AD0 ufshcd+AF8-driver+AF8-groups,
+AD4 diff --git a/include/scsi/scsi+AF8-host.h b/include/scsi/scsi+AF8-host.h
+AD4 index 6ca954e9f752..30aa7b6c4342 100644
+AD4 --- a/include/scsi/scsi+AF8-host.h
+AD4 +-+-+- b/include/scsi/scsi+AF8-host.h
+AD4 +AEAAQA -339,6 +-339,11 +AEAAQA struct scsi+AF8-host+AF8-template +AHs
+AD4  	 +ACo-/
+AD4  	int can+AF8-queue+ADs
+AD4  
+AD4 +-	/+ACo
+AD4 +-	 +ACo If the -+AD4-queuecommand() ever blocks, this should be set
+AD4 +-	 +ACo-/
+AD4 +-	int queue+AF8-may+AF8-block+ADs
+AD4 +-
+AD4  	/+ACo
+AD4  	 +ACo In many instances, especially where disconnect / reconnect are
+AD4  	 +ACo supported, our host also has an ID on the SCSI bus.  If this is
+AD4 +AEAAQA -584,6 +-589,7 +AEAAQA struct Scsi+AF8-Host +AHs
+AD4  
+AD4  	int this+AF8-id+ADs
+AD4  	int can+AF8-queue+ADs
+AD4 +-	int queue+AF8-may+AF8-block+ADs
+AD4  	short cmd+AF8-per+AF8-lun+ADs
+AD4  	short unsigned int sg+AF8-tablesize+ADs
+AD4  	short unsigned int sg+AF8-prot+AF8-tablesize+ADs

Hi Jens,

Did you perhaps want to include a change from down+AF8-read+AF8-trylock() into
down+AF8-read() in the UFS queuecommand function in this patch?

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux