Stefan Hajnoczi  
		
	
	
		9dd6f7c28e 
		
	 
	
	
	util/iov: add iov_discard_undo()  
		
			... 
			The iov_discard_front/back() operations are useful for parsing iovecs
but they modify the array elements. If the original array is needed
after parsing finishes there is currently no way to restore it.
Although g_memdup() can be used before performing destructive
iov_discard_front/back() operations, this is inefficient.
Introduce iov_discard_undo() to restore the array to the state prior to
an iov_discard_front/back() operation.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20200917094455.822379-2-stefanha@redhat.com> 
		
	 
 
		2020-09-23 13:41:58 +01:00 
	 
	
	
		  ..
	 
	
	
		
			
			
			
			
			
			2019-08-16 13:31:51 +02:00 
		 
	
		
			
			
			
			
			
			2020-03-27 13:42:57 +00:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2019-07-15 15:39:02 +02:00 
		 
	
		
			
			
			
			
			
			2020-02-25 20:20:23 +00:00 
		 
	
		
			
			
			
			
			
			2020-07-13 14:36:10 +01:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
			
			
			
			
			
			2019-10-28 11:22:31 +01:00 
		 
	
		
			
			
			
			
			
			2020-02-28 10:58:41 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2020-06-23 15:46:05 +01:00 
		 
	
		
			
			
			
			
			
			2019-10-25 15:18:38 +02:00 
		 
	
		
			
			
			
			
			
			2020-03-16 23:02:21 +01:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
			
			
			
			
			
			2019-06-11 20:22:09 +02:00 
		 
	
		
			
			
			
			
			
			2019-12-16 10:46:35 +00:00 
		 
	
		
			
			
			
			
			
			2020-01-06 18:41:32 +04:00 
		 
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2020-07-10 18:02:15 -04:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
			
			
			
			
			
			2019-08-16 13:31:52 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2019-05-22 12:38:54 -04:00 
		 
	
		
			
			
			
			
			
			2020-03-18 14:03:46 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2020-07-06 18:13:13 +02:00 
		 
	
		
			
			
			
			
			
			2020-01-07 16:50:09 +04:00 
		 
	
		
			
			
			
			
			
			2020-08-28 10:02:47 +01:00 
		 
	
		
			
			
			
			
			
			2020-09-23 13:41:58 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
			
			
			
			
			
			2020-03-11 12:42:30 +01:00 
		 
	
		
			
			
			
			
			
			2020-05-04 16:07:43 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2020-02-19 11:17:40 +01:00 
		 
	
		
			
			
			
			
			
			2020-09-01 12:07:52 +02:00 
		 
	
		
			
			
			
			
			
			2019-09-11 08:46:17 +02:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
			
			
			
			
			
			2020-07-07 14:54:29 +02:00 
		 
	
		
			
			
			
			
			
			2019-09-24 12:18:47 +01:00 
		 
	
		
			
			
			
			
			
			2020-02-21 09:15:03 +11:00 
		 
	
		
			
			
			
			
			
			2019-01-11 15:46:55 +01:00 
		 
	
		
			
			
			
			
			
			2020-07-10 15:01:06 +02:00 
		 
	
		
			
			
			
			
			
			2020-09-17 13:38:08 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2019-10-28 15:12:38 +00:00 
		 
	
		
			
			
			
			
			
			2020-05-15 15:25:16 +01:00 
		 
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2020-03-11 12:42:30 +01:00 
		 
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
			
			
			
			
			
			2020-06-08 16:59:25 +01:00 
		 
	
		
			
			
			
			
			
			2019-04-18 22:18:59 +02:00 
		 
	
		
			
			
			
			
			
			2018-09-26 08:55:54 -07:00 
		 
	
		
			
			
			
			
			
			2019-04-18 22:18:59 +02:00 
		 
	
		
			
			
			
			
			
			2020-03-09 16:39:20 +00:00 
		 
	
		
			
			
			
			
			
			2019-08-16 13:31:52 +02:00 
		 
	
		
			
			
			
			
			
			2019-08-16 13:31:51 +02:00 
		 
	
		
			
			
			
			
			
			2020-02-22 08:26:47 +00:00 
		 
	
		
			
			
			
			
			
			2020-09-16 08:41:06 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2020-04-07 16:19:49 +01:00 
		 
	
		
			
			
			
			
			
			2020-02-12 16:23:01 +01:00 
		 
	
		
			
			
			
			
			
			2020-07-15 21:00:13 +08:00 
		 
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
			
			
			
			
			
			2019-05-13 08:58:55 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2019-08-16 13:31:51 +02:00 
		 
	
		
			
			
			
			
			
			2020-06-16 14:49:05 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2019-06-12 13:20:20 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2020-02-12 16:23:01 +01:00 
		 
	
		
			
			
			
			
			
			2020-06-16 14:49:05 +01:00 
		 
	
		
			
			
			
			
			
			2020-07-15 11:52:43 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2019-02-01 13:46:45 +01:00 
		 
	
		
	
		
			
			
			
			
			
			2020-05-14 15:03:08 +01:00 
		 
	
		
			
			
			
			
			
			2018-12-20 10:29:08 +01:00 
		 
	
		
			
			
			
			
			
			2018-10-02 19:09:12 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2018-12-17 06:04:44 +03:00