[Ocfs2-commits] jlbec commits r1550 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Oct 7 11:04:21 CDT 2004


Author: jlbec
Date: 2004-10-07 11:04:20 -0500 (Thu, 07 Oct 2004)
New Revision: 1550

Modified:
   trunk/src/24io.c
   trunk/src/alloc.c
   trunk/src/aops.c
   trunk/src/bitmap.c
   trunk/src/buffer_head_io.c
   trunk/src/dir.c
   trunk/src/extmap.c
   trunk/src/extmap.h
   trunk/src/file.c
   trunk/src/heartbeat.c
   trunk/src/inode.c
   trunk/src/journal.c
   trunk/src/localalloc.c
   trunk/src/namei.c
   trunk/src/nm.c
   trunk/src/ocfs.h
   trunk/src/ocfs_compat.h
   trunk/src/ocfs_journal.h
   trunk/src/proc.c
   trunk/src/suballoc.c
   trunk/src/super.c
   trunk/src/sysfile.c
Log:

o Add ocfs2.h to put new header bits that:
	- Properly belong in a generic header
	- Are properly prefixed ocfs2_
  In general, if you have something that you want to put in ocfs.h,
  don't.  See if you can put it in ocfs2.h properly.



Modified: trunk/src/24io.c
===================================================================
--- trunk/src/24io.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/24io.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -17,6 +17,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dlm.h"

Modified: trunk/src/alloc.c
===================================================================
--- trunk/src/alloc.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/alloc.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "bitmap.h"
@@ -115,8 +116,8 @@
 {
 	u64 start_blkno = ext->e_blkno;
 
-	start_blkno += ocfs_clusters_to_blocks(inode->i_sb,
-					       ext->e_clusters);
+	start_blkno += ocfs2_clusters_to_blocks(inode->i_sb,
+						ext->e_clusters);
 	return (start_blkno == blkno);
 }
 
@@ -464,7 +465,7 @@
 
 	LOG_ENTRY();
 
-	start_cluster = ocfs_blocks_to_clusters(osb->sb, start_blk);
+	start_cluster = ocfs2_blocks_to_clusters(osb->sb, start_blk);
 
 	bitmap = &osb->cluster_bitmap;
 
@@ -2337,7 +2338,8 @@
 	tc->tc_last_eb_bh = NULL;
 	handle = tc->tc_handle;
 
-	target_i_clusters = ocfs_clusters_for_bytes(osb->sb, inode->i_size);
+	target_i_clusters = ocfs2_clusters_for_bytes(osb->sb,
+						     inode->i_size);
 	fe = (ocfs2_dinode *) fe_bh->b_data;
 
 	if (fe->id2.i_list.l_tree_depth) {
@@ -2455,7 +2457,8 @@
 
 	*tc = NULL;
 
-	new_i_clusters = ocfs_clusters_for_bytes(osb->sb, inode->i_size);
+	new_i_clusters = ocfs2_clusters_for_bytes(osb->sb,
+						  inode->i_size);
 	fe = (ocfs2_dinode *) fe_bh->b_data;
 
 	LOG_TRACE_ARGS("fe->i_clusters = %u, new_i_clusters = %u, fe->i_size ="

Modified: trunk/src/aops.c
===================================================================
--- trunk/src/aops.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/aops.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -31,6 +31,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "buffer_head_io.h"
@@ -75,8 +76,8 @@
 		goto bail;
 	}
 
-	if ((u64)iblock >= ocfs_clusters_to_blocks(inode->i_sb,
-					      fe->i_clusters)) {
+	if ((u64)iblock >= ocfs2_clusters_to_blocks(inode->i_sb,
+						    fe->i_clusters)) {
 		LOG_ERROR_ARGS ("block offset is outside the allocated size: %llu",
 		     (unsigned long long)iblock);
 		goto bail;

Modified: trunk/src/bitmap.c
===================================================================
--- trunk/src/bitmap.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/bitmap.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "bitmap.h"

Modified: trunk/src/buffer_head_io.c
===================================================================
--- trunk/src/buffer_head_io.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/buffer_head_io.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "util.h"

Modified: trunk/src/dir.c
===================================================================
--- trunk/src/dir.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/dir.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -48,6 +48,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dir.h"

Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/extmap.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -46,6 +46,13 @@
 static int ocfs_extent_map_lookup (ocfs_extent_map *map, __s64 virtual, __s64 *physical, __s64 *sectors, __u32 *index);
 static int ocfs_extent_map_next_entry (ocfs_extent_map *map, __u32 index, __s64 *virtual, __s64 *physical, __s64 *sectors);
 
+
+static inline struct _ocfs_inode_private *EM_IP(struct _ocfs_extent_map *em)
+{
+	return container_of(em, struct _ocfs_inode_private, ip_ext_map);
+}
+
+
 /*
  * ocfs_extent_map_init()
  *
@@ -55,10 +62,12 @@
 	LOG_ENTRY ();
 
 	OCFS_ASSERT (map != NULL);
-	spin_lock_init(&(map->lock));
+
+	spin_lock(&EM_IP(map)->ip_lock);
 	map->count = 0;
 	map->initialized = 1;
 	INIT_LIST_HEAD(&map->head);
+	spin_unlock(&EM_IP(map)->ip_lock);
 
 	LOG_EXIT ();
 	return;
@@ -74,27 +83,25 @@
 	LOG_ENTRY ();
 
 	OCFS_ASSERT (map != NULL);
+	spin_lock(&EM_IP(map)->ip_lock);
 	if (map->initialized) {
-		spin_lock(&(map->lock));
-		if (map->initialized) {
-			struct list_head *tmp, *tmp2;
-			ocfs_extent *ext;
-			list_for_each_safe(tmp, tmp2, &map->head) {
-				ext = list_entry (tmp, ocfs_extent, list);
-				list_del(&ext->list);
-				kmem_cache_free(OcfsGlobalCtxt.extent_cache,
-						ext);
-				map->count--;
-			}
-			if (map->count!=0) {
-				LOG_ERROR_ARGS("count too high by %d!",
-					       map->count);
-				map->count = 0;
-			}
-			map->initialized = 0;
+		struct list_head *tmp, *tmp2;
+		ocfs_extent *ext;
+		list_for_each_safe(tmp, tmp2, &map->head) {
+			ext = list_entry (tmp, ocfs_extent, list);
+			list_del(&ext->list);
+			kmem_cache_free(OcfsGlobalCtxt.extent_cache,
+					ext);
+			map->count--;
 		}
-		spin_unlock(&(map->lock));
+		if (map->count!=0) {
+			LOG_ERROR_ARGS("count too high by %d!",
+				       map->count);
+			map->count = 0;
+		}
+		map->initialized = 0;
 	}
+	spin_unlock(&EM_IP(map)->ip_lock);
 
 	LOG_EXIT ();
 	return;
@@ -280,7 +287,7 @@
 		LOG_ERROR_STATUS (-EFAIL);
 		goto bail;
 	}
-	spin_lock(&(map->lock));
+	spin_lock(&EM_IP(map)->ip_lock);
 
 	if (ocfs_coalesce_extent_map_entry (map, virtual, physical, sectors)) {
 		LOG_TRACE_STR ("Successfully coalesced map entry");
@@ -313,7 +320,7 @@
 	ret = 1;
 
 release_spinlock:
-	spin_unlock(&(map->lock));
+	spin_unlock(&EM_IP(map)->ip_lock);
 
 bail:
 	LOG_EXIT_INT (ret);
@@ -340,7 +347,7 @@
 		goto bail;
 	}
 
-	spin_lock(&(map->lock));
+	spin_lock(&EM_IP(map)->ip_lock);
 	list_for_each_safe(iter, tmpiter, &map->head) {
 		tmp = list_entry (iter, ocfs_extent, list);
 		lo = tmp->virtual;
@@ -354,7 +361,7 @@
 		}
 		(*index)++;
 	}
-	spin_unlock(&(map->lock));
+	spin_unlock(&EM_IP(map)->ip_lock);
 
 bail:
 	LOG_EXIT_INT (ret);
@@ -380,7 +387,7 @@
 		goto bail;
 	}
 
-	spin_lock(&(map->lock));
+	spin_lock(&EM_IP(map)->ip_lock);
 	if (index >= map->count)
 		goto release_spinlock;
 
@@ -399,13 +406,24 @@
 
 
 release_spinlock:
-	spin_unlock(&(map->lock));
+	spin_unlock(&EM_IP(map)->ip_lock);
 bail:
 
 	LOG_EXIT_INT (ret);
 	return ret;
 }				/* ocfs_extent_map_next_entry */
 
+unsigned int ocfs_extent_map_get_count(ocfs_extent_map *map)
+{
+	unsigned int count;
+
+	spin_lock(&EM_IP(map)->ip_lock);
+	count = map->count;
+	spin_unlock(&EM_IP(map)->ip_lock);
+
+	return count;
+}
+
 /*
  * ocfs_get_next_extent_map_entry()
  *

Modified: trunk/src/extmap.h
===================================================================
--- trunk/src/extmap.h	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/extmap.h	2004-10-07 16:04:20 UTC (rev 1550)
@@ -36,6 +36,7 @@
 			      __s64 Vbo, __s64 Lbo, __u64 ByteCount);
 void ocfs_extent_map_destroy(ocfs_extent_map *map);
 void ocfs_extent_map_init(ocfs_extent_map *map);
+unsigned int ocfs_extent_map_get_count(ocfs_extent_map *map);
 int ocfs_get_next_extent_map_entry(ocfs_super *osb,
 				   ocfs_extent_map *Map, __u32 RunIndex,
 				   __s64 *Vbo, __s64 *Lbo,

Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/file.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -37,6 +37,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dir.h"
@@ -939,8 +940,8 @@
 	if (new_i_size == fe->i_size)
 		goto bail;
 
-	if (fe->i_clusters 
-	    == ocfs_clusters_for_bytes(osb->sb, new_i_size)) {
+	if (fe->i_clusters == ocfs2_clusters_for_bytes(osb->sb,
+						       new_i_size)) {
 		LOG_TRACE_ARGS("fe->i_clusters = %u, so we do a simple "
 			       "truncate\n", fe->i_clusters);
 		/* No allocation change is required, so lets fast path
@@ -1130,7 +1131,7 @@
 		goto leave;
 	}
 
-	block = ocfs_clusters_to_blocks(osb->sb, bit_off);
+	block = ocfs2_clusters_to_blocks(osb->sb, bit_off);
 	LOG_TRACE_ARGS("Allocating %u clusters at block %u for inode %llu\n",
 		       num_bits, bit_off, OCFS_I(inode)->ip_blkno);
 	status = ocfs_allocate_extent(osb, fe_bh, handle, block, num_bits, 
@@ -1235,7 +1236,7 @@
 		goto leave;
 	}
 
-	clusters_to_add = ocfs_clusters_for_bytes(osb->sb, new_i_size) 
+	clusters_to_add = ocfs2_clusters_for_bytes(osb->sb, new_i_size) 
 		- fe->i_clusters;
 
 	LOG_TRACE_ARGS("extend inode %llu, new_i_size = %llu, i_size = %llu, "
@@ -1342,7 +1343,8 @@
 			}
 
 			clusters_to_add = 
-				ocfs_clusters_for_bytes(osb->sb, new_i_size)
+				ocfs2_clusters_for_bytes(osb->sb,
+							 new_i_size)
 				- fe->i_clusters + overalloc_bits;
 			LOG_TRACE_ARGS("restarting transaction.\n");
 			/* TODO: This can be more intelligent. */

Modified: trunk/src/heartbeat.c
===================================================================
--- trunk/src/heartbeat.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/heartbeat.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "heartbeat.h"

Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/inode.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -39,6 +39,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dlm.h"
@@ -312,6 +313,7 @@
 	init_MUTEX(&(i->ip_sem));
 	init_rwsem(&(i->ip_extend_sem));
 	i->ip_open_cnt = 0;
+	spin_lock_init(&i->ip_lock);
 	ocfs_extent_map_init (&i->ip_ext_map);
 	INIT_LIST_HEAD(&i->ip_recovery_list);
 	INIT_LIST_HEAD(&i->ip_handle_list);

Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/journal.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dlm.h"
@@ -1446,9 +1447,7 @@
 	}
 
 	map = &(OCFS_I(inode)->ip_ext_map);
-	spin_lock(&(map->lock));
-	numruns = map->count;
-	spin_unlock(&(map->lock));
+	numruns = ocfs_extent_map_get_count(map);
 
 	LOG_TRACE_ARGS("%d runs in this file\n", numruns);
 

Modified: trunk/src/localalloc.c
===================================================================
--- trunk/src/localalloc.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/localalloc.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -37,6 +37,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "bitmap.h"
@@ -415,8 +416,8 @@
 	}
 
 #warning "isn't it about time we turned this check off?"
-	if (bits_wanted > ocfs_clusters_for_bytes(osb->sb, 
-						 OCFS_LOCAL_ALLOC_MAX_ALLOC)) {
+	if (bits_wanted > ocfs2_clusters_for_bytes(osb->sb, 
+						   OCFS_LOCAL_ALLOC_MAX_ALLOC)) {
 		LOG_TRACE_STR("Asking for more than max local alloction!\n");
 		status = -ENOSPC;
 		goto bail;

Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/namei.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -48,6 +48,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dcache.h"

Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/nm.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -37,6 +37,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dlm.h"

Modified: trunk/src/ocfs.h
===================================================================
--- trunk/src/ocfs.h	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/ocfs.h	2004-10-07 16:04:20 UTC (rev 1550)
@@ -343,7 +343,6 @@
 	__u32 count;
 	int initialized;
 	struct list_head head;
-	__u32 next_idx;
 	struct list_head *next_ptr;
 }
 ocfs_extent_map;
@@ -388,11 +387,13 @@
 	/* These fields are protected by ip_sem */
 	struct semaphore  ip_sem;
 	__u32             ip_open_cnt;
-	ocfs_extent_map   ip_ext_map;
 	__s64             ip_alloc_size;
 	__s64		  ip_mmu_private;
 	__u32             ip_open_flags;
 
+	spinlock_t	  ip_lock;
+	ocfs_extent_map   ip_ext_map;
+
 	atomic_t          ip_needs_verification;
 
 	/* This protects io on the metadata buffers related to this
@@ -526,7 +527,6 @@
 	atomic_t inode_extends;
 } ocfs_alloc_stats;
 
-
 struct _ocfs_journal;
 
 /*
@@ -876,7 +876,6 @@
 #define NAMEI_RA_SIZE        (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
 #define NAMEI_RA_INDEX(c,b)  (((c) * NAMEI_RA_BLOCKS) + (b))
 
-
 #define __ocfs_wait(wq, condition, timeo, ret)			\
 do {								\
 	ocfs_timeout __to;					\
@@ -1007,29 +1006,6 @@
 	}
 }
 
-static inline unsigned int ocfs_clusters_for_bytes(struct super_block *sb,
-						   __u64 bytes)
-{
-	int cl_bits = OCFS_SB(sb)->s_clustersize_bits;
-	unsigned int clusters;
-
-	bytes += OCFS_SB(sb)->s_clustersize - 1;
-	/* OCFS2 just cannot have enough clusters to overflow this */
-	clusters = (unsigned int)(bytes >> cl_bits);
-
-	return clusters;
-}
-
-static inline u64 ocfs_align_bytes_to_clusters(struct super_block *sb,
-						 u64 bytes)
-{
-	int cl_bits = OCFS_SB(sb)->s_clustersize_bits;
-	unsigned int clusters;
-
-	clusters = ocfs_clusters_for_bytes(sb, bytes);
-	return (u64)clusters << cl_bits;
-}
-
 static inline int ocfs_inc_icount(struct inode *inode)
 {
 	if (atomic_read(&inode->i_count) >= 1 &&
@@ -1058,24 +1034,6 @@
 	return 0;
 }
 
-static inline u64 ocfs_clusters_to_blocks(struct super_block *sb,
-		    			  u32 clusters)
-{
-	int c_to_b_bits = OCFS_SB(sb)->s_clustersize_bits -
-		sb->s_blocksize_bits;
-
-	return (u64)clusters << c_to_b_bits;
-}
-
-static inline u32 ocfs_blocks_to_clusters(struct super_block *sb,
-					  u64 blocks)
-{
-	int b_to_c_bits = OCFS_SB(sb)->s_clustersize_bits -
-		sb->s_blocksize_bits;
-
-	return (u32)(blocks >> b_to_c_bits);
-}
-
 static inline int ocfs_blocks_for_bits(struct super_block *sb,
  				       unsigned int num_bits)
 {

Modified: trunk/src/ocfs_compat.h
===================================================================
--- trunk/src/ocfs_compat.h	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/ocfs_compat.h	2004-10-07 16:04:20 UTC (rev 1550)
@@ -184,5 +184,11 @@
 		(((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
 #endif
 
+#ifndef container_of
+#define container_of(ptr, type, member) ({			\
+        const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
+        (type *)( (char *)__mptr - offsetof(type,member) );})
+#endif
+
 #endif  /* OCFS_COMPAT_H */
 

Modified: trunk/src/ocfs_journal.h
===================================================================
--- trunk/src/ocfs_journal.h	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/ocfs_journal.h	2004-10-07 16:04:20 UTC (rev 1550)
@@ -455,7 +455,7 @@
 	int blocks = OCFS_MKNOD_CREDITS + 1;
 	
 	blocks += ocfs_calc_extend_credits(sb, 1);
-	blocks += ocfs_clusters_to_blocks(sb, 1);
+	blocks += ocfs2_clusters_to_blocks(sb, 1);
 
 	return(blocks);
 }

Modified: trunk/src/proc.c
===================================================================
--- trunk/src/proc.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/proc.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -38,6 +38,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "proc.h"
 #include "vote.h"

Modified: trunk/src/suballoc.c
===================================================================
--- trunk/src/suballoc.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/suballoc.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -36,6 +36,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dlm.h"
@@ -159,7 +160,7 @@
 
 	LOG_ENTRY();
 
-	blocks = ocfs_clusters_to_blocks(osb->sb, (u32) clusters) - (u64) 1;
+	blocks = ocfs2_clusters_to_blocks(osb->sb, (u32) clusters) - 1ULL;
 	bhs = kmalloc(blocks * sizeof(struct buffer_head *), GFP_KERNEL);
 	if (!bhs) {
 		LOG_ERROR_STATUS(-ENOMEM);
@@ -167,7 +168,7 @@
 	}
 	memset(bhs, 0, blocks * sizeof(struct buffer_head *));
 
-	blkno = ocfs_clusters_to_blocks(osb->sb, bit_off) + (u64) 1;
+	blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off) + 1ULL;
 	for(i = 0; i < blocks; i++) {
 		bhs[i] = sb_getblk(osb->sb, ((u64) i + blkno));
 		if (!bhs[i]) {
@@ -200,7 +201,7 @@
 				       u16 clusters)
 {
 	unsigned int blocks = 
-		ocfs_clusters_to_blocks(osb->sb, (u32) clusters) - (u64) 1;
+		ocfs2_clusters_to_blocks(osb->sb, (u32) clusters) - 1ULL;
 
 	do {
 		blocks--;
@@ -282,7 +283,7 @@
 	alloc_rec = ocfs2_find_smallest_chain(cl);
 
 	/* setup the group */
-	bg_blkno = ocfs_clusters_to_blocks(osb->sb, bit_off);
+	bg_blkno = ocfs2_clusters_to_blocks(osb->sb, bit_off);
 	LOG_TRACE_ARGS("new descriptor, record %u, at block %llu\n", 
 		       alloc_rec, bg_blkno);
 

Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/super.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -47,6 +47,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 /* this should be the only file to include a version 1 header */
 #include "ocfs1_fs_compat.h"
@@ -770,7 +771,7 @@
 	    freebits -= bm_lock->id1.bitmap1.i_used;
 
 	/* take out the space reserved for system files */
-	reserved_bits = ocfs_clusters_for_bytes(sb, 8 * ONE_MEGA_BYTE);
+	reserved_bits = ocfs2_clusters_for_bytes(sb, 8 * ONE_MEGA_BYTE);
 	freebits -= reserved_bits;
 
 	buf->f_type = OCFS_MAGIC;

Modified: trunk/src/sysfile.c
===================================================================
--- trunk/src/sysfile.c	2004-10-07 01:38:01 UTC (rev 1549)
+++ trunk/src/sysfile.c	2004-10-07 16:04:20 UTC (rev 1550)
@@ -35,6 +35,7 @@
 
 #include "ocfs_log.h"
 #include "ocfs.h"
+#include "ocfs2.h"
 
 #include "alloc.h"
 #include "dir.h"



More information about the Ocfs2-commits mailing list