Skip to contentSkip to conversation

2.7 (future kernel) wish

DISCUSSION Jos Hulzink 11 participants 16 messages Dec 23, 2003 – Jan 5, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

First of all... Compliments about 2.6.0. It is a superb kernel, with very few serious bugs, and for me it runs stable like a rock from the very first moment.

As an end user, Linux doesn't give me a good feeling on one particular item
yet: Error handling.

What do I mean ? Well... for example: Pull out your USB stick with a mounted fs on it. Linux doesn't really seem to like it, got weird problems etc. It will survive, sure, but the user got no clue and data are lost for sure. Bad sectors on a disk... Linux will pass, but even 2.6.0 went very slow, unresponsive when a floppy with bad sectors went into the drive. Many other non-critical or solvable problems that are dealt with in a way that makes linux survive (most of the times), but not in a way that is neat from the user point of view.

It all just doesn't feel like Linux is doing the best it can to "rescue the user" when something is going wrong. Technically speaking, it's not only the task of the kernel to do so, but for an end user it makes the difference between an OS that does its job, and an OS that does its job nicely.

I think it's hard to describe what I mean exactly, but I hope you get the feeling. I too know that some of this is not within scope of the kernel (it's not the kernels task to tell the user "put back the USB drive or data is lost"), but after dealing with broken floppies again, I thought it was time to write my feelings to the list.

Best regards, and thanks for the wonderful world of Linux,

Jos

#1 lore raw
Quoted 11 lines · Jos Hulzink

Hi,

First of all... Compliments about 2.6.0. It is a superb kernel, with very few serious bugs, and for me it runs stable like a rock from the very first moment.

As an end user, Linux doesn't give me a good feeling on one particular item
yet: Error handling.

What do I mean ? Well... for example: Pull out your USB stick with a mounted fs on it.

You aren't supposed to do that. If you want to pull devices like that, with no warning, access them in other ways than mounting. mtools are nice when you don't want to mount/umount floppies - a similiar approach should work for usb sticks too.

Helge Hafting

#2 lore raw

While I agree that the kernel should provide decent error handling and reporting I still have to ask questions about what is reasonable.

What does that other OS do when you pull a USB stick out? What do you think the kernel should do? Why don't the applications operating on the data take better care of handling error conditions?

I don't have one here to try, but at some point the (ab)user needs to take a bit of the heat for his or her action(s) or lack thereof.

After all you could just reach in your case and rip out the IDE or SCSI cables. Bet that leads to all kinds of stuff (tm).

Cheers,
Dave

Quoted 28 lines · Helge Hafting
Quoted 9 lines · Jos Hulzink

Hi,

First of all... Compliments about 2.6.0. It is a superb kernel, with very few serious bugs, and for me it runs stable like a rock from the very first moment.

As an end user, Linux doesn't give me a good feeling on one particular item yet: Error handling.

What do I mean ? Well... for example: Pull out your USB stick with a mounted fs on it.

You aren't supposed to do that. If you want to pull devices like that,
with no warning, access them in other ways than mounting. mtools are nice when you don't want to mount/umount floppies - a similiar approach should work for usb sticks too.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
Quoted 10 lines · David B. Stevens

While I agree that the kernel should provide decent error handling and reporting I still have to ask questions about what is reasonable.

What does that other OS do when you pull a USB stick out? What do you think the kernel should do? Why don't the applications operating on the data take better care of handling error conditions?

I don't have one here to try, but at some point the (ab)user needs to take a bit of the heat for his or her action(s) or lack thereof.

Quoted 40 lines

After all you could just reach in your case and rip out the IDE or SCSI cables. Bet that leads to all kinds of stuff (tm).

Cheers,
Dave

Quoted 31 lines · Helge Hafting
Quoted 6 lines · Jos Hulzink

Hi,

First of all... Compliments about 2.6.0. It is a superb kernel, with very few serious bugs, and for me it runs stable like a rock from the very first moment.

Quoted 7 lines

As an end user, Linux doesn't give me a good feeling on one particular item
yet: Error handling.

What do I mean ? Well... for example: Pull out your USB stick with a mounted fs on it.

You aren't supposed to do that. If you want to pull devices like that, with no warning, access them in other ways than mounting. mtools are nice when you don't want to mount/umount floppies - a similiar approach should work for usb sticks too.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Sometimes Windows 2k or XP dump (BSOD), or maybe you just get an error.

Signature · 3 lines
VB programmers ask why no one takes them seriously, 
it's somewhat akin to a McDonalds manager asking employees 
why they don't take their 'career' seriously.
#4 lore raw
Quoted 51 lines · Joshua Schmidlkofer
Quoted 6 lines · David B. Stevens

While I agree that the kernel should provide decent error handling and reporting I still have to ask questions about what is reasonable.

What does that other OS do when you pull a USB stick out? What do you think the kernel should do? Why don't the applications operating on the data take better care of handling error conditions?

I don't have one here to try, but at some point the (ab)user needs to take a bit of the heat for his or her action(s) or lack thereof.

Quoted 41 lines

After all you could just reach in your case and rip out the IDE or SCSI cables. Bet that leads to all kinds of stuff (tm).

Cheers,
Dave

Quoted 31 lines · Helge Hafting
Quoted 11 lines · Jos Hulzink

Hi,

First of all... Compliments about 2.6.0. It is a superb kernel, with very few serious bugs, and for me it runs stable like a rock from the very first moment.

As an end user, Linux doesn't give me a good feeling on one particular item yet: Error handling.

What do I mean ? Well... for example: Pull out your USB stick with a mounted fs on it.

You aren't supposed to do that. If you want to pull devices like that,
with no warning, access them in other ways than mounting. mtools are nice when you don't want to mount/umount floppies - a similiar approach should work for usb sticks too.

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Quoted 4 lines

Sometimes Windows 2k or XP dump (BSOD), or maybe you just get an error.

Generally it just complains that you pulled out the device prematurely, I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Jim.

#5 lore raw
Quoted 1 line · Jim Crilly

'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Nope, when I put stuff onto a CF card via CF-to-USB adapter Windows still buffers writes to the media while the user interface goes on about its business. The only media that I've ever seen Windows use synchronously is old-style floppy disks.

#9 lore raw
In reply to Jim Crilly
Quoted 3 lines · Jim Crilly

Generally it just complains that you pulled out the device prematurely, I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

It would be pretty easy to screw things up if you pull out a device in the middle of use.

Quoted 5 lines

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed.

This is useful, and something I think we need on the Linux desktop (stay tuned).

Quoted 3 lines

I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Eww, I hope not, that would be excruciatingly slow. It might adjust the buffer writeback to be really short (even nearly immediate) but synchronous I/O is a different story, and much slower.

Rob Love

#6 lore raw
In reply to Kevin P. Fleming
Quoted 4 lines · Kevin P. Fleming

Nope, when I put stuff onto a CF card via CF-to-USB adapter Windows still buffers writes to the media while the user interface goes on about its business. The only media that I've ever seen Windows use synchronously is old-style floppy disks.

Yah, it really would not be smart to do all I/O synchronously.

It might be a neat idea to do the buffer writeback much sooner, but that would require per-device writeback settings, which is ugh.

Rob Love

#10 lore raw
In reply to Rob Love
Quoted 10 lines · Rob Love
Quoted 1 line · Jim Crilly

Generally it just complains that you pulled out the device prematurely, I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

It would be pretty easy to screw things up if you pull out a device in the middle of use.

Quoted 6 lines
Quoted 1 line

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed.

This is useful, and something I think we need on the Linux desktop (stay tuned).

I agree, that's one of the reasons I posted at all. Little things like this can make a big difference, even though I've seen a lot of users not notice the little icon and have to be told about it.

Maybe when the icon appears have a tool-tip that pops up and says something like "your USB device is ready for user at /mnt/usb, click here when you're done" or something like that to make it more noticable that they shouldn't just yank it.

But I seem to be getting OT for this list...

Quoted 11 lines
Quoted 2 lines

I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Eww, I hope not, that would be excruciatingly slow. It might adjust the buffer writeback to be really short (even nearly immediate) but synchronous I/O is a different story, and much slower.

Rob Love

Perhaps synchronous was the wrong term =) But it does atleast seem to do less buffering for removable devices or I could just be fooled by something else slowing it down.

#12 lore raw
In reply to Jim Crilly
Quoted 5 lines
Quoted 1 line

Generally it just complains that you pulled out the device prematurely, I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

Generally, yes. But it is not over-statement to say 'sometimes'. I have seen this quite a bit. =(. So I try not to pull devices w/o using 'Safely Remove...'

Quoted 5 lines

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed.

I am aware of this, =). I was just commenting that yanking the device in Windows - is not that much different from Linux.

Now, I would like to see the HAL type crap for Linux. It would be nice to have uniform user device control from a gui programmable means.

js

Signature · 3 lines
VB programmers ask why no one takes them seriously, 
it's somewhat akin to a McDonalds manager asking employees 
why they don't take their 'career' seriously.
#13 lore raw
In reply to Jim Crilly
Quoted 5 lines · Jim Crilly
Quoted 1 line

Generally it just complains that you pulled out the device prematurely, I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

Quoted 7 lines

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

I think the behavior of Win2k and WinXP is different for removable devices. Win2k seems to use async writes, and complains a lot if you remove them without stopping. XP seems to use sync writes, and doesn't tend to complain much.

I haven't seen either one crash from pulling out flash cards from a card reader (haven't tried a pen drive or similar). However, the media drivers they use for the USB readers sometimes seem to get into a bad state where they're continually writing until you unplug the device.

-J

#7 lore raw
In reply to Kevin P. Fleming

XP came with an option that I've seen on USB hard drives where it won't cache writes by default. It is in Device Manager, and called Optimize for quick removal. You can also enable write caching, which requires the use of the Safe Removal icon.

I don't recall 2000 having this option.

With Linux, I'm just ingrained to umount first.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kevin P. Fleming
Sent: Saturday, December 27, 2003 9:08 PM
To: Jim Crilly
Cc: Joshua Schmidlkofer; David B. Stevens; Helge Hafting; Jos Hulzink; Linux Kernel Mailing List
Subject: Re: 2.7 (future kernel) wish

Quoted 2 lines · Jim Crilly

'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage

done

Quoted 1 line

is limited.

Nope, when I put stuff onto a CF card via CF-to-USB adapter Windows still buffers writes to the media while the user interface goes on about

its business. The only media that I've ever seen Windows use synchronously is old-style floppy disks.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#8 lore raw

Hello Kevin!

Quoted 8 lines · you

XP came with an option that I've seen on USB hard drives where it won't cache writes by default. It is in Device Manager, and called Optimize for quick removal. You can also enable write caching, which requires the use of the Safe Removal icon.

I don't recall 2000 having this option.

With Linux, I'm just ingrained to umount first.

Or with Linux, you can use the "sync" mount option (or dirsync) to force direct write of data.

Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr
GSM         : 06.71.47.18.22 (in France)   ICQ UIN   : 7299959
Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA

Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
#14 lore raw
In reply to Jim Crilly
Quoted 6 lines · Jim Crilly
Quoted 5 lines

Sometimes Windows 2k or XP dump (BSOD), or maybe you just get an error.

Generally it just complains that you pulled out the device prematurely,

Depends on what the device is used for, I guess.

Quoted 3 lines

I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

Well, try having a partially loaded system dll on removable media when you pull the plug - it won't be pretty.

Quoted 7 lines

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Linux has sync mounts too. :-) the rest is a gui thing, i.e. not kernel.

Helge Hafting

#15 lore raw
Quoted 11 lines · Helge Hafting
Quoted 6 lines · Jim Crilly
Quoted 4 lines

Sometimes Windows 2k or XP dump (BSOD), or maybe you just get an error.

Generally it just complains that you pulled out the device prematurely,

Depends on what the device is used for, I guess.

Of course different things may happen depending on what's using the device, but IME I've never seen the OS give a STOP error from that.

Quoted 7 lines
Quoted 4 lines

I've never seen one give a STOP error from that but I guess a bad driver or USB controller could cause anything.

Well, try having a partially loaded system dll on removable media when you pull the plug - it won't be pretty.

If you go through all the work to get Windows to use a system file from
removable device then pull it out while using it, you deserve what you
get. The only thing you could do is page in the entire system file if you notice it's on a removable device then put a copy in swap for the case that someone pulls it out, but I don't think the special case would be worth it on Windows or Linux. Not that I have any proof Windows doesn't attempt to do that already =)

Quoted 6 lines
Quoted 3 lines

When you insert a device like a USB stick Windows puts a little icon next to the clock in the system tray that you're supposed to use to stop the device before pulling it, effectively it unmounts and stops (or atleast releases the device from) the driver so the device can be 'safely' removed. I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Linux has sync mounts too. :-) the rest is a gui thing, i.e. not kernel.

I know, but I felt like mentioning the rest because it's relevant to a number of people on the list.

Quoted 2 lines

Helge Hafting

Jim.

#11 lore raw
In reply to Jim Crilly
Quoted 9 lines · On Sat, 27 Dec 2003 22:19:53 -0500 Jim Crilly <[email protected]> wrote:
Quoted 9 lines
Quoted 3 lines

I also believe Windows mounts any removable device synchronously so that if you do pull it out prematurely the damage done is limited.

Eww, I hope not, that would be excruciatingly slow. It might adjust the buffer writeback to be really short (even nearly immediate) but synchronous I/O is a different story, and much slower.

Quoted 7 lines
Quoted 3 lines

Rob Love

Perhaps synchronous was the wrong term =) But it does atleast seem to do less buffering for removable devices or I could just be fooled by something else slowing it down.

check under device manager and notice that there is an option checked on USB media disks that says "SYNC"? I'm pretty sure that's pretty much synchronous transfers I assume.

Pat Erley

(Just delt with a neuros vs mvp3 chipset problem and noticed it)