 9f8868ffb3
			
		
	
	
	9f8868ffb3
	
	
	
		
			
			Currently the xfs module init/exit code is a mess. It's farmed out over a lot of function with very little error checking. This patch makes sure we propagate all initialization failures properly and clean up after them. Various runtime initializations are replaced with compile-time initializations where possible to make this easier. The exit path is similarly consolidated. There's now split out function to create/destroy the kmem zones and alloc/free the trace buffers. I've also changed the ktrace allocations to KM_MAYFAIL and handled errors resulting from that. And yes, we really should replace the XFS_*_TRACE ifdefs with a single XFS_TRACE.. SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:31354a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			1.2 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			1.2 KiB
			
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
 | |
|  * All Rights Reserved.
 | |
|  *
 | |
|  * This program is free software; you can redistribute it and/or
 | |
|  * modify it under the terms of the GNU General Public License as
 | |
|  * published by the Free Software Foundation.
 | |
|  *
 | |
|  * This program is distributed in the hope that it would be useful,
 | |
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | |
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | |
|  * GNU General Public License for more details.
 | |
|  *
 | |
|  * You should have received a copy of the GNU General Public License
 | |
|  * along with this program; if not, write the Free Software Foundation,
 | |
|  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 | |
|  */
 | |
| #ifndef __XFS_SUPPORT_UUID_H__
 | |
| #define __XFS_SUPPORT_UUID_H__
 | |
| 
 | |
| typedef struct {
 | |
| 	unsigned char	__u_bits[16];
 | |
| } uuid_t;
 | |
| 
 | |
| extern void uuid_create_nil(uuid_t *uuid);
 | |
| extern int uuid_is_nil(uuid_t *uuid);
 | |
| extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2);
 | |
| extern void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]);
 | |
| extern __uint64_t uuid_hash64(uuid_t *uuid);
 | |
| extern int uuid_table_insert(uuid_t *uuid);
 | |
| extern void uuid_table_remove(uuid_t *uuid);
 | |
| 
 | |
| #endif	/* __XFS_SUPPORT_UUID_H__ */
 |