lkml.org 
[lkml]   [2012]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 1/2]block: handle merged discard request
From
Date
>>>>> "Shaohua" == Shaohua Li <shli@kernel.org> writes:

Shaohua> The SCSI discard implementation hacks the first bio of request
Shaohua> to add payload, which makes blk_update_request() can't
Shaohua> correctly mark bios finish. The patch solves it. We set
Shaohua> discard bio size to 0 and finish it after the hacked payload
Shaohua> finishes.

Ick!

Also, you can't muck with bi_size because if we get an I/O error and
have to reissue the command we no longer know how much to write.

I have had to deal with the same issue for WRITE SAME. And the only sane
approach is to distinguish between the DMA transfer size and the blocks
"affected" by the command. That's what I'm working on right now for copy
offload...

If this is something you want in 3.4 I guess we could temporarily add a
separate length field to struct request. If you can wait I suggest we
talk at LSF.

--
Martin K. Petersen Oracle Linux Engineering


\
 
 \ /
  Last update: 2012-03-22 03:35    [W:0.110 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site