diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-12-03 07:49:39 -0500 |
commit | 220d0b1dbf78c6417a658c96e571415552d3abac (patch) | |
tree | 70cd3862540c38ea490e7a27c3c7acc35b680234 /drivers/block | |
parent | 474b18ccc264c472abeec50f48469b6477202699 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge branch 'master' into for-2.6.33
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 965ece2c7e4d..13bb69d2abb3 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -735,6 +735,21 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector | |||
735 | part_stat_unlock(); | 735 | part_stat_unlock(); |
736 | } | 736 | } |
737 | 737 | ||
738 | /* | ||
739 | * Ensure we don't create aliases in VI caches | ||
740 | */ | ||
741 | static inline void | ||
742 | killalias(struct bio *bio) | ||
743 | { | ||
744 | struct bio_vec *bv; | ||
745 | int i; | ||
746 | |||
747 | if (bio_data_dir(bio) == READ) | ||
748 | __bio_for_each_segment(bv, bio, i, 0) { | ||
749 | flush_dcache_page(bv->bv_page); | ||
750 | } | ||
751 | } | ||
752 | |||
738 | void | 753 | void |
739 | aoecmd_ata_rsp(struct sk_buff *skb) | 754 | aoecmd_ata_rsp(struct sk_buff *skb) |
740 | { | 755 | { |
@@ -853,8 +868,12 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
853 | 868 | ||
854 | if (buf && --buf->nframesout == 0 && buf->resid == 0) { | 869 | if (buf && --buf->nframesout == 0 && buf->resid == 0) { |
855 | diskstats(d->gd, buf->bio, jiffies - buf->stime, buf->sector); | 870 | diskstats(d->gd, buf->bio, jiffies - buf->stime, buf->sector); |
856 | n = (buf->flags & BUFFL_FAIL) ? -EIO : 0; | 871 | if (buf->flags & BUFFL_FAIL) |
857 | bio_endio(buf->bio, n); | 872 | bio_endio(buf->bio, -EIO); |
873 | else { | ||
874 | killalias(buf->bio); | ||
875 | bio_endio(buf->bio, 0); | ||
876 | } | ||
858 | mempool_free(buf, d->bufpool); | 877 | mempool_free(buf, d->bufpool); |
859 | } | 878 | } |
860 | 879 | ||