addr_array = blkaddr_in_node(rn);
addr_array[ofs_in_node] = cpu_to_le32(dn->data_blkaddr);
set_page_dirty(node_page);
+ dn->node_changed = true;
}
int reserve_new_block(struct dnode_of_data *dn)
nid_t nid; /* node id of the direct node block */
unsigned int ofs_in_node; /* data offset in the node page */
bool inode_page_locked; /* inode page is locked or not */
+ bool node_changed; /* is node block changed */
block_t data_blkaddr; /* block address of the node block */
};
set_nid(parent, offset[i - 1], nids[i], i == 1);
alloc_nid_done(sbi, nids[i]);
+ dn->node_changed = true;
done = true;
} else if (mode == LOOKUP_NODE_RA && i == level && level > 1) {
npage[i] = get_node_page_ra(parent, offset[i - 1]);
if (ret < 0)
goto out_err;
set_nid(page, i, 0, false);
+ dn->node_changed = true;
}
} else {
child_nofs = nofs + ofs * (NIDS_PER_BLOCK + 1) + 1;
ret = truncate_nodes(&rdn, child_nofs, 0, depth - 1);
if (ret == (NIDS_PER_BLOCK + 1)) {
set_nid(page, i, 0, false);
+ dn->node_changed = true;
child_nofs += ret;
} else if (ret < 0 && ret != -ENOENT) {
goto out_err;
if (err < 0)
goto fail;
set_nid(pages[idx], i, 0, false);
+ dn->node_changed = true;
}
if (offset[idx + 1] == 0) {
} else {
update_inode_page(dn->inode);
}
+ dn->node_changed = true;
}
int sync_node_pages(struct f2fs_sb_info *sbi, nid_t ino,