Skip to contentSkip to conversation

Multiple functionality breakages in 2.6.12rc3 IDE layer

DISCUSSION Alan Cox 3 participants 9 messages Apr 28, 2005 – Apr 29, 2005 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

Ages ago we added an ide_default driver to clean up all the corner cases like spurious IRQs for a device with no matching driver (eg ide-cd and no CD driver) as well as ioctls and file access.

2.6.12rc removes it. Unfortunately it also means that if your only IDE interface is one you hand configure you can no longer run Linux. It also changes other aspects of behaviour although they don't look problematic for most users. You can no longer
- Control the bus state of an interface
- Reset an interface
- Add an interface if none exist
- Issue raw commands
- Get an objects bios geometry
- Read the identify data by ioctl (its still in proc but may be stale)

without having a device specific driver loaded matching the media - and that only works if its already detected the device correctly.

I don't have the tools at the moment to generate spurious IRQ's for devices with no driver loaded but it does look like the code may well then crash. From the way the changes were done it appears the current IDE maintainers never appreciated that ide_default existed for far more than just cleaning up ide-proc but also to handle IRQ's, opening of empty slots, ioctls and power
management ?

The ability to specify the IDE ports on the command line as needed for some Sony laptop installs have also become "obsolete" over time. They still appear to work but spew a warning that the user will soon be screwed.

Alan

#1 lore raw
Quoted 10 lines · Alan Cox

Ages ago we added an ide_default driver to clean up all the corner cases like spurious IRQs for a device with no matching driver (eg ide-cd and no CD driver) as well as ioctls and file access.

2.6.12rc removes it. Unfortunately it also means that if your only IDE interface is one you hand configure you can no longer run Linux. It also changes other aspects of behaviour although they don't look problematic for most users. You can no longer
- Control the bus state of an interface
- Reset an interface

But isn't that the stuff we use for swapping drives? Down the drive, down the interface, swap, and restart? Are these the functions called by hdparm (-bRU) which are all of a sudden not going to work? Or am I being alarmist?

Quoted 7 lines

- Add an interface if none exist
- Issue raw commands
- Get an objects bios geometry
- Read the identify data by ioctl (its still in proc but may be stale)

without having a device specific driver loaded matching the media - and that only works if its already detected the device correctly.

I missed the discussion of why it was felt that the users would no longer want to be able to do these things, or the new way to do it.

Quoted 9 lines

I don't have the tools at the moment to generate spurious IRQ's for devices with no driver loaded but it does look like the code may well then crash. From the way the changes were done it appears the current IDE maintainers never appreciated that ide_default existed for far more than just cleaning up ide-proc but also to handle IRQ's, opening of empty slots, ioctls and power
management ?

I suspect that's true, but should it not have been discussed first?

Quoted 4 lines

The ability to specify the IDE ports on the command line as needed for some Sony laptop installs have also become "obsolete" over time. They still appear to work but spew a warning that the user will soon be screwed.

I'll have to read the release notes and see who to thank for this reduction in functionality.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
author
#2 lore raw
Quoted 6 lines · Bill Davidsen

On Thu, 28 Apr 2005, Alan Cox wrote:

But isn't that the stuff we use for swapping drives? Down the drive, down the interface, swap, and restart? Are these the functions called by hdparm (-bRU) which are all of a sudden not going to work? Or am I being alarmist?

True but the only kernels supporting that are 2.4.x-ac. There are reasons I noticed this and looking at getting 2.6 IDE back to 2.4 standards in this area was one of them.

Quoted 2 lines

I missed the discussion of why it was felt that the users would no longer want to be able to do these things, or the new way to do it.

I'm assuming it may be accidental rather than detailed planning. Also its taken this long to notice so its clearly not that critical to everyone. Seems to be reasonably sane to fix too.

Alan

#3 lore raw
Quoted 11 lines · Alan Cox
Quoted 6 lines · Bill Davidsen

On Thu, 28 Apr 2005, Alan Cox wrote:

But isn't that the stuff we use for swapping drives? Down the drive, down the interface, swap, and restart? Are these the functions called by hdparm (-bRU) which are all of a sudden not going to work? Or am I being alarmist?

True but the only kernels supporting that are 2.4.x-ac. There are reasons I noticed this and looking at getting 2.6 IDE back to 2.4 standards in this area was one of them.

The amazing part is that I haven't had a drive fail since I went from 2.4 to 2.6 over a year ago. As you say, it works on your 2.4 kernels, I've "oh shit" tested it. So if I lose a drive now I'm screwed, not my favorite operating status.

Quoted 7 lines
Quoted 3 lines

I missed the discussion of why it was felt that the users would no longer want to be able to do these things, or the new way to do it.

I'm assuming it may be accidental rather than detailed planning. Also its taken this long to notice so its clearly not that critical to everyone. Seems to be reasonably sane to fix too.

I was being a bit sarcastic about the "missed the discussion" bit, but I'm pretty sure ripping out the capability was deliberate. Hopefully it's now going to be evaluated, and then fixed. One thing Linux doesn't seem to do well is recover failed drives at boot time, it always seems to take a bunch of fiddling or even a boot from live CD and hand recover.

Quoted 3 lines

Alan

Thanks for jumping into this, with ATAPI storage down to about $1100(US)/TB it's getting really hard to justify SCSI and real hot swap hardware.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
#4 lore raw
In reply to Alan Cox
Quoted 1 line · Alan Cox

Ages ago we added an ide_default driver to clean up all the corner cases

s/clean up/hide/

Quoted 13 lines

like spurious IRQs for a device with no matching driver (eg ide-cd and no CD driver) as well as ioctls and file access.

2.6.12rc removes it. Unfortunately it also means that if your only IDE interface is one you hand configure you can no longer run Linux. It also changes other aspects of behaviour although they don't look problematic for most users. You can no longer
- Control the bus state of an interface
- Reset an interface
- Add an interface if none exist
- Issue raw commands
- Get an objects bios geometry
- Read the identify data by ioctl (its still in proc but may be stale)

Details please.

Quoted 10 lines

without having a device specific driver loaded matching the media - and that only works if its already detected the device correctly.

I don't have the tools at the moment to generate spurious IRQ's for devices with no driver loaded but it does look like the code may well then crash. From the way the changes were done it appears the current IDE maintainers never appreciated that ide_default existed for far more than just cleaning up ide-proc but also to handle IRQ's, opening of empty slots, ioctls and power
management ?

Maybe you should mail current maintainer before spreading FUD?

No functionality was removed AFAIK, see the patches. I spend quite a bit of time making sure that nothing breaks up (I missed one special case but somebody already posted patch to LKML fixing it).

These patches were posted at least two times to both linux-ide and linux-kernel, they were in -mm for ages - were you hiding under the rock?

Quoted 4 lines

The ability to specify the IDE ports on the command line as needed for some Sony laptop installs have also become "obsolete" over time. They still appear to work but spew a warning that the user will soon be screwed.

This was discussed few times already.

Alan, seriously, what is your problem?

Bartlomiej

author
#5 lore raw
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Alan Cox

Ages ago we added an ide_default driver to clean up all the corner cases

s/clean up/hide/

Matter of opinion.

Quoted 9 lines
Quoted 7 lines

for most users. You can no longer
- Control the bus state of an interface
- Reset an interface
- Add an interface if none exist
- Issue raw commands
- Get an objects bios geometry
- Read the identify data by ioctl (its still in proc but may be stale)

Details please.

If you need details you shouldn't be maintaining that code. Its obvious why. You've disabled open() of a device with no bound driver.

Quoted 3 lines

No functionality was removed AFAIK, see the patches. I spend quite a bit of time making sure that nothing breaks up (I missed one special case but somebody already posted patch to LKML fixing it).

Build a kernel without ide-cd. Now try and issue ioctls on it. Doesn't work any more does it.

Quoted 4 lines

These patches were posted at least two times to both linux-ide and linux-kernel, they were in -mm for ages - were you hiding under the rock?

No, just doing an MBA thesis, a job, learning a second language and trying to beat sense into our politicians. Now I come back to look at the ide layer ready for a 2.6.12 merge and its all a bit messy. The open code was clean and is now duplicated. Copies of subtly different per driver gendisk/disk layer open routines have appeared that should be shared. The default driver handling has been removed and half the options for obscure systems have been marked obsolete in some Gnome like purge of functionality that might scare small children.

Quoted 6 lines
Quoted 4 lines

The ability to specify the IDE ports on the command line as needed for some Sony laptop installs have also become "obsolete" over time. They still appear to work but spew a warning that the user will soon be screwed.

This was discussed few times already.

And the discussion lead to no fixes

Quoted 1 line

Alan, seriously, what is your problem?

The fact that the IDE layer appears to be getting worse not better, which given the starting point is a remarkable achievement.

Alan

#6 lore raw
Quoted 7 lines · Alan Cox
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line · Alan Cox

Ages ago we added an ide_default driver to clean up all the corner cases

s/clean up/hide/

Matter of opinion.

No, it hided holes in the locking which is getting fixed finally.

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines

for most users. You can no longer
- Control the bus state of an interface
- Reset an interface
- Add an interface if none exist
- Issue raw commands
- Get an objects bios geometry
- Read the identify data by ioctl (its still in proc but may be stale)

Details please.

If you need details you shouldn't be maintaining that code. Its obvious

Give details or quit whining.

Quoted 1 line

why. You've disabled open() of a device with no bound driver.

Guess what open() for ide-default was doing in 2.6?

return -ENXIO;

and no it wasn't my change - it was the effect of fixing locking of the higher layers.

Quoted 8 lines
Quoted 3 lines

No functionality was removed AFAIK, see the patches. I spend quite a bit of time making sure that nothing breaks up (I missed one special case but somebody already posted patch to LKML fixing it).

Build a kernel without ide-cd. Now try and issue ioctls on it. Doesn't work any more does it.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

These patches were posted at least two times to both linux-ide and linux-kernel, they were in -mm for ages - were you hiding under the rock?

No, just doing an MBA thesis, a job, learning a second language and trying to beat sense into our politicians. Now I come back to look at

It seems that they influenced you heavily...

Quoted 2 lines

the ide layer ready for a 2.6.12 merge and its all a bit messy. The open code was clean and is now duplicated. Copies of subtly different per

You must be joking.

Quoted 1 line

driver gendisk/disk layer open routines have appeared that should be

Each change was given rationale and detailed changelog, maybe you should get familiar with them. Also look for patch converting device drivers to sysfs (posted few times).

Quoted 4 lines

shared. The default driver handling has been removed and half the options for obscure systems have been marked obsolete in some Gnome like purge of functionality that might scare small children.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

The ability to specify the IDE ports on the command line as needed for some Sony laptop installs have also become "obsolete" over time. They still appear to work but spew a warning that the user will soon be screwed.

This was discussed few times already.

And the discussion lead to no fixes

So fix the real bugs and leave debugging stuff alone.

Quoted 4 lines
Quoted 1 line

Alan, seriously, what is your problem?

The fact that the IDE layer appears to be getting worse not better, which given the starting point is a remarkable achievement.

Personal insults are easy, get technical facts.

Bartlomiej

author
#7 lore raw
Quoted 8 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line

why. You've disabled open() of a device with no bound driver.

Guess what open() for ide-default was doing in 2.6?

return -ENXIO;

and no it wasn't my change - it was the effect of fixing locking of the higher layers.

Yes so it needed fixing and without all the kref, kmalloc, unique object structure per ide driver code spew too.

Quoted 4 lines
Quoted 2 lines

The fact that the IDE layer appears to be getting worse not better, which given the starting point is a remarkable achievement.

Personal insults are easy, get technical facts.

I consider that a technical fact. The last IDE code I maintained fully in 2.4 had mostly working locking, drive hotplug, open for unbound drivers, didnt oops on spurious irqs and wasn't losing all sorts of useful boot options. I had hoped that I wouldnt have to totally fork the 2.6 IDE code in order to get back to where 2.4-ac was and get the locking working so you can't oops it via /proc

Alan

#8 lore raw
Quoted 5 lines · Alan Cox
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 1 line

why. You've disabled open() of a device with no bound driver.

Guess what open() for ide-default was doing in 2.6?

Quoted 7 lines
Quoted 4 lines

return -ENXIO;

and no it wasn't my change - it was the effect of fixing locking of the higher layers.

Yes so it needed fixing and without all the kref, kmalloc, unique object structure per ide driver code spew too.

IDE is similar to SCSI now in this respect.
Are you claiming that SCSI needs fixing too?

Quoted 11 lines
Quoted 4 lines
Quoted 2 lines

The fact that the IDE layer appears to be getting worse not better, which given the starting point is a remarkable achievement.

Personal insults are easy, get technical facts.

I consider that a technical fact. The last IDE code I maintained fully in 2.4 had mostly working locking, drive hotplug, open for unbound drivers, didnt oops on spurious irqs and wasn't losing all sorts of useful boot options. I had hoped that I wouldnt have to totally fork the 2.6 IDE code in order to get back to where 2.4-ac was and get the locking working so you can't oops it via /proc

Somehow you seem to forget that I took maintaince over 2.5.5x (or 2.5.6x) and there was a lot new stuff added when you were away (i.e. driver-model and IDE code needs to conform with it to get sane power management and sysfs support) and that a lot of other things have changed (influencing IDE).

Feel free to fork so you'll be wasting yours time only and not mine.