Re: size limit for backing store? block sizes? ("[sdx] Bad block number requested")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eric,

Zitat von Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx>:
On Fri, 10 Feb 2017, Jens-U. Mozdzen wrote:
[...]
myserver:~ # blockdev --getss /dev/md125
4096

- created the bcache super block

myserver:~ # make-bcache -B --block 4096b /dev/md125
UUID:                   05d4d36a-ef17-4ecb-99d4-0a0eeec03941
Set UUID:               dd4165a9-47ca-4e35-9e7a-5968e1e40d92
version:                1
block_size:             8
data_offset:            16
myserver:~ # bcache-super-show /dev/md125
sb.magic                ok
sb.first_sector         8 [match]
sb.csum                 F4E616E067FA3C45 [match]
sb.version              1 [backing device]

dev.label               (empty)
dev.uuid                05d4d36a-ef17-4ecb-99d4-0a0eeec03941
dev.sectors_per_block   8
dev.sectors_per_bucket  1024
dev.data.first_sector   16
dev.data.cache_mode     0 [writethrough]
dev.data.cache_state    0 [detached]

cset.uuid               dd4165a9-47ca-4e35-9e7a-5968e1e40d92
myserver:~ # [...]

Why does it report 8 sectors per block? With 4k per sector, that'd be a block
size of 32k?

Its in 512b units and 8*512=4096.  Lots of things are in units of 512 even
though your block size is 4096.  Its correct, it just looks funny since
you have 4k sectors.

first of all, thank you for that information, I succeeded in setting up that specific bcache scenario, have populated it and found no problems so far.

Once I had a few spare minutes, I double-checked the source code of make-bcache and bcache-show-super and indeed, there's hardcoded the factor of 512 bytes. Nothing wrong with that, but I strongly suggest to change both tools to include some unit information:

--- cut here ---
myserver:~ # make-bcache -B --block 4096b /dev/md125
[...]
block_size:             8 (units of 512 octets)

myserver:~ # bcache-super-show /dev/md125
[...]
dev.sectors_per_block   8 (pseudo-sectors of 512 octets each)
--- cut here ---

dev.sectors_per_block is especially misleading in its current display, because that data element actually does *not* relate to native block device sectors.

Both changes would be purely cosmetic and not altering current functionality.

It might be favorable (AKA "better readable") to instead output the "block_size" in bytes/octets in both places, instead of just dumping the value of the super block element.

Regards,
J


--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux