ref: 03bd7774082c8a04cf1aa0d1d4d8b3991f55e891
parent: d5061ab6135497e2091d94c34ce194c4e83b6b27
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Dec 26 06:11:31 EST 2015
Revert "ext4: make sure blocks are not contaminated with data in block cache." This reverts commit 46c3c339d15e69ac633e122b95861151d6af1c62.
--- a/lwext4/ext4.c
+++ b/lwext4/ext4.c
@@ -1497,10 +1497,6 @@
if (r != EOK)
goto Finish;
- r = ext4_block_flush_lba(f->mp->fs.bdev, fblk);
- if (r != EOK)
- goto Finish;
-
off = fblk * block_size + unalg;
r = ext4_block_writebytes(f->mp->fs.bdev, off, u8_buf, len);
if (r != EOK)
@@ -1525,8 +1521,6 @@
fblock_count = 0;
while (size >= block_size) {
- uint32_t i;
-
while (iblk_idx < iblock_last) {
if (iblk_idx < ifile_blocks) {
r = ext4_fs_init_inode_dblk_idx(&ref, iblk_idx,
@@ -1556,13 +1550,6 @@
fblock_count++;
}
- for (i = 0;i < fblock_count;i++) {
- r = ext4_block_flush_lba(f->mp->fs.bdev, fblock_start + i);
- if (r != EOK)
- goto Finish;
-
- }
-
r = ext4_blocks_set_direct(f->mp->fs.bdev, u8_buf, fblock_start,
fblock_count);
if (r != EOK)
@@ -1605,10 +1592,6 @@
/*Node size sholud be updated.*/
goto out_fsize;
}
-
- r = ext4_block_flush_lba(f->mp->fs.bdev, fblk);
- if (r != EOK)
- goto Finish;
off = fblk * block_size;
r = ext4_block_writebytes(f->mp->fs.bdev, off, u8_buf, size);