tmpfs.h (171070) | tmpfs.h (171087) |
---|---|
1/* $NetBSD: tmpfs.h,v 1.18 2006/03/31 20:27:49 riz Exp $ */ 2 3/* 4 * Copyright (c) 2005 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Julio M. Merino Vidal, developed as part of Google's Summer of Code --- 22 unchanged lines hidden (view full) --- 31 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 * | 1/* $NetBSD: tmpfs.h,v 1.18 2006/03/31 20:27:49 riz Exp $ */ 2 3/* 4 * Copyright (c) 2005 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Julio M. Merino Vidal, developed as part of Google's Summer of Code --- 22 unchanged lines hidden (view full) --- 31 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 * POSSIBILITY OF SUCH DAMAGE. 38 * |
39 * $FreeBSD: head/sys/fs/tmpfs/tmpfs.h 171070 2007-06-28 02:39:31Z delphij $ | 39 * $FreeBSD: head/sys/fs/tmpfs/tmpfs.h 171087 2007-06-29 05:23:15Z delphij $ |
40 */ 41 42#ifndef _FS_TMPFS_TMPFS_H_ 43#define _FS_TMPFS_TMPFS_H_ 44 45/* --------------------------------------------------------------------- 46 * KERNEL-SPECIFIC DEFINITIONS 47 * --------------------------------------------------------------------- */ --- 7 unchanged lines hidden (view full) --- 55 56/* --------------------------------------------------------------------- */ 57#include <sys/malloc.h> 58#include <sys/systm.h> 59#include <sys/vmmeter.h> 60#include <vm/swap_pager.h> 61 62MALLOC_DECLARE(M_TMPFSMNT); | 40 */ 41 42#ifndef _FS_TMPFS_TMPFS_H_ 43#define _FS_TMPFS_TMPFS_H_ 44 45/* --------------------------------------------------------------------- 46 * KERNEL-SPECIFIC DEFINITIONS 47 * --------------------------------------------------------------------- */ --- 7 unchanged lines hidden (view full) --- 55 56/* --------------------------------------------------------------------- */ 57#include <sys/malloc.h> 58#include <sys/systm.h> 59#include <sys/vmmeter.h> 60#include <vm/swap_pager.h> 61 62MALLOC_DECLARE(M_TMPFSMNT); |
63MALLOC_DECLARE(M_TMPFSNAME); |
|
63 | 64 |
64#include <fs/tmpfs/tmpfs_uma.h> 65 | |
66/* --------------------------------------------------------------------- */ 67 68/* 69 * Internal representation of a tmpfs directory entry. 70 */ 71struct tmpfs_dirent { 72 TAILQ_ENTRY(tmpfs_dirent) td_entries; 73 --- 244 unchanged lines hidden (view full) --- 318 /* All node lock to protect the node list and tmp_pages_used */ 319 struct mtx allnode_lock; 320 321 /* Pools used to store file system meta data. These are not shared 322 * across several instances of tmpfs for the reasons described in 323 * tmpfs_pool.c. */ 324 uma_zone_t tm_dirent_pool; 325 uma_zone_t tm_node_pool; | 65/* --------------------------------------------------------------------- */ 66 67/* 68 * Internal representation of a tmpfs directory entry. 69 */ 70struct tmpfs_dirent { 71 TAILQ_ENTRY(tmpfs_dirent) td_entries; 72 --- 244 unchanged lines hidden (view full) --- 317 /* All node lock to protect the node list and tmp_pages_used */ 318 struct mtx allnode_lock; 319 320 /* Pools used to store file system meta data. These are not shared 321 * across several instances of tmpfs for the reasons described in 322 * tmpfs_pool.c. */ 323 uma_zone_t tm_dirent_pool; 324 uma_zone_t tm_node_pool; |
326 struct tmpfs_str_zone tm_str_pool; | |
327}; 328#define TMPFS_LOCK(tm) mtx_lock(&(tm)->allnode_lock) 329#define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->allnode_lock) 330 331/* --------------------------------------------------------------------- */ 332 333/* 334 * This structure maps a file identifier to a tmpfs node. Used by the --- 211 unchanged lines hidden --- | 325}; 326#define TMPFS_LOCK(tm) mtx_lock(&(tm)->allnode_lock) 327#define TMPFS_UNLOCK(tm) mtx_unlock(&(tm)->allnode_lock) 328 329/* --------------------------------------------------------------------- */ 330 331/* 332 * This structure maps a file identifier to a tmpfs node. Used by the --- 211 unchanged lines hidden --- |