From: Mingming Cao <cmm@us.ibm.com>
To: linux-ext4@vger.kernel.org
Subject: [RFC][PATCH 1/6] delalloc ENOSPC: Add per-inode counters to store reserved blocks
Date: Sun, 01 Jun 2008 16:35:33 -0700 [thread overview]
Message-ID: <1212363333.4368.64.camel@localhost.localdomain> (raw)
ext4: delalloc -- Adding per inode counters to store reserved blocks
From: Mingming cao <cmm@us.ibm.com>
Add per-inode counters to store number of resreved data blocks
and metadata blocks, due to delayed allocation.
Signed-off-by: Mingming cao <cmm@us.ibm.com>
---
fs/ext4/ext4_i.h | 4 ++++
fs/ext4/super.c | 2 ++
2 files changed, 6 insertions(+)
Index: linux-2.6.26-rc4/fs/ext4/ext4_i.h
===================================================================
--- linux-2.6.26-rc4.orig/fs/ext4/ext4_i.h 2008-06-01 13:06:25.000000000 -0700
+++ linux-2.6.26-rc4/fs/ext4/ext4_i.h 2008-06-01 14:26:14.000000000 -0700
@@ -162,6 +162,10 @@ struct ext4_inode_info {
/* mballoc */
struct list_head i_prealloc_list;
spinlock_t i_prealloc_lock;
+
+ /* allocation reservation info for delalloc */
+ unsigned long i_reserved_data_blocks;
+ unsigned long i_reserved_meta_blocks;
};
#endif /* _EXT4_I */
Index: linux-2.6.26-rc4/fs/ext4/super.c
===================================================================
--- linux-2.6.26-rc4.orig/fs/ext4/super.c 2008-06-01 14:22:03.000000000 -0700
+++ linux-2.6.26-rc4/fs/ext4/super.c 2008-06-01 14:26:14.000000000 -0700
@@ -572,6 +572,8 @@ static struct inode *ext4_alloc_inode(st
memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
INIT_LIST_HEAD(&ei->i_prealloc_list);
spin_lock_init(&ei->i_prealloc_lock);
+ ei->i_reserved_data_blocks = 0;
+ ei->i_reserved_meta_blocks = 0;
return &ei->vfs_inode;
}
reply other threads:[~2008-06-01 23:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1212363333.4368.64.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
/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