[XFS] kill the vfs_flags member in struct bhv_vfs
[deliverable/linux.git] / fs / xfs / linux-2.6 / xfs_vfs.h
CommitLineData
1da177e4 1/*
b83bd138 2 * Copyright (c) 2000-2006 Silicon Graphics, Inc.
7b718769 3 * All Rights Reserved.
1da177e4 4 *
7b718769
NS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
1da177e4
LT
7 * published by the Free Software Foundation.
8 *
7b718769
NS
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
1da177e4 13 *
7b718769
NS
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1da177e4
LT
17 */
18#ifndef __XFS_VFS_H__
19#define __XFS_VFS_H__
20
21#include <linux/vfs.h>
22#include "xfs_fs.h"
23
b83bd138 24struct bhv_vfs;
0a74cd19 25struct inode;
8285fb58 26
1da177e4 27struct fid;
1da177e4 28struct cred;
1da177e4
LT
29struct seq_file;
30struct super_block;
739bfb2a 31struct xfs_inode;
745f6919 32struct xfs_mount;
1da177e4
LT
33struct xfs_mount_args;
34
8285fb58 35typedef struct kstatfs bhv_statvfs_t;
1da177e4 36
b83bd138 37typedef struct bhv_vfs_sync_work {
1da177e4 38 struct list_head w_list;
b83bd138 39 struct bhv_vfs *w_vfs;
1da177e4 40 void *w_data; /* syncer routine argument */
b83bd138
NS
41 void (*w_syncer)(struct bhv_vfs *, void *);
42} bhv_vfs_sync_work_t;
1da177e4 43
b83bd138 44typedef struct bhv_vfs {
745f6919 45 struct xfs_mount *vfs_mount;
1da177e4
LT
46 struct super_block *vfs_super; /* generic superblock pointer */
47 struct task_struct *vfs_sync_task; /* generalised sync thread */
b83bd138 48 bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */
1da177e4
LT
49 struct list_head vfs_sync_list; /* sync thread work item list */
50 spinlock_t vfs_sync_lock; /* work item list lock */
b83bd138 51 int vfs_sync_seq; /* sync thread generation no. */
1da177e4 52 wait_queue_head_t vfs_wait_single_sync_task;
b83bd138 53} bhv_vfs_t;
1da177e4 54
1da177e4
LT
55#define SYNC_ATTR 0x0001 /* sync attributes */
56#define SYNC_CLOSE 0x0002 /* close file system down */
57#define SYNC_DELWRI 0x0004 /* look at delayed writes */
58#define SYNC_WAIT 0x0008 /* wait for i/o to complete */
59#define SYNC_BDFLUSH 0x0010 /* BDFLUSH is calling -- don't block */
60#define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */
61#define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */
62#define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */
3c0dc77b 63#define SYNC_IOWAIT 0x0100 /* wait for all I/O to complete */
92821e2b 64#define SYNC_SUPER 0x0200 /* flush superblock to disk */
1da177e4 65
516b2e7c
DC
66/*
67 * When remounting a filesystem read-only or freezing the filesystem,
68 * we have two phases to execute. This first phase is syncing the data
69 * before we quiesce the fielsystem, and the second is flushing all the
70 * inodes out after we've waited for all the transactions created by
71 * the first phase to complete. The second phase uses SYNC_INODE_QUIESCE
72 * to ensure that the inodes are written to their location on disk
73 * rather than just existing in transactions in the log. This means
74 * after a quiesce there is no log replay required to write the inodes
75 * to disk (this is the main difference between a sync and a quiesce).
76 */
77#define SYNC_DATA_QUIESCE (SYNC_DELWRI|SYNC_FSDATA|SYNC_WAIT|SYNC_IOWAIT)
78#define SYNC_INODE_QUIESCE (SYNC_REMOUNT|SYNC_ATTR|SYNC_WAIT)
79
7d04a335
NS
80#define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */
81#define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */
82#define SHUTDOWN_FORCE_UMOUNT 0x0004 /* shutdown from a forced unmount */
83#define SHUTDOWN_CORRUPT_INCORE 0x0008 /* corrupt in-memory data structures */
84#define SHUTDOWN_REMOTE_REQ 0x0010 /* shutdown came from remote cell */
85#define SHUTDOWN_DEVICE_REQ 0x0020 /* failed all paths to the device */
86
34327e13
NS
87#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen)
88#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l))
89
b83bd138
NS
90extern bhv_vfs_t *vfs_allocate(struct super_block *);
91extern bhv_vfs_t *vfs_from_sb(struct super_block *);
92extern void vfs_deallocate(bhv_vfs_t *);
1da177e4 93
1da177e4 94#endif /* __XFS_VFS_H__ */
This page took 0.602997 seconds and 5 git commands to generate.