Filesystems squashfs文件系统索引到磁盘块的映射

Filesystems squashfs文件系统索引到磁盘块的映射,filesystems,kernel,squashfs,Filesystems,Kernel,Squashfs,谁能告诉我squashfs是如何将磁盘块号映射到文件系统块的。 基本上,我是说在squashfs中读取块列表() 谢谢, Kapil常规文件的squashfs元数据大致如下所示: ===== Header start_block: Position of the first block in the file file_size: Size of the file in bytes ... ===== Block list size0: 32-bit header for the first b

谁能告诉我squashfs是如何将磁盘块号映射到文件系统块的。 基本上,我是说在squashfs中读取块列表()

谢谢,
Kapil

常规文件的squashfs元数据大致如下所示:

===== Header start_block: Position of the first block in the file file_size: Size of the file in bytes ... ===== Block list size0: 32-bit header for the first block size1 size2 ... ===== ======标题 开始块:文件中第一个块的位置 文件大小:以字节为单位的文件大小 ... ====阻止列表 size0:第一个块的32位标头 尺码1 尺码2 ... ===== 块标题包含块的压缩大小。因此,我们可以通过将start_块和所有前面块的大小相加来计算任何给定块的位置

使用我的纯ruby squashfs解析器可能会有所帮助: