Hans Reiser wrote:
Ric Wheeler wrote:

Having mkfs ignore bad writes would seem to encourage users to create
a new file system on a disk that is known to be bad & most likely not
going to function well.  If a user ever has a golden opportunity to
toss a drive in the trash, it is when they notice mkfs fails ;-)  This
option to mkfs sounds like an invitation to disaster.
Yes, you are right, the option should be to run badblocks and then fail
if it finds any.

Unless it creates significantly more work for us, there should be an option to run badblocks, and if it finds any, it should prompt the user (with BIG FAT CAPSLOCK WARNINGS) whether they want to format anyway. Formatting anyway should work, and we should be able to have blocks marked bad.

It would also be nice to be able to change this later -- to pass in a list of badblocks to, say, fsck (which I think is the original request). This is especially nice for recovery, if you don't have the luxury of copying a whole disk image to another drive before running fsck.

That's not to say that we should automatically detect and relocate bad blocks during normal operation (while the FS is mounted), but deliberately removing functionality to protect you from yourself isn't the Linux Way. Linux has a long history of kernel config options that say things like "YOU WILL LOSE DATA. You have been warned."

Reply via email to