dead code in extmap.c
PATCH 1/1 dead code in extmap.c
extmap.c +0 -67
@@ -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.
PATCH 1/1 dead code in extmap.c
Ok, all your patches today have been committed. Thanks!
--Mark
Quoted 94 lines · Christoph Hellwig
Index:
src/extmap.c
===================================================================extmap.c +0
-67@@ -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.
Quoted 4 lines
_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]