]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mballoc: add comments to ext4_mb_mark_free_simple()
authorColy Li <i@coly.li>
Thu, 24 Feb 2011 18:24:25 +0000 (13:24 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 24 Feb 2011 18:24:25 +0000 (13:24 -0500)
This patch adds comments to ext4_mb_mark_free_simple to make it more
understandable.

Signed-off-by: Coly Li <bosong.ly@taobao.com>
Cc: Alex Tomas <alex@clusterfs.com>
Cc: Theodore Tso <tytso@google.com>
fs/ext4/mballoc.c

index 7de0e2824436e5fbee348601076dea7974a7ed1e..b5235c8a2e78ca3b1111276a71cdff8e1fdb468c 100644 (file)
@@ -635,7 +635,12 @@ static int __mb_check_buddy(struct ext4_buddy *e4b, char *file,
 #define mb_check_buddy(e4b)
 #endif
 
-/* FIXME!! need more doc */
+/*
+ * Divide blocks started from @first with length @len into
+ * smaller chunks with power of 2 blocks.
+ * Clear the bits in bitmap which the blocks of the chunk(s) covered,
+ * then increase bb_counters[] for corresponded chunk size.
+ */
 static void ext4_mb_mark_free_simple(struct super_block *sb,
                                void *buddy, ext4_grpblk_t first, ext4_grpblk_t len,
                                        struct ext4_group_info *grp)