Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8771
b: refs/heads/master
c: 06e7ab5
h: refs/heads/master
i:
  8769: b34ee09
  8767: 67dce80
v: v3
  • Loading branch information
Peter Osterlund authored and Linus Torvalds committed Sep 13, 2005
1 parent d0a9d25 commit 41ffe64
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: a676f8d092f2a3aff419cacae79c80c3b7f6c0f5
refs/heads/master: 06e7ab53f4a1e8bbf66c3985968468949d74d006
14 changes: 7 additions & 7 deletions trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,6 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
atomic_set(&pkt->io_wait, 0);
atomic_set(&pkt->io_errors, 0);

if (pkt->cache_valid) {
VPRINTK("pkt_gather_data: zone %llx cached\n",
(unsigned long long)pkt->sector);
goto out_account;
}

/*
* Figure out which frames we need to read before we can write.
*/
Expand All @@ -750,13 +744,20 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
for (bio = pkt->orig_bios; bio; bio = bio->bi_next) {
int first_frame = (bio->bi_sector - pkt->sector) / (CD_FRAMESIZE >> 9);
int num_frames = bio->bi_size / CD_FRAMESIZE;
pd->stats.secs_w += num_frames * (CD_FRAMESIZE >> 9);
BUG_ON(first_frame < 0);
BUG_ON(first_frame + num_frames > pkt->frames);
for (f = first_frame; f < first_frame + num_frames; f++)
written[f] = 1;
}
spin_unlock(&pkt->lock);

if (pkt->cache_valid) {
VPRINTK("pkt_gather_data: zone %llx cached\n",
(unsigned long long)pkt->sector);
goto out_account;
}

/*
* Schedule reads for missing parts of the packet.
*/
Expand Down Expand Up @@ -790,7 +791,6 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
frames_read, (unsigned long long)pkt->sector);
pd->stats.pkt_started++;
pd->stats.secs_rg += frames_read * (CD_FRAMESIZE >> 9);
pd->stats.secs_w += pd->settings.size;
}

/*
Expand Down

0 comments on commit 41ffe64

Please sign in to comment.