Displaying 2 results from an estimated 2 matches for "zero_block".
Did you mean:
zero_blocks
2012 Oct 24
2
[BUG][BTRFS-PROGS] Fix Bug to corrupt the img file
...file''s size goes larger to 2Mbytes.
Signed-off-by: Rock Lee <zimilo@code-trick.com>
---
utils.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/utils.c b/utils.c
index 205e667..3c88d2e 100644
--- a/utils.c
+++ b/utils.c
@@ -441,7 +441,7 @@ static int zero_blocks(int fd, off_t start, size_t len)
return ret;
}
-static int zero_dev_start(int fd)
+static int zero_dev_start(int fd, u64 dev_size)
{
off_t start = 0;
size_t len = 2 * 1024 * 1024;
@@ -451,6 +451,10 @@ static int zero_dev_start(int fd)
start = 1024;
len -=...
2006 Apr 02
1
Zeroing freed blocks
...ta,usrquota Quota options are silently ignored by ext2.
--- linux-2.6.16/fs/ext2/balloc.c.zerofree 2006-03-20 05:53:29.000000000 +0000
+++ linux-2.6.16/fs/ext2/balloc.c 2006-04-02 09:21:52.000000000 +0100
@@ -174,6 +174,16 @@ static void group_release_blocks(struct
}
}
+static inline void zero_block(struct super_block *sb, unsigned long block)
+{
+ struct buffer_head * bh;
+
+ bh = sb_getblk(sb, block);
+ memset(bh->b_data, 0, bh->b_size);
+ mark_buffer_dirty(bh);
+ brelse(bh);
+}
+
/* Free given blocks, update quota and i_blocks field */
void ext2_free_blocks (struct inode * inode, un...