[Ocfs2-commits] mfasheh commits r1402 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Aug 30 13:51:57 CDT 2004
Author: mfasheh
Date: 2004-08-30 13:51:55 -0500 (Mon, 30 Aug 2004)
New Revision: 1402
Modified:
trunk/src/extmap.c
Log:
* commit a patch by Christoph Hellwig <hch at lst.de>:
Subject: [Ocfs2-devel] [PATCH] dead code in extmap.c
Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c 2004-08-30 18:04:55 UTC (rev 1401)
+++ trunk/src/extmap.c 2004-08-30 18:51:55 UTC (rev 1402)
@@ -43,7 +43,6 @@
/* works ok in userland debugocfs stuff too */
static int ocfs_extent_map_add (ocfs_extent_map * map, __s64 virtual, __s64 physical, __s64 sectors);
-static void ocfs_extent_map_remove (ocfs_extent_map * map, __s64 virtual, __s64 sectors);
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);
@@ -321,47 +320,6 @@
return ret;
} /* ocfs_extent_map_add */
-/* ocfs_extent_map_remove()
- *
- */
-static void ocfs_extent_map_remove (ocfs_extent_map * map, __s64 virtual, __s64 sectors)
-{
- struct list_head *iter, *tmpiter;
- ocfs_extent *tmp;
- int voverlap;
- __s64 lo, sec;
-
- LOG_ENTRY ();
-
- OCFS_ASSERT (map != NULL);
-
- if (!map->initialized)
- goto bail;
-
- spin_lock(&(map->lock));
- list_for_each_safe(iter, tmpiter, &map->head) {
- tmp = list_entry (iter, ocfs_extent, list);
- lo = tmp->virtual;
- sec = tmp->sectors;
- voverlap = get_overlap_type (virtual, virtual+sectors, lo, lo+sec);
- /* for now, don't allow splitting of entries */
- if (voverlap!=FULLY_CONTAINED)
- continue;
- if (virtual == lo && sectors == sec) {
- list_del(&tmp->list);
- kmem_cache_free(OcfsGlobalCtxt.extent_cache,
- tmp);
- map->count--;
- break;
- }
- }
- spin_unlock(&(map->lock));
-bail:
-
- LOG_EXIT ();
- return;
-} /* ocfs_extent_map_remove */
-
/*
* ocfs_extent_map_lookup()
*
@@ -448,32 +406,7 @@
return ret;
} /* ocfs_extent_map_next_entry */
-
/*
- * ocfs_remove_extent_map_entry()
- *
- * Remove an entry from the extent map
- */
-static void ocfs_remove_extent_map_entry (ocfs_super * osb, ocfs_extent_map * Map, __s64 Vbo, __u32 ByteCount)
-{
- LOG_ENTRY ();
-
- if ((ByteCount) && (ByteCount != 0xFFFFFFFF)) {
- ByteCount--;
- ByteCount >>= osb->sb->s_blocksize_bits;
- ByteCount++;
- }
-
- Vbo >>= osb->sb->s_blocksize_bits;
-
- ocfs_extent_map_remove (Map, Vbo, (__s64) ByteCount);
-
- LOG_EXIT ();
- return;
-} /* ocfs_remove_extent_map_entry */
-
-
-/*
* ocfs_get_next_extent_map_entry()
*
* This routine looks up the existing mapping of VBO to LBO for a file.
More information about the Ocfs2-commits
mailing list