linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: cmm@us.ibm.com, tytso@mit.edu, sandeen@redhat.com
Cc: linux-ext4@vger.kernel.org,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [RFC PATCH -v2 4/9] ext4: cleanup mballoc header files
Date: Mon,  3 Nov 2008 23:06:04 +0530	[thread overview]
Message-ID: <1225733769-23734-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com> (raw)
In-Reply-To: <1225733769-23734-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

Move some of the forward declaration of the static functions
to mballoc.c where they are used. This enables us to include
mballoc.h in other .c files. Also correct the buddy cache
documentation.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/ext4/mballoc.c |   14 ++++++++++++--
 fs/ext4/mballoc.h |   18 +-----------------
 2 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 05631d1..390dc81 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -100,7 +100,7 @@
  * inode as:
  *
  *  {                        page                        }
- *  [ group 0 buddy][ group 0 bitmap] [group 1][ group 1]...
+ *  [ group 0 bitmap][ group 0 buddy] [group 1][ group 1]...
  *
  *
  * one block each for bitmap and buddy information.  So for each group we
@@ -330,6 +330,16 @@
  *        object
  *
  */
+static struct kmem_cache *ext4_pspace_cachep;
+static struct kmem_cache *ext4_ac_cachep;
+static struct kmem_cache *ext4_free_ext_cachep;
+static void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
+					ext4_group_t group);
+static int ext4_mb_init_per_dev_proc(struct super_block *sb);
+static int ext4_mb_destroy_per_dev_proc(struct super_block *sb);
+static void release_blocks_on_commit(journal_t *journal, transaction_t *txn);
+
+
 
 static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
 {
@@ -716,7 +726,7 @@ static void ext4_mb_generate_buddy(struct super_block *sb,
  * stored in the inode as
  *
  * {                        page                        }
- * [ group 0 buddy][ group 0 bitmap] [group 1][ group 1]...
+ * [ group 0 bitmap][ group 0 buddy] [group 1][ group 1]...
  *
  *
  * one block each for bitmap and buddy information.
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index 7cc69c2..407b39a 100644
--- a/fs/ext4/mballoc.h
+++ b/fs/ext4/mballoc.h
@@ -99,9 +99,6 @@
  */
 #define MB_DEFAULT_GROUP_PREALLOC	512
 
-static struct kmem_cache *ext4_pspace_cachep;
-static struct kmem_cache *ext4_ac_cachep;
-static struct kmem_cache *ext4_free_ext_cachep;
 
 struct ext4_free_data {
 	/* this links the free block information from group_info */
@@ -263,25 +260,12 @@ static inline void ext4_mb_store_history(struct ext4_allocation_context *ac)
 {
 	return;
 }
-#else
-static void ext4_mb_store_history(struct ext4_allocation_context *ac);
 #endif
 
 #define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
 
 struct buffer_head *read_block_bitmap(struct super_block *, ext4_group_t);
 
-static void ext4_mb_generate_from_pa(struct super_block *sb, void *bitmap,
-					ext4_group_t group);
-static void ext4_mb_return_to_preallocation(struct inode *inode,
-					struct ext4_buddy *e4b, sector_t block,
-					int count);
-static void ext4_mb_put_pa(struct ext4_allocation_context *,
-			struct super_block *, struct ext4_prealloc_space *pa);
-static int ext4_mb_init_per_dev_proc(struct super_block *sb);
-static int ext4_mb_destroy_per_dev_proc(struct super_block *sb);
-static void release_blocks_on_commit(journal_t *journal, transaction_t *txn);

  reply	other threads:[~2008-11-03 17:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 17:36 [RFC PATCH -v2 1/9] ext4: sparse fixes Aneesh Kumar K.V
2008-11-03 17:36 ` [RFC PATCH -v2 2/9] ext4: Add blocks added during resize to bitmap Aneesh Kumar K.V
2008-11-03 17:36   ` [RFC PATCH -v2 3/9] ext4: Use EXT4_GROUP_INFO_NEED_INIT_BIT during resize Aneesh Kumar K.V
2008-11-03 17:36     ` Aneesh Kumar K.V [this message]
2008-11-03 17:36       ` [RFC PATCH -v2 5/9] ext4: sparse annotate the group info semaphore Aneesh Kumar K.V
2008-11-03 17:36         ` [RFC PATCH -v2 6/9] ext4: Call journal commit callback without holding j_list_lock Aneesh Kumar K.V
2008-11-03 17:36           ` [RFC PATCH -v2 7/9] ext4: don't use the block freed but not yet committed during buddy initialization Aneesh Kumar K.V
2008-11-03 17:36             ` [RFC PATCH -v2 8/9] ext4: Fix double free of blocks Aneesh Kumar K.V
2008-11-03 17:36               ` [RFC PATCH -v2 9/9] ext4: Fix lockdep recursive locking warning Aneesh Kumar K.V
2008-11-04 18:15                 ` Theodore Tso
2008-11-04 16:46               ` [RFC PATCH -v2 8/9] ext4: Fix double free of blocks Theodore Tso
2008-11-05 15:25                 ` Aneesh Kumar K.V
2008-11-04 17:15             ` [RFC PATCH -v2 7/9] ext4: don't use the block freed but not yet committed during buddy initialization Theodore Tso
2008-11-05 15:23               ` Aneesh Kumar K.V
2008-11-04 17:37           ` [RFC PATCH -v2 6/9] ext4: Call journal commit callback without holding j_list_lock Theodore Tso
2008-11-04 18:13           ` Theodore Tso
2008-11-04 17:43         ` [RFC PATCH -v2 5/9] ext4: sparse annotate the group info semaphore Theodore Tso
2008-11-05 14:59           ` Aneesh Kumar K.V
2008-11-04 18:00     ` [RFC PATCH -v2 3/9] ext4: Use EXT4_GROUP_INFO_NEED_INIT_BIT during resize Theodore Tso
2008-11-05 14:57       ` Aneesh Kumar K.V
2008-11-04 18:02 ` [RFC PATCH -v2 1/9] ext4: sparse fixes Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1225733769-23734-4-git-send-email-aneesh.kumar@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).