login
Header Space

 
 

Re: regression: CD burning (k3b) went broke

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mike Galbraith <efault@...>
Cc: Andrew Morton <akpm@...>, Jens Axboe <jens.axboe@...>, LKML <linux-kernel@...>, <linux-ide@...>, <linux-scsi@...>, Jeff Garzik <jgarzik@...>
Date: Thursday, February 28, 2008 - 3:43 am

Hello, all.

Sorry about the delay.  Was buried under other stuff.  Mike, thanks a
lot for reporting and analyzing the problem; however, the patch is
slightly incorrect.  rq->data_len is rq->data_len + extra stuff for
alignment and padding, so the correct thing to do is...

  req->raw_data_len -= req->data_len - scsi_get_resid(cmd);
  req->data_len = scsi_get_resid(cmd);

which is ugly and error-prone.  In addition, this isn't the only place
where resid is set.  Other block drivers do this too.  This definitely
should be done in block layer.

With rq->data_len and rq->raw_data_len, it's impossible to translate
resid of rq->data_len to resid of rq->raw_data_len as block layer
doesn't know how much was extra data after rq->data_len is modified.
The attached patch substitutes rq->raw_data_len w/ rq->extra_len and
adds blk_rq_raw_data_len().  Things look cleaner this way and the resid
problem should be solved with this.

Can you please verify the attached patch fixes the problem?

Thanks.

-- 
tejun
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
regression: CD burning (k3b) went broke, Mike Galbraith, (Thu Feb 21, 4:42 am)
Re: regression: CD burning (k3b) went broke, Jens Axboe, (Fri Feb 22, 3:32 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Sat Feb 23, 3:42 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Sun Feb 24, 3:54 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Tue Feb 26, 5:48 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Tue Feb 26, 9:36 am)
Re: regression: CD burning (k3b) went broke, Andrew Morton, (Tue Feb 26, 7:08 pm)
Re: regression: CD burning (k3b) went broke, Jeff Garzik, (Tue Feb 26, 8:46 pm)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Tue Feb 26, 10:58 pm)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Tue Feb 26, 10:24 pm)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Wed Feb 27, 2:00 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Wed Feb 27, 3:07 am)
Re: regression: CD burning (k3b) went broke, Tejun Heo, (Thu Feb 28, 3:43 am)
Re: regression: CD burning (k3b) went broke, Mike Galbraith, (Thu Feb 28, 4:20 am)
[PATCH] block: fix residual byte count handling, Tejun Heo, (Thu Feb 28, 4:50 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Thu Feb 28, 11:35 am)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Thu Feb 28, 11:46 am)
Re: [PATCH] block: fix residual byte count handling, James Bottomley, (Fri Feb 29, 12:47 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Fri Feb 29, 4:11 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Sun Mar 2, 10:52 am)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Sun Mar 2, 10:40 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Sun Mar 2, 11:59 pm)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Mon Mar 3, 12:09 am)
Re: [PATCH] block: separate out padding from alignment, James Bottomley, (Mon Mar 3, 2:27 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 4:26 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 8:17 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 9:50 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 10:01 am)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Mon Mar 3, 10:22 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 10:52 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Mon Mar 3, 10:11 pm)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Mon Mar 3, 10:32 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 4:53 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 4:59 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 5:06 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 5:22 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 5:35 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 5:46 am)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 8:37 am)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 9:30 am)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Tue Mar 4, 12:17 pm)
Re: [PATCH] block: fix residual byte count handling, Tejun Heo, (Tue Mar 4, 12:42 pm)
Re: [PATCH] block: fix residual byte count handling, Boaz Harrosh, (Tue Mar 4, 2:26 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 3:19 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Tue Mar 4, 8:26 pm)
Re: [PATCH] block: fix residual byte count handling, FUJITA Tomonori, (Thu Mar 6, 12:56 am)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 2:45 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 3:25 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 3:33 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 3:34 pm)
Re: [PATCH] block: fix residual byte count handling, James Bottomley, (Tue Mar 4, 2:27 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 8:45 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 8:39 am)
Re: [PATCH] block: fix residual byte count handling, Kiyoshi Ueda, (Tue Mar 4, 3:42 pm)
Re: [PATCH] block: fix residual byte count handling, James Bottomley, (Tue Mar 4, 12:04 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 2:46 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 8:43 am)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 8:58 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 9:03 am)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 10:25 am)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 2:17 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 2:29 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 2:35 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 2:45 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 2:49 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 2:54 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Tue Mar 4, 3:26 pm)
Re: [PATCH] block: fix residual byte count handling, Jens Axboe, (Tue Mar 4, 3:28 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Christie, (Sun Mar 2, 2:46 pm)
Re: [PATCH] block: fix residual byte count handling, Mike Galbraith, (Sun Mar 2, 11:27 pm)
Re: [PATCH] block: fix residual byte count handling, James Bottomley, (Sat Mar 1, 11:19 am)
speck-geostationary