lkml.org 
[lkml]   [2008]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 00/10] AXFS: Advanced XIP filesystem
On Tue, 2 September 2008 09:44:19 -0700, Jared Hulbert wrote:
>
> How is one expected to read those last 4 bytes of a loopbacked file?
> Are they unreadable? We can add the padding. I am just wondering if
> this is a bug or a known limitation in the loopback handling or if
> there is a different safer way of reading block devs with truncated
> last blocks.

Can't you just include the final magic into the last block, thereby
making the size a clean multiple of 4k? It looks as if you have some
padding before the magic anyway. So you just have to make sure the
padding is at least 4 bytes and write the magic to the end of it. Apart
from solving this bug, it should also save you some space. ;)


Jörn

--
Invincibility is in oneself, vulnerability is in the opponent.
-- Sun Tzu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-09-02 19:17    [W:0.053 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site