blocksize

Johannes Winkelmann jw at smts.ch
Tue Sep 5 21:07:53 UTC 2006


Hi Matthias, 

On Tue, Sep 05, 2006 at 21:38:26 +0200, Matthias Pfeifer wrote:
[...]
> Sorry that i have to continue this dead thread. But i am still
> struggling with my file-system.
> Ok, I ignored the recommendation from the handbook. But i keep moving.
> I want to go to reiserfs for some reasons and prepared a partition with
> 
> "mkreiserfs -b 512 /dev/hda4"
> 
> however mounting the partition with
> 
> "mount /dev/hda4 /mnt"
> 
> gives me a "floating point exception".
Reproducable here and by others on IRC:

> Is there anything i can do to avoid this?
> The crux list has no reference to this and doing a google search on
> the topic seems to give only a bunch of completely unrelated links.
It is also fairly off topic here. However, for the sake of having it
archived and hopefully retrievable via google for the rest of the world, here
we go :-).

> gdb gives me a backtrace with
> 
> #0 blkid_llseek () from /lib/libblkid.so.1
> #1 blkid_verify () from /lib/libblkid.so.1
> #2 blkid_get_dev () from /lib/libblkid.so.1
> #3 blkid_get_tag_value () from /lib/libblkid.so.1
> #4 error ()
If you build a debug build of e2fsprogs (which provides libblkid),
you'll get a somewhat better backtrace:

#0  0xb7f0c0f4 in probe_reiserfs (probe=0xbf8594b8, id=0xb7f0f870, 
    buf=0x80697c0 "\200R¨\004ú÷§\004\001\020") at probe.c:425
425             if (id->bim_kboff/(blocksize>>10) > blkid_le32(rs->rs_journal_block))
(gdb) where
#0  0xb7f0c0f4 in probe_reiserfs (probe=0xbf8594b8, id=0xb7f0f870, 
    buf=0x80697c0 "\200R¨\004ú÷§\004\001\020") at probe.c:425
#1  0xb7f0ca0e in blkid_verify (cache=0x80588a0, dev=0x8059770) at probe.c:822
#2  0xb7f0a4b4 in blkid_get_dev (cache=0x80588a0, 
    devname=0x8059750 "/dev/sda5", flags=<value optimized out>) at devname.c:82
#3  0xb7f0d367 in blkid_get_tag_value (cache=0x80588a0, 
    tagname=0x40 <Address 0x40 out of bounds>, devname=0x8059750 "/dev/sda5")
    at resolve.c:45
#4  0x0804f838 in error ()


lib/blkid/probe.c [1] line 425 reads:
  if (id->bim_kboff/(blocksize>>10) > blkid_le32(rs->rs_journal_block))

Now, if blocksize is 512, blocksize>>10 is 0. This explains the problem
you're seeing.
That said, it's not possible to use a blocksize of 512 with the current
release of e2fsprogs. Whether this is intentional or not is unclear to
me at the moment.

HTH, Johannes

References:
 1. http://thunk.org/hg/e2fsprogs/?f=20ad07a17a5a;file=lib/blkid/probe.c
-- 
Johannes Winkelmann              mailto:jw at smts.ch
Zurich, Switzerland              http://jw.smts.ch



More information about the CRUX mailing list