linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.11rc2 prints disksize twice
@ 2005-01-31 12:15 Olaf Hering
  2005-01-31 17:05 ` Patrick Mansfield
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2005-01-31 12:15 UTC (permalink / raw)
  To: linux-scsi

I think its not a functional problem,
but parts of the disk detection is printed twice.

...
SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdc: drive cache: write through
SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdc: drive cache: write through
...


Loading sym0: <1010-66> rev 0x1 at pci 0000:41:01.0 irq 103
kernel/drivers/ssym0: No NVRAM, ID 7, Fast-80, LVD, parity checking
csi/scsi_mod.ko
Loading kernel/drivers/scsi/sdsym0: SCSI BUS has been reset.
_mod.ko
Loadingscsi0 : sym-2.1.18n
 kernel/drivers/scsi/sr_mod.ko
Loading kernel/drivers/scsi/scsi_transport_spi.ko
Loading kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko
sym0:8: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31)
  Vendor: IBM       Model: IC35L036UCDY10-0  Rev: S28C
  Type:   Direct-Access                      ANSI SCSI revision: 03
sym0:8:0: tagged command queuing enabled, command queue depth 16.
 target0:0:8: Beginning Domain Validation
sym0:8: asynchronous.
sym0:8: wide asynchronous.
sym0:8: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
 target0:0:8: Ending Domain Validation
SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sda: drive cache: write through
SCSI device sda: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sda: drive cache: write through
 sda: sda2 sda3 sda4
Attached scsi disk sda at scsi0, channel 0, id 8, lun 0
sym0:9: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31)
  Vendor: IBM       Model: IC35L036UCDY10-0  Rev: S28C
  Type:   Direct-Access                      ANSI SCSI revision: 03
sym0:9:0: tagged command queuing enabled, command queue depth 16.
 target0:0:9: Beginning Domain Validation
sym0:9: asynchronous.
sym0:9: wide asynchronous.
sym0:9: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
 target0:0:9: Ending Domain Validation
SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdb: drive cache: write through
SCSI device sdb: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdb: drive cache: write through
 sdb: sdb1 sdb2 sdb3
Attached scsi disk sdb at scsi0, channel 0, id 9, lun 0
sym0:10: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31)
  Vendor: IBM       Model: IC35L036UCDY10-0  Rev: S28C
  Type:   Direct-Access                      ANSI SCSI revision: 03
sym0:10:0: tagged command queuing enabled, command queue depth 16.
 target0:0:10: Beginning Domain Validation
sym0:10: asynchronous.
sym0:10: wide asynchronous.
sym0:10: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 31)
 target0:0:10: Ending Domain Validation
SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdc: drive cache: write through
SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
SCSI device sdc: drive cache: write through
 sdc: sdc1 sdc2 sdc3
Attached scsi disk sdc at scsi0, channel 0, id 10, lun 0
  Vendor: IBM       Model: HSBPD4E  PU3SCSI  Rev: 0016
  Type:   Enclosure                          ANSI SCSI revision: 02
 target0:0:15: Beginning Domain Validation
 target0:0:15: Ending Domain Validation
sym1: <1010-66> rev 0x1 at pci 0000:41:01.1 irq 104
sym1: No NVRAM, ID 7, Fast-80, LVD, parity checking
sym1: SCSI BUS has been reset.
scsi1 : sym-2.1.18n



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.11rc2 prints disksize twice
  2005-01-31 12:15 2.6.11rc2 prints disksize twice Olaf Hering
@ 2005-01-31 17:05 ` Patrick Mansfield
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Mansfield @ 2005-01-31 17:05 UTC (permalink / raw)
  To: Olaf Hering, viro; +Cc: linux-scsi

On Mon, Jan 31, 2005 at 01:15:37PM +0100, Olaf Hering wrote:
> I think its not a functional problem,
> but parts of the disk detection is printed twice.

Yes ...

> ...
> SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
> SCSI device sdc: drive cache: write through
> SCSI device sdc: 71096640 512-byte hdwr sectors (36401 MB)
> SCSI device sdc: drive cache: write through
> ...
> 

I looked into it some, there was a change from Al to always set
bd_invalidated in register_disk(), and then to call blkdev_get. This means
the block_dev.c do_open will call rescan_partitions, and in turn call
revalidate_disk even for non-removable media.

This change:

http://linux.bkbits.net:8080/linux-2.5/diffs/fs/partitions/check.c@1.127?nav=index.html|src/|src/fs|src/fs/partitions|hist/fs/partitions/check.c

The log comment from Al says "Work around devices with bogus media change
indication on the first open".

Al - What did that fix? Why was that done in the generic block code, and
not the affected driver (multiple revalidate_disk call in the
driver on device discovery)? 

I tested this patch with scsi fixed and removable disks with no problems,
but it could break whatever Al fixed. Otherwise it should work with any
block driver that calls (for removable/modifiable media) check_disk_change
on open and that has a revalidate_disk function and the device is not
broken (it looks like that is the correct use of the two functions, I'm
not certain).

diff -uprN -X /home/patman/dontdiff linux-2.6.11-rc1/fs/partitions/check.c no-double-sd-linux-2.6.11-rc1/fs/partitions/check.c
--- linux-2.6.11-rc1/fs/partitions/check.c	Fri Dec 24 13:35:28 2004
+++ no-double-sd-linux-2.6.11-rc1/fs/partitions/check.c	Fri Jan 21 11:19:00 2005
@@ -375,8 +375,6 @@ int rescan_partitions(struct gendisk *di
 	bdev->bd_invalidated = 0;
 	for (p = 1; p < disk->minors; p++)
 		delete_partition(disk, p);
-	if (disk->fops->revalidate_disk)
-		disk->fops->revalidate_disk(disk);
 	if (!get_capacity(disk) || !(state = check_partition(disk, bdev)))
 		return 0;
 	for (p = 1; p < state->limit; p++) {

-- Patrick Mansfield

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-31 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 12:15 2.6.11rc2 prints disksize twice Olaf Hering
2005-01-31 17:05 ` Patrick Mansfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).