[PATCH 04/24] debugfs: allow bmap to allocate blocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow set_inode_field's bmap command in debugfs to allocate blocks,
which enables us to allocate blocks for indirect blocks and internal
extent tree blocks.  True, we could do this manually, but seems like
unnecessary bookkeeping activity for humans.

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
 debugfs/set_fields.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index b4ca546..c5f865e 100644
--- a/debugfs/set_fields.c
+++ b/debugfs/set_fields.c
@@ -556,8 +556,9 @@ static errcode_t parse_bmap(struct field_set_info *info,
 	}
 
 	retval = ext2fs_bmap2(current_fs, set_ino,
-			     (struct ext2_inode *) &set_inode,
-			     NULL, BMAP_SET, array_idx, NULL, &blk);
+			      (struct ext2_inode *) &set_inode,
+			      NULL, BMAP_ALLOC | BMAP_SET, array_idx, NULL,
+			      &blk);
 	if (retval) {
 		com_err("set_inode", retval, "while setting block map");
 	}

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux