All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] dead code in extmap.c
@ 2004-08-30  9:00 Christoph Hellwig
  2004-08-30 14:21 ` Mark Fasheh
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2004-08-30  9:00 UTC (permalink / raw)
  To: ocfs2-devel


Index: src/extmap.c
===================================================================
--- src/extmap.c	(revision 1398)
+++ src/extmap.c	(working copy)
@@ -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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Ocfs2-devel] [PATCH] dead code in extmap.c
  2004-08-30  9:00 [Ocfs2-devel] [PATCH] dead code in extmap.c Christoph Hellwig
@ 2004-08-30 14:21 ` Mark Fasheh
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Fasheh @ 2004-08-30 14:21 UTC (permalink / raw)
  To: ocfs2-devel

Ok, all your patches today have been committed. Thanks!
	--Mark

On Mon, Aug 30, 2004 at 04:00:01PM +0200, Christoph Hellwig wrote:
> 
> Index: src/extmap.c
> ===================================================================
> --- src/extmap.c	(revision 1398)
> +++ src/extmap.c	(working copy)
> @@ -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.
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh@oracle.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-30 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-30  9:00 [Ocfs2-devel] [PATCH] dead code in extmap.c Christoph Hellwig
2004-08-30 14:21 ` Mark Fasheh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.