SCSI st tape wrong minor in 2.5.40 with devfs

SCSI st tape wrong minor in 2.5.40 with devfs

Post by Bjoern A. Zee » Sun, 06 Oct 2002 14:20:06



Hi,

I see a problem with recent 2.5 kernels and SCSI st and devfs.

As you can see from the output down under the minors are off by 4.

I rechecked that 9,128 (as described in Documentation/devices.txt)
would be correct for nst0 by calling mknod and *tata* the backup
would be running fine again (at least mt is working again - not
running a backup...).

So minors should be the number of the tape device and not
the number of the target counting from 0.

This is what it used to be:

total 0
crw-r-----    1 root     root      21,   3 Jan  1  1970 generic
crw-rw-rw-    1 root     root       9,   0 Jan  1  1970 mt
crw-rw-rw-    1 root     root       9,  96 Jan  1  1970 mta
crw-rw-rw-    1 root     root       9, 224 Jan  1  1970 mtan
crw-rw-rw-    1 root     root       9,  32 Jan  1  1970 mtl
crw-rw-rw-    1 root     root       9, 160 Jan  1  1970 mtln
crw-rw-rw-    1 root     root       9,  64 Jan  1  1970 mtm
crw-rw-rw-    1 root     root       9, 192 Jan  1  1970 mtmn
crw-rw-rw-    1 root     root       9, 128 Jan  1  1970 mtn

Linux megablast 2.5.38 #57 SMP Wed Sep 25 17:38:37 UTC 2002 i686 unknown
[this was bk checkout from 20020923-211332 UTC]

this is what I get with latest 2.5.40-bk:

/dev/{nst0 resp nst4}: No such device or address

total 0
crw-r-----    1 root     root      21,   3 Jan  1  1970 generic
crw-rw-rw-    1 root     root       9,   4 Jan  1  1970 mt
crw-rw-rw-    1 root     root       9, 100 Jan  1  1970 mta
crw-rw-rw-    1 root     root       9, 228 Jan  1  1970 mtan
crw-rw-rw-    1 root     root       9,  36 Jan  1  1970 mtl
crw-rw-rw-    1 root     root       9, 164 Jan  1  1970 mtln
crw-rw-rw-    1 root     root       9,  68 Jan  1  1970 mtm
crw-rw-rw-    1 root     root       9, 196 Jan  1  1970 mtmn
crw-rw-rw-    1 root     root       9, 132 Jan  1  1970 mtn

Linux megablast 2.5.40 #77 SMP Sat Oct 5 07:43:57 UTC 2002 i686 unknown
[bk-2.5 checkout, 20021005-060333 UTC]

--
Bjoern A. Zeeb                          bzeeb at Zabbadoz dot NeT
56 69 73 69 74                          http://www.zabbadoz.net/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

SCSI st tape wrong minor in 2.5.40 with devfs

Post by Kai Makisar » Sun, 06 Oct 2002 14:40:05



> Hi,

> I see a problem with recent 2.5 kernels and SCSI st and devfs.

You probably can see it also with driverfs :-(

Quote:> As you can see from the output down under the minors are off by 4.

The device registration was moved outside the st_dev_arr_lock spinlock but
it seems that I was a bit careless, after all. The driverfs/devicefs
registration loop contains the following lines:

            tpnt->driverfs_dev_r[mode].driver_data =
                        (void *)(long)__mkdev(MAJOR_NR, i + (mode << 5));

            tpnt->de_r[mode] =
                devfs_register (SDp->de, name, DEVFS_FL_DEFAULT,
                                MAJOR_NR, i + (mode << 5),
                                S_IFCHR | S_IRUGO | S_IWUGO,

(two of each type)

In the original location i did contain the device number but here it
contains 4 (from the latest loop). The fix seems to be to replace i by
dev_num but I have not yet tested it.

Thanks for reporting the bug.

--
Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

SCSI st tape wrong minor in 2.5.40 with devfs

Post by Bjoern A. Zee » Sun, 06 Oct 2002 15:00:08



> In the original location i did contain the device number but here it
> contains 4 (from the latest loop). The fix seems to be to replace i by
> dev_num but I have not yet tested it.

Thought of s.th. like this but had no old version a hand ..
I'll give it a look and if it seems ok, I'll give it a try and let you know ...

--
Bjoern A. Zeeb                          bzeeb at Zabbadoz dot NeT
56 69 73 69 74                          http://www.zabbadoz.net/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. minor devfs cleanup for 2.5.40

Hi,

Here's a changeset from Christoph Hellwig that removes some unneeded
code from the kernel core.  This was leftover from before devfs became
part of the main kernel tree, and was trying to do some naming fixups in
kernelspace.  If anyone still has machines using these names, their
startup scripts should be modified to use the "standard" devfs names.

Please pull from:  http://linuxusb.bkbits.net/devfs-2.5

thanks,

greg k-h

 init/do_mounts.c |   58 -------------------------------------------------------
 1 files changed, 58 deletions(-)
-----


  [PATCH] Remove some more devfs crap

  Translation code for old devfs names that _never_ were in mainline
  for root=.

 init/do_mounts.c |   58 -------------------------------------------------------
 1 files changed, 58 deletions(-)
------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Extracting last few characters in a line

3. ALSA Menuconfig Breakage in 2.5.40 and 2.5.40-bk1

4. ssadload fail - cannot download while in string configration

5. 2.5.40: stat.st_gen for inode generations

6. 137GB hard drive limit?

7. IDE-SCSI kernel param hangs 2.4.20-pre8-ac3 and 2.5.40

8. KDE kontrol-panel

9. 2.5.40: problems loading/unloading ide-scsi modules

10. PATCH: 2.5.40 Fix stupid scsi setup bug in 53c406, fix addressing

11. ide-scsi ooops with 2.5.40 (PIIX4 and DVD)

12. 2.5.40

13. 2.5.40: lkcd (3/9): kerntypes addition