struct lafs_inode *li;
int err = 0;
+ /* We found this block during roll-forward and need to
+ * include it in the filesystem.
+ * If 'bytes' is 0, the this is a 'hole' and we should
+ * ignore baddr
+ */
+ if (bytes == DescHole)
+ baddr = 0;
+
dprintk("Roll Block %d/%d/%lu/%llu\n",
fsnum, inum, (unsigned long) bnum,
(unsigned long long)baddr);
* So if this is a depth==0 non-directory inode,
* treat the data as a miniblock update.
*/
+ if (bytes != fs->blocksize)
+ break;
err = lafs_load_page(fs, p, baddr, 1);
dprintk("inode load page err %d\n", err);
if (err)
mdsize = le16_to_cpu(lai->metadata_size);
if (lai->filetype >= TypeBase &&
lai->filetype != TypeDir &&
- bytes == fs->blocksize &&
lai->depth == 0 &&
mdsize > 1 && mdsize < fs->blocksize) {
u64 sz = le64_to_cpu(lai->metadata[0].file.size);
/* already correctly indexed */
break;
- if (li->type >= TypeBase &&
+ if (li->type >= TypeBase && bytes != DescHole &&
inode->i_size <= ((loff_t)bnum << inode->i_blkbits)) {
inode->i_size = ((loff_t)bnum << inode->i_blkbits) + bytes;
set_bit(I_Dirty, &LAFSI(inode)->iflags);