Failed file system during testing #41
-
Hi there, We are encountering a file system error during a long testing. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@dots89 I might know what's going on here. Based on the details you provided, I deduce that your block size ( While looking into this, I discovered a bug: we aren't enforcing the maximum volume sizes which are inherent to the smaller block sizes. As a result, when the maximum is exceeded, it's possible to have an out-of-bounds access in the bitmap array, which would look exactly like what you describe. For some background, I'll quote from the Reliance Edge Developer's Guide, specifically the "By the Numbers" chapter, which says the following:
To elaborate on this a bit, block sizes less than 16384 bytes have a maximum volume size which is constrained by the implementation of the free space bitmap. The free space bitmap is split into block-sized "imap" nodes; and the bitmap in the "metaroot" block must be large enough so that it has a bit for each imap node. For example, with a block size of 512 bytes, the metaroot's bitmap is 480 bytes in size, large enough for 480 * 8 = 3840 imap nodes, and each imap node holds (512 - 16) * 8 = 3968 bits. If you do the math on that, 3840 imap nodes * 3968 bits per imap node * 512 bytes per block = ~7.27 GB maximum volume size. However, there's a bug in that these maximums are poorly enforced. The Reliance Edge Configuration Utility ( However,—assuming I have correctly identified the root cause of the problem you are seeing (i.e., your volume is larger than ~7.27 GB),—you don't need to wait for us to fix anything. Since a block size of 512 bytes is too small for your volume size, you will either need to increase the block size or decrease the volume size. The former option (increasing the block size) is probably the most straightforward: you can use the table quoted above as a guide for how large the block size needs to be. However, larger block sizes do increase the amount of RAM the filesystem will need; if that's an issue, you could consider the latter option (decreasing the volume size), either by partitioning the storage device into multiple volumes, or by leaving part of it unused, such that each Reliance Edge partition is less than 7.27 GB in size. |
Beta Was this translation helpful? Give feedback.
-
Commit f7111ee added code to detect when the volume size exceeds the maximum size supported by the block size, so that we fail gracefully in this situation. |
Beta Was this translation helpful? Give feedback.
@dots89 I might know what's going on here. Based on the details you provided, I deduce that your block size (
REDCONF_BLOCK_SIZE
) is 512, since in that configuration the metaroot has a 480 byte bitmap. How large is your filesystem volume? Is it greater than 7.27 GB, by chance?While looking into this, I discovered a bug: we aren't enforcing the maximum volume sizes which are inherent to the smaller block sizes. As a result, when the maximum is exceeded, it's possible to have an out-of-bounds access in the bitmap array, which would look exactly like what you describe.
For some background, I'll quote from the Reliance Edge Developer's Guide, specifically the "By the Numbers" chapter, which s…