/*
- * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+ * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
struct xfs_bmbt_irec;
struct xfs_bmap_free;
-#if defined(INTERRUPT_LATENCY_TESTING)
-#define SPLDECL(s)
-#define AIL_LOCK_T mutex_t
-#define AIL_LOCKINIT(x,y) mutex_init(x,MUTEX_DEFAULT, y)
-#define AIL_LOCK_DESTROY(x) mutex_destroy(x)
-#define AIL_LOCK(mp,s) mutex_lock(&(mp)->m_ail_lock, PZERO)
-#define AIL_UNLOCK(mp,s) mutex_unlock(&(mp)->m_ail_lock)
-#else /* !INTERRUPT_LATENCY_TESTING */
-#define SPLDECL(s) int s
+#define SPLDECL(s) unsigned long s
#define AIL_LOCK_T lock_t
#define AIL_LOCKINIT(x,y) spinlock_init(x,y)
#define AIL_LOCK_DESTROY(x) spinlock_destroy(x)
#define AIL_LOCK(mp,s) s=mutex_spinlock(&(mp)->m_ail_lock)
#define AIL_UNLOCK(mp,s) mutex_spinunlock(&(mp)->m_ail_lock, s)
-#endif /* !INTERRUPT_LATENCY_TESTING */
/* Prototypes and functions for I/O core modularization, a vector
int m_bsize; /* fs logical block size */
xfs_agnumber_t m_agfrotor; /* last ag where space found */
xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */
+ xfs_agnumber_t m_maxagi; /* highest inode alloc group */
int m_ihsize; /* size of next field */
struct xfs_ihash *m_ihash; /* fs private inode hash table*/
struct xfs_inode *m_inodes; /* active inode list */
buftarg_t m_logdev_targ; /* ptr to log device */
buftarg_t m_rtdev_targ; /* ptr to rt device */
buftarg_t *m_ddev_targp; /* saves taking the address */
+#define m_rtdev_targp(m)(&(m)->m_rtdev_targ)
#define m_dev m_ddev_targ.dev
#define m_logdev m_logdev_targ.dev
#define m_rtdev m_rtdev_targ.dev
uint m_bm_maxlevels[2]; /* XFS_BM_MAXLEVELS */
uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */
struct xfs_perag *m_perag; /* per-ag accounting info */
- mrlock_t m_peraglock; /* lock for m_perag (pointer) */
+ struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */
sema_t m_growlock; /* growfs mutex */
int m_fixedfsid[2]; /* unchanged for life of FS */
uint m_dmevmask; /* DMI events for this FS */
/* which bits matter in rpc
log item pin masks */
uint m_cxfstype; /* mounted shared, etc. */
- lock_t m_freeze_lock;
- uint m_frozen;
- sv_t m_wait_unfreeze;
- atomic_t m_active_trans;
+ lock_t m_freeze_lock; /* Lock for m_frozen */
+ uint m_frozen; /* FS frozen for shutdown or
+ * snapshot */
+ sv_t m_wait_unfreeze;/* waiting to unfreeze */
+ atomic_t m_active_trans; /* number trans frozen */
+ struct timer_list m_sbdirty_timer;/* superblock dirty timer
+ * for nfs refcache */
} xfs_mount_t;
/*
#define XFS_MOUNT_NORECOVERY 0x00000400 /* no recovery - dirty fs */
#define XFS_MOUNT_SHARED 0x00000800 /* shared mount */
#define XFS_MOUNT_DFLT_IOSIZE 0x00001000 /* set default i/o size */
-#define XFS_MOUNT_OSYNCISDSYNC 0x00002000 /* treat o_sync like o_dsync */
+#define XFS_MOUNT_OSYNCISOSYNC 0x00002000 /* o_sync is REALLY o_sync */
+ /* osyncisdsync is now default*/
#define XFS_MOUNT_NOUUID 0x00004000 /* ignore uuid during mount */
+#define XFS_MOUNT_32BITINODES 0x00008000 /* do not create inodes above
+ * 32 bits in size */
+#define XFS_MOUNT_IRIXSGID 0x00010000 /* Irix-style sgid inheritance */
+#define XFS_MOUNT_NOLOGFLUSH 0x00020000
/*
* Flags for m_cxfstype
#define XFS_WRITEIO_LOG_LARGE 12
/*
- * max and min values for UIO and mount-option defined I/O sizes
- * min value can't be less than a page. Lower limit for 4K machines
- * is 4K because that's what was tested.
+ * Max and min values for UIO and mount-option defined I/O sizes;
+ * min value can't be less than a page. Currently unused.
*/
#define XFS_MAX_IO_LOG 16 /* 64K */
-
-#if (_PAGESZ == 16384) || (_PAGESZ == 8192)
-#define XFS_MIN_IO_LOG 14 /* 16K */
-#elif _PAGESZ == 4096
-#define XFS_MIN_IO_LOG 12 /* 4K */
-#else
-#error "Unknown page size"
-#endif
-
+#define XFS_MIN_IO_LOG PAGE_SHIFT
/*
* Synchronous read and write sizes. This should be
void xfs_mod_sb(xfs_trans_t *, __int64_t);
xfs_mount_t *xfs_mount_init(void);
void xfs_mount_free(xfs_mount_t *mp, int remove_bhv);
-int xfs_mountfs(struct vfs *, xfs_mount_t *mp, dev_t, int);
+int xfs_mountfs(struct vfs *, xfs_mount_t *mp, kdev_t, int);
int xfs_mountargs(struct mounta *, struct xfs_args *);
int xfs_unmountfs(xfs_mount_t *, int, struct cred *);
int xfs_unmount_flush(xfs_mount_t *, int);
int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int, int);
int xfs_mod_incore_sb_batch(xfs_mount_t *, xfs_mod_sb_t *, uint, int);
-int xfs_readsb(xfs_mount_t *mp, dev_t);
+int xfs_readsb(xfs_mount_t *mp);
struct xfs_buf *xfs_getsb(xfs_mount_t *, int);
void xfs_freesb(xfs_mount_t *);
void _xfs_force_shutdown(struct xfs_mount *, int, char *, int);
int xfs_syncsub(xfs_mount_t *, int, int, int *);
+void xfs_initialize_perag(xfs_mount_t *, int);
void xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t, __int64_t);
+/*
+ * Flags for freeze operations.
+ */
#define XFS_FREEZE_WRITE 1
#define XFS_FREEZE_TRANS 2
void xfs_start_freeze(xfs_mount_t *, int);
void xfs_finish_freeze(xfs_mount_t *);
-void xfs_check_frozen(xfs_mount_t *, int);
+void xfs_check_frozen(xfs_mount_t *, bhv_desc_t *, int, int);
extern struct vfsops xfs_vfsops;