Re: 2.6.20-rc6: known unfixed regressions (v2) (part 2)

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

 



Mike Christie wrote:
> Linus Torvalds wrote:
>> On Mon, 29 Jan 2007, Mike Christie wrote:
>>> Actually, I do not think we did this in 2.6.19. Tomo added a bug when he
>>> ported a patch and mixed up some things so we did something weird for
>>> 2.6.20-rc1.
>> Ah, ok. Warring bugs.  Have you pinpointed the original one? Is it your 
>> original "block: support larger block pc requests" after all? It looks 
>> like yours is the one that did the big changes, with Tomo then fixing some 
>> of the fallout?
> 
> I am not completely convinced this bug is the "block: support larger
> block pc requests" patches fault. If I revert the jiffies_to_msecs usage
> then it works for me. On my system I have
> CONFIG_HZ_250=y
> CONFIG_HZ=250
> 
> With the attached patch, nero finds the cd drives and I can burn disks.
> There is no errors from the ide layer like before.
> 
> 
> ------------------------------------------------------------------------
> 
> diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
> index 2528a0c..aded9a0 100644
> --- a/block/scsi_ioctl.c
> +++ b/block/scsi_ioctl.c
> @@ -271,7 +271,7 @@ static int sg_io(struct file *file, requ
>  
>  	rq->cmd_type = REQ_TYPE_BLOCK_PC;
>  
> -	rq->timeout = jiffies_to_msecs(hdr->timeout);
> +	rq->timeout = (hdr->timeout * HZ) / 1000;
>  	if (!rq->timeout)
>  		rq->timeout = q->sg_timeout;
>  	if (!rq->timeout)

Or if that patch is wrong maybe we want something like what
drivers/scsi/sg.c uses:

ul_timeout = msecs_to_jiffies(srp->header.timeout);
timeout = (ul_timeout < INT_MAX) ? ul_timeout : INT_MAX;

I do not think we should be doing jiffies_to_msecs though.
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux