News for hackers. Stuff that matters.
Re:Why doesn't Windows recognize a USB device plugged into a... by justin66 on Friday June 26, 2015 @10:07AM (#9784417)
A flashing light tells you when the device is writing or reading. It doesn't tell you when an important cache on the operating system side has been completely flushed. Or that the OS will start writing to the device again in a fraction of a second. Or a dozen other things that are relevant to removing a storage device on a modern system.
Re:Why doesn't Windows recognize a USB device plugged into a... by derekp7 on Friday June 26, 2015 @01:14PM (#9786212)
A good UI would be to have the USB's normal state be "ready to pull", and have the icon in the tray turn red when there is unflushed data in the cache, and turn green when you can safely pull the drive. That way there is nothing to remember to click on. Then, in the case where another write starts up just before you pull the drive, give you the ability to plug the device back in to let the data flush to it (after the OS check the volume ID of course).
Re:Why doesn't Windows recognize a USB device plugged into a... by justin66 on Friday June 26, 2015 @03:03PM (#9787004)
> A good UI would be to have the USB's normal state be "ready to pull"

That's completely wrong. If it were workable, that's how these things would have always been set up. We've got good reasons for not doing things this way.

> have the icon in the tray turn red when there is unflushed data in the cache

There's a lot more to worry about than data in the cache. Open or locked files are an issue regardless of whether or not the cache is empty.

> turn green when you can safely pull the drive

We have almost got this now, with the icon that indicates whether it's safe to pull the drive or not. The difference is that you have to unmount the drive manually to get the friendly "all clear" indication. (a lot of times it won't really matter if you pull the drive while it's mounted)

You could add a process to automatically unmount the drive, but simultaneously provide some kind of virtual drive such that applications could seamlessly remount it and use it. You've then got the possibility that an app will start using it in the moment between when you look at the screen to verify it is safe to pull the drive and when you pull the drive. To make THAT error go away you need to add a request to the user to put the drive back in...

> Then, in the case where another write starts up just before you pull the drive, give you the ability to plug the device back in to let the data flush to it (after the OS check the volume ID of course).

Of course it's not just writes, there are also reads to be contended with.

Anyway, after seeing a few of the new "Not ready reading drive A Abort, Retry, Fail?" error messages, people are going to wonder why your new feature is fucking with them.

Re:Why doesn't Windows recognize a USB device plugged into a... by derekp7 on Friday June 26, 2015 @04:23PM (#9787497)
I was thinking that at a minimum, have an the indicator be red if the write cache is dirty or there are open files on the drive. But I see your point, that in that case green wouldn't really mean that it is safe either. And having the indicator be green/yellow/read (for unmounted/clean cache, no open files/open files or dirty cache) might be a bit more confusing.
Re:Why doesn't Windows recognize a USB device plugged into a... by Dylan16807 on Friday June 26, 2015 @03:54PM (#9787326)
Windows doesn't delay writes to a non-fixed drive by default, so the blinking light works fine.

A new write is possible but unlikely if the user is done with the drive, and again shouldn't cause major damage.

Re:Why doesn't Windows recognize a USB device plugged into a... by justin66 on Friday June 26, 2015 @07:21PM (#9788308)
File locking is still a thing.

The blinking light does precisely what it advertises. That's never really been the issue.

Damage certainly is unlikely if the thing is pulled while mounted. I wouldn't design the UI around that, though.

Re:Why doesn't Windows recognize a USB device plugged into a... by Dylan16807 on Saturday June 27, 2015 @05:08AM (#9789571)
An unplugged drive doesn't need locks, and if a program puts a file into an inconsistent state and leaves it there because it has a lock? Have they ever heard of crashing or power outages?
Re:Why doesn't Windows recognize a USB device plugged into a... by justin66 on Saturday June 27, 2015 @01:28PM (#9790836)
You want "them" to use files more safely so that you can implement a less safe means of mounting and unmounting devices? I'm grateful Microsoft (and others) do not think that way.
Re:Why doesn't Windows recognize a USB device plugged into a... by Dylan16807 on Saturday June 27, 2015 @03:46PM (#9791313)
If a program crashes when idle I don't want corrupt data. If I leave a program open in the background and I lose power or my video card driver takes down the system I don't want corrupt data.

I can somewhat excuse losing data if things go wrong during a save. At any other time it should be robust enough that my data is safe.

This is not just about unplugging drives, this is a general sanity measure.