aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorMartin K. Petersen <[email protected]>2015-07-22 11:57:12 +0000
committerJens Axboe <[email protected]>2015-07-23 22:21:34 +0000
commitf3f5da624e0a891c34d8cd513c57f1d9b0c7dadc (patch)
treed2a92a8d8d03287c8b51df5dfae24d267e151e6b /net/switchdev/switchdev.c
parentblock: export bio_associate_*() and wbc_account_io() (diff)
downloadkernel-f3f5da624e0a891c34d8cd513c57f1d9b0c7dadc.tar.gz
kernel-f3f5da624e0a891c34d8cd513c57f1d9b0c7dadc.zip
block: Do a full clone when splitting discard bios
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. Signed-off-by: Martin K. Petersen <[email protected]> Reported-by: Seunguk Shin <[email protected]> Tested-by: Seunguk Shin <[email protected]> Cc: Seunguk Shin <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: <[email protected]> # v3.14+ Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions