mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	3561 arc_meta_limit should be exposed via kstats
3116 zpool reguid may log negative guids to internal SPA history
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Approved by: Garrett D'Amore <garrett@damore.org>
References:
  https://www.illumos.org/issues/3561
  https://www.illumos.org/issues/3116
  illumos/illumos-gate@20128a0826
Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Porting Notes:
1. The spa change was accidentally included in the libzfs_core merge.
2. "Add missing arcstats" (1834f2d8b7)
   already implemented these kstats a few years ago.
			
			
This commit is contained in:
		
							parent
							
								
									330847ff36
								
							
						
					
					
						commit
						23c0a1333c
					
				| @ -479,9 +479,9 @@ static arc_state_t	*arc_l2c_only; | |||||||
| #define	arc_no_grow	ARCSTAT(arcstat_no_grow) | #define	arc_no_grow	ARCSTAT(arcstat_no_grow) | ||||||
| #define	arc_tempreserve	ARCSTAT(arcstat_tempreserve) | #define	arc_tempreserve	ARCSTAT(arcstat_tempreserve) | ||||||
| #define	arc_loaned_bytes	ARCSTAT(arcstat_loaned_bytes) | #define	arc_loaned_bytes	ARCSTAT(arcstat_loaned_bytes) | ||||||
| #define	arc_meta_used	ARCSTAT(arcstat_meta_used) | #define	arc_meta_limit	ARCSTAT(arcstat_meta_limit) /* max size for metadata */ | ||||||
| #define	arc_meta_limit	ARCSTAT(arcstat_meta_limit) | #define	arc_meta_used	ARCSTAT(arcstat_meta_used) /* size of metadata */ | ||||||
| #define	arc_meta_max	ARCSTAT(arcstat_meta_max) | #define	arc_meta_max	ARCSTAT(arcstat_meta_max) /* max size of metadata */ | ||||||
| 
 | 
 | ||||||
| #define	L2ARC_IS_VALID_COMPRESS(_c_) \ | #define	L2ARC_IS_VALID_COMPRESS(_c_) \ | ||||||
| 	((_c_) == ZIO_COMPRESS_LZ4 || (_c_) == ZIO_COMPRESS_EMPTY) | 	((_c_) == ZIO_COMPRESS_LZ4 || (_c_) == ZIO_COMPRESS_EMPTY) | ||||||
| @ -1305,7 +1305,7 @@ arc_space_consume(uint64_t space, arc_space_type_t type) | |||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	atomic_add_64(&arc_meta_used, space); | 	ARCSTAT_INCR(arcstat_meta_used, space); | ||||||
| 	atomic_add_64(&arc_size, space); | 	atomic_add_64(&arc_size, space); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -1334,7 +1334,7 @@ arc_space_return(uint64_t space, arc_space_type_t type) | |||||||
| 	ASSERT(arc_meta_used >= space); | 	ASSERT(arc_meta_used >= space); | ||||||
| 	if (arc_meta_max < arc_meta_used) | 	if (arc_meta_max < arc_meta_used) | ||||||
| 		arc_meta_max = arc_meta_used; | 		arc_meta_max = arc_meta_used; | ||||||
| 	atomic_add_64(&arc_meta_used, -space); | 	ARCSTAT_INCR(arcstat_meta_used, -space); | ||||||
| 	ASSERT(arc_size >= space); | 	ASSERT(arc_size >= space); | ||||||
| 	atomic_add_64(&arc_size, -space); | 	atomic_add_64(&arc_size, -space); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 George Wilson
						George Wilson