summaryrefslogtreecommitdiff
path: root/drivers/md/dm-ioctl.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2010-08-12 04:14:00 +0100
committerAlasdair G Kergon <agk@redhat.com>2010-08-12 04:14:00 +0100
commit708e929513502fb050c0a3c3ee267cab5b056ded (patch)
treee7b6845a3d53c5b92350f1755b4e89418f0c351c /drivers/md/dm-ioctl.c
parent87c961cb747fa55b664b76abfcb9d44c14ae851f (diff)
dm: skip second flush on bio unsupported error
When processing barriers, skip the second flush if processing the bio failed with -EOPNOTSUPP. This can happen with discard+barrier requests. If the device doesn't support discard, there would be two useless SYNCHRONIZE CACHE commands. The first dm_flush cannot be so easily optimized out, so we leave it there. Previously, -EOPNOTSUPP could be received in dec_pending only with empty barriers and we ignored that error, assuming the device not supporting cache flushes has cache always consistent. With the addition of discard barriers, this -EOPNOTSUPP can also be generated by discards and we must record it in md->barrier_error for process_barrier. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-ioctl.c')
0 files changed, 0 insertions, 0 deletions