Skip to contentSkip to conversation

badblocks blocksize setting

DISCUSSION Marius Reiner 2 participants 4 messages Mar 15, 2003

lore
Share & tools
lore
#0 lore raw

Hi,
not really a reiserfs issue:
When following the FAQ everything is fine, I set blocksize zu 4096 as debugreiserfs told me, and don't get any bad blocks. Nevertheless I'm a bit concerned about the ones, badblocks reports, when being invoked without the -b option. How does this happen? Which docs are there on this topic apart from badblocks manpage/sourcecode? Or should I just ignore them?
Thanks in advance
Marius

#1 lore raw

Hello!

Quoted 3 lines · Marius Reiner

not really a reiserfs issue:
When following the FAQ everything is fine, I set blocksize zu 4096 as debugreiserfs told me, and don't get any bad blocks.

Good.

Quoted 2 lines

Nevertheless I'm a bit concerned about the ones, badblocks reports, when being invoked without the -b option. How does this happen?

Can you please show the command line and the resulting output with badblocks? Also what is in dmesg output after such a run?

Quoted 1 line

Or should I just ignore them?

There is not enough info yet.
Can you please tell us whole story?

Bye,
Oleg

#2 lore raw
Quoted 8 lines

Hello!

Quoted 3 lines · Marius Reiner

not really a reiserfs issue:
When following the FAQ everything is fine, I set blocksize zu 4096 as debugreiserfs told me, and don't get any bad blocks.

Quoted 6 lines

Good.

Quoted 2 lines

Nevertheless I'm a bit concerned about the ones, badblocks reports, when being invoked without the -b option. How does this happen?

Can you please show the command line and the resulting output with

badblocks?

Quoted 1 line

Also what is in dmesg output after such a run?

# badblocks /dev/hdc8 -b 4096
# dmesg -c
invalidate: busy buffer
# badblocks /dev/hdc8
979932
# dmesg
invalidate: busy buffer
attempt to access beyond end of device
16:08: rw=0, want=979936, limit=979933
attempt to access beyond end of device
16:08: rw=0, want=979936, limit=979933

So using the -b option has the side-effect of not accessing the partition beyond its end? I'm running a vanilla 2.4.20 kernel, actually it's the kernels task to refuse those accesses, isn't it?
However, what I'm missing in the FAQ, is a short note about _why_ one should use the -b option, so no worries arise when getting bad blocks without it. Thanks
Marius

#3 lore raw

Hello!

Quoted 14 lines · Marius Reiner
Quoted 1 line

Can you please show the command line and the resulting output with

badblocks?

Quoted 1 line

Also what is in dmesg output after such a run?

# badblocks /dev/hdc8 -b 4096
# dmesg -c
invalidate: busy buffer
# badblocks /dev/hdc8
979932
# dmesg
invalidate: busy buffer
attempt to access beyond end of device
16:08: rw=0, want=979936, limit=979933
attempt to access beyond end of device
16:08: rw=0, want=979936, limit=979933

Hm, is 979936 looks like size of your device in kilobytes (+-3)? If so, this is known kernel bug/problem, where it cannot access parts of device at the end sometimes. This is somehow related to setblocksize. This can be ignored, then.

Quoted 2 lines

However, what I'm missing in the FAQ, is a short note about _why_ one should use the -b option, so no worries arise when getting bad blocks without it.

-b is needed so block output by bad blocks have the same bad blocks as in reiserfs. (4096 bytes in size, without -b, badblocks defaults to 1024 bytes blocks, so you need to divide its output by 4).

Bye,
Oleg