Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93729
b: refs/heads/master
c: b361acb
h: refs/heads/master
i:
  93727: cdad212
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Apr 27, 2008
1 parent 8b3ba85 commit 7030ca5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 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: 7f5e72f471763fe2a6e72863a64a2ef459f37835
refs/heads/master: b361acb1083f0b313a4b398de48450f5edb81fe1
24 changes: 2 additions & 22 deletions trunk/drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,27 +2270,6 @@ static void idetape_pad_zeros(ide_drive_t *drive, int bcount)
}
}

static int idetape_pipeline_size(ide_drive_t *drive)
{
idetape_tape_t *tape = drive->driver_data;
idetape_stage_t *stage;
struct request *rq;
int size = 0;

idetape_wait_for_pipeline(drive);
stage = tape->first_stage;
while (stage != NULL) {
rq = &stage->rq;
size += tape->blk_size * (rq->nr_sectors -
rq->current_nr_sectors);
if (rq->errors == IDETAPE_ERROR_FILEMARK)
size += tape->blk_size;
stage = stage->next;
}
size += tape->merge_stage_size;
return size;
}

/*
* Rewinds the tape to the Beginning Of the current Partition (BOP). We
* currently support only one partition.
Expand Down Expand Up @@ -2737,7 +2716,8 @@ static int idetape_chrdev_ioctl(struct inode *inode, struct file *file,
idetape_flush_tape_buffers(drive);
}
if (cmd == MTIOCGET || cmd == MTIOCPOS) {
block_offset = idetape_pipeline_size(drive) /
idetape_wait_for_pipeline(drive);
block_offset = tape->merge_stage_size /
(tape->blk_size * tape->user_bs_factor);
position = idetape_read_position(drive);
if (position < 0)
Expand Down

0 comments on commit 7030ca5

Please sign in to comment.