Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169065
b: refs/heads/master
c: 0a1f127
h: refs/heads/master
i:
  169063: 74d38b7
v: v3
  • Loading branch information
Peter Horton authored and Linus Torvalds committed Dec 2, 2009
1 parent a09ca8e commit 24fbe73
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca0297015d4f117005718e01aa368875abcccbc5
refs/heads/master: 0a1f127a0594d62cb23c26732686d0e2b097b264
23 changes: 21 additions & 2 deletions trunk/drivers/block/aoe/aoecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,21 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector
part_stat_unlock();
}

/*
* Ensure we don't create aliases in VI caches
*/
static inline void
killalias(struct bio *bio)
{
struct bio_vec *bv;
int i;

if (bio_data_dir(bio) == READ)
__bio_for_each_segment(bv, bio, i, 0) {
flush_dcache_page(bv->bv_page);
}
}

void
aoecmd_ata_rsp(struct sk_buff *skb)
{
Expand Down Expand Up @@ -853,8 +868,12 @@ aoecmd_ata_rsp(struct sk_buff *skb)

if (buf && --buf->nframesout == 0 && buf->resid == 0) {
diskstats(d->gd, buf->bio, jiffies - buf->stime, buf->sector);
n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
bio_endio(buf->bio, n);
if (buf->flags & BUFFL_FAIL)
bio_endio(buf->bio, -EIO);
else {
killalias(buf->bio);
bio_endio(buf->bio, 0);
}
mempool_free(buf, d->bufpool);
}

Expand Down

0 comments on commit 24fbe73

Please sign in to comment.