Re: [PATCH] block: Do a full clone when splitting discard bios

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

 



On Wed, Jul 22, 2015 at 07:57:12AM -0400, Martin K. Petersen wrote:
> This fixes a data corruption bug when using discard on top of MD linear,
> raid0 and raid10 personalities.
> 
> Commit 20d0189b1012 "block: Introduce new bio_split()" permits sharing
> the bio_vec between the two resulting bios. That is fine for read/write
> requests where the bio_vec is immutable. For discards, however, we need
> to be able to attach a payload and update the bio_vec so the page can
> get mapped to a scatterlist entry. Therefore the bio_vec can not be
> shared when splitting discards and we must do a full clone.

Eww.  The magic discard payload comes bac to bite us again.  I wish
someone smarter than me could come up with a scheme to avoid this issue.

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]