[Ocfs2-commits] mfasheh commits r2182 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Apr 26 17:36:20 CDT 2005
Author: mfasheh
Signed-off-by: manish
Date: 2005-04-26 17:36:18 -0500 (Tue, 26 Apr 2005)
New Revision: 2182
Modified:
trunk/fs/ocfs2/file.c
Log:
* get rid of some unused code
Signed-off-by: manish
Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c 2005-04-26 22:33:14 UTC (rev 2181)
+++ trunk/fs/ocfs2/file.c 2005-04-26 22:36:18 UTC (rev 2182)
@@ -60,11 +60,6 @@
struct buffer_head *fe_bh,
u64 new_i_size);
-static unsigned int ocfs_calc_overalloc_bits(ocfs_super *osb,
- struct file *filp,
- ocfs2_dinode *fe,
- u64 new_size);
-
int ocfs_sync_inode(struct inode *inode)
{
filemap_fdatawrite(inode->i_mapping);
@@ -723,18 +718,6 @@
return status;
}
-static unsigned int ocfs_calc_overalloc_bits(ocfs_super *osb,
- struct file *filp,
- ocfs2_dinode *fe,
- u64 new_size)
-{
-#warning "finish this"
- /* TODO: We will keep a small history of allocs on the filp
- * and calculate a reasonable overalloc based on that data
- * here. */
- return 0;
-}
-
/* ocfs_extend_file()
*
* Ok, this function is heavy on the goto's - we need to clean it up a
@@ -751,10 +734,8 @@
{
int status = 0;
int restart_func = 0;
- int skip_overalloc = 0;
int drop_alloc_sem = 0;
int credits, num_free_extents;
- unsigned int overalloc_bits = 0;
u32 clusters_to_add;
u64 new_fe_size;
struct buffer_head *bh = NULL;
@@ -806,16 +787,6 @@
if (!clusters_to_add)
goto do_start_trans;
- overalloc_bits = 0;
- if (!skip_overalloc) {
- overalloc_bits = ocfs_calc_overalloc_bits(osb,
- NULL,
- fe,
- new_i_size);
- clusters_to_add += overalloc_bits;
- skip_overalloc = 1;
- }
-
num_free_extents = ocfs_num_free_extents(osb,
inode,
fe);
@@ -919,7 +890,7 @@
clusters_to_add =
ocfs2_clusters_for_bytes(osb->sb,
new_i_size)
- - fe->i_clusters + overalloc_bits;
+ - fe->i_clusters;
mlog(0, "restarting transaction.\n");
/* TODO: This can be more intelligent. */
credits = ocfs_calc_extend_credits(osb->sb,
More information about the Ocfs2-commits
mailing list