patch-2.2.18 linux/drivers/block/ide.c
Next file: linux/drivers/block/ll_rw_blk.c
Previous file: linux/drivers/block/ide-probe.c
Back to the patch index
Back to the overall index
- Lines: 29
- Date:
Sat Oct 14 01:00:34 2000
- Orig file:
v2.2.17/drivers/block/ide.c
- Orig date:
Sat Sep 9 18:42:34 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/drivers/block/ide.c linux/drivers/block/ide.c
@@ -1627,6 +1627,8 @@
ide_drive_t *drive;
ide_hwgroup_t *hwgroup;
unsigned int p, major, minor;
+ int old_blksize;
+ extern int *blksize_size[];
long flags;
if ((drive = get_info_ptr(i_rdev)) == NULL)
@@ -1634,6 +1636,7 @@
major = MAJOR(i_rdev);
minor = drive->select.b.unit << PARTN_BITS;
hwgroup = HWGROUP(drive);
+ old_blksize = blksize_size[major][minor];
spin_lock_irqsave(&io_request_lock, flags);
if (drive->busy || (drive->usage > 1)) {
spin_unlock_irqrestore(&io_request_lock, flags);
@@ -1651,7 +1654,10 @@
if (sb)
invalidate_inodes(sb);
invalidate_buffers (devp);
- set_blocksize(devp, 1024);
+ if (!old_blksize)
+ set_blocksize(devp, 1024);
+ else
+ set_blocksize(devp, old_blksize);
}
drive->part[p].start_sect = 0;
drive->part[p].nr_sects = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)