[Ocfs2-commits] smushran commits r3074 - branches/ocfs2-1.2/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Nov 29 18:16:04 PST 2007
Author: smushran
Date: 2007-11-29 18:16:04 -0800 (Thu, 29 Nov 2007)
New Revision: 3074
Modified:
branches/ocfs2-1.2/fs/ocfs2/localalloc.c
Log:
ocfs2: Remove expensive local alloc bitmap scan code
This patch is a backport of the one checked in by Jan Kara in mainline.
As per Jan, the patch lowered the CPU usage and increased the write
throughput of dd if=/dev/zero of=/ocfs2/file bs=1M count=500 conv=sync
from 37 MB/s to 45.4 MB/s in local mode...
Authored-by: Jan Kara <jack at suse.cz>
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.2/fs/ocfs2/localalloc.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/localalloc.c 2007-11-21 04:21:13 UTC (rev 3073)
+++ branches/ocfs2-1.2/fs/ocfs2/localalloc.c 2007-11-30 02:16:04 UTC (rev 3074)
@@ -491,17 +491,6 @@
alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
- if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
- ocfs2_local_alloc_count_bits(alloc)) {
- ocfs2_error(osb->sb, "local alloc inode %"MLFu64" says it has "
- "%u free bits, but a count shows %u",
- le64_to_cpu(alloc->i_blkno),
- le32_to_cpu(alloc->id1.bitmap1.i_used),
- ocfs2_local_alloc_count_bits(alloc));
- status = -EIO;
- goto bail;
- }
-
free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) -
le32_to_cpu(alloc->id1.bitmap1.i_used);
if (bits_wanted > free_bits) {
@@ -719,9 +708,8 @@
void *bitmap;
struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
- mlog_entry("total = %u, COUNT = %u, used = %u\n",
+ mlog_entry("total = %u, used = %u\n",
le32_to_cpu(alloc->id1.bitmap1.i_total),
- ocfs2_local_alloc_count_bits(alloc),
le32_to_cpu(alloc->id1.bitmap1.i_used));
if (!alloc->id1.bitmap1.i_total) {
More information about the Ocfs2-commits
mailing list