lkml.org 
[lkml]   [2003]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Blockbusting news, results are in
On Tue, Oct 21, 2003 at 10:32:34PM -0400, Valdis.Kletnieks@vt.edu wrote:
> Yes, I knew this was doable if the filesystem was unmounted - the fun is of
> course that if you get a bad block in /usr or someplace similar, it would
> REALLY be nice to be able to do something about it without taking it offline..

Agreed, it wouldn't be that hard to add some kernel code to do this
on-line, at least if the block isn't already allocated. If the block
is already allocated, there would need to have to be some userspace
help to find which file the block actually belongs to, so the block
could be substituted out and the user appropriatly warned.

> I admit I haven't cooked up a test filesystem and actually checked what happens
> if you feed the -l flag a block that's already in a file (presumably it
> deallocates it from the inode and leaves a sparse hole) or a block that
> contains inodes or a superblock copy...

It gets treated as a block that has been claimed by two inodes (which
it is; the original inode and the bad block inode). E2fsck gives the
user the option of (a) allocating a new block so that the file gets
replacement block with whatever data could be copied from the bad
block, or (b) if the user declines the first option, e2fsck next gives
the user the option of deleting the file containing bad block.

- Ted



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

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.054 / U:2.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site