1 |
On 09/11/2022 23:31, Grant Edwards wrote: |
2 |
>> If I recall correctly, it will add any unreadable blocks to its |
3 |
>> internal list of bad sectors, which it will then refuse to allocate |
4 |
>> in the future. |
5 |
|
6 |
I doubt you recall correctly. You should ONLY EVER conclude a block is |
7 |
bad if you can't write to it. Remember what I said - if I read my 8TB |
8 |
drive from end-to-end twice, then I should *expect* a read error ... |
9 |
|
10 |
> I'm asking what happens to the file containing the bad block. Perphaps |
11 |
> nothing. The man page says the block is added to the "bad block |
12 |
> inode". If that block was already allocated, is the bad block is now |
13 |
> allocated to two different inodes? |
14 |
> |
15 |
If a read fails, you SHOULD NOT do anything. If a write fails, you move |
16 |
the block and mark the failed block as bad. But seeing as you've moved |
17 |
the block, the bad block is no longer allocated to any file ... |
18 |
|
19 |
Cheers, |
20 |
Wol |