X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Freiserfs_fs_sb.h;h=8592644c82156a627d7202c5d159287169974a4f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9fa2813c2e690ed84bf4fc9aa2d676ee0dfbda1d;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 9fa2813c2..8592644c8 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -6,6 +6,7 @@ #ifdef __KERNEL__ #include +#include #endif typedef enum { @@ -205,11 +206,11 @@ struct reiserfs_journal { int j_cnode_used ; /* number of cnodes on the used list */ int j_cnode_free ; /* number of cnodes on the free list */ - unsigned int s_journal_trans_max ; /* max number of blocks in a transaction. */ - unsigned int s_journal_max_batch ; /* max number of blocks to batch into a trans */ - unsigned int s_journal_max_commit_age ; /* in seconds, how old can an async commit be */ - unsigned int s_journal_default_max_commit_age ; /* the default for the max commit age */ - unsigned int s_journal_max_trans_age ; /* in seconds, how old can a transaction be */ + unsigned int j_trans_max ; /* max number of blocks in a transaction. */ + unsigned int j_max_batch ; /* max number of blocks to batch into a trans */ + unsigned int j_max_commit_age ; /* in seconds, how old can an async commit be */ + unsigned int j_max_trans_age ; /* in seconds, how old can a transaction be */ + unsigned int j_default_max_commit_age ; /* the default for the max commit age */ struct reiserfs_journal_cnode *j_cnode_free_list ; struct reiserfs_journal_cnode *j_cnode_free_orig ; /* orig pointer returned from vmalloc */ @@ -241,17 +242,26 @@ struct reiserfs_journal { struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE] ; /* hash table for all the real buffer heads in all the transactions */ struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */ + int j_persistent_trans; unsigned long j_max_trans_size ; unsigned long j_max_batch_size ; + int j_errno; + /* when flushing ordered buffers, throttle new ordered writers */ struct work_struct j_work; atomic_t j_async_throttle; }; -#define JOURNAL_DESC_MAGIC "ReIsErLB" /* ick. magic string to find desc blocks in the journal */ +enum journal_state_bits { + J_WRITERS_BLOCKED = 1, /* set when new writers not allowed */ + J_WRITERS_QUEUED, /* set when log is full due to too many writers */ + J_ABORTED, /* set when log is aborted */ +}; +#define JOURNAL_DESC_MAGIC "ReIsErLB" /* ick. magic string to find desc blocks in the journal */ + typedef __u32 (*hashf_t) (const signed char *, int); struct reiserfs_bitmap_info @@ -395,6 +405,15 @@ struct reiserfs_sb_info struct proc_dir_entry *procdir; int reserved_blocks; /* amount of blocks reserved for further allocations */ spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ + struct dentry *priv_root; /* root of /.reiserfs_priv */ + struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ + struct rw_semaphore xattr_dir_sem; + + int j_errno; +#ifdef CONFIG_QUOTA + char *s_qf_names[MAXQUOTAS]; + int s_jquota_fmt; +#endif }; /* Definitions of reiserfs on-disk properties: */ @@ -437,11 +456,23 @@ enum reiserfs_mount_options { REISERFS_NO_UNHASHED_RELOCATION, REISERFS_HASHED_RELOCATION, REISERFS_ATTRS, + REISERFS_XATTRS, + REISERFS_XATTRS_USER, + REISERFS_POSIXACL, + REISERFS_BARRIER_NONE, + REISERFS_BARRIER_FLUSH, + REISERFS_TAGXID, + + /* Actions on error */ + REISERFS_ERROR_PANIC, + REISERFS_ERROR_RO, + REISERFS_ERROR_CONTINUE, REISERFS_TEST1, REISERFS_TEST2, REISERFS_TEST3, REISERFS_TEST4, + REISERFS_UNSUPPORTED_OPT, }; #define reiserfs_r5_hash(s) (REISERFS_SB(s)->s_mount_opt & (1 << FORCE_R5_HASH)) @@ -462,6 +493,15 @@ enum reiserfs_mount_options { #define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG)) #define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED)) #define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK)) +#define reiserfs_xattrs(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS)) +#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER)) +#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL)) +#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s)) +#define reiserfs_barrier_none(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_NONE)) +#define reiserfs_barrier_flush(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_BARRIER_FLUSH)) + +#define reiserfs_error_panic(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_PANIC)) +#define reiserfs_error_ro(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_ERROR_RO)) void reiserfs_file_buffer (struct buffer_head * bh, int list); extern struct file_system_type reiserfs_fs_type; @@ -479,12 +519,6 @@ int reiserfs_resize(struct super_block *, unsigned long) ; #define SB_DISK_JOURNAL_HEAD(s) (SB_JOURNAL(s)->j_header_bh->) -#define SB_JOURNAL_TRANS_MAX(s) (SB_JOURNAL(s)->s_journal_trans_max) -#define SB_JOURNAL_MAX_BATCH(s) (SB_JOURNAL(s)->s_journal_max_batch) -#define SB_JOURNAL_MAX_COMMIT_AGE(s) (SB_JOURNAL(s)->s_journal_max_commit_age) -#define SB_JOURNAL_DEFAULT_MAX_COMMIT_AGE(s) (SB_JOURNAL(s)->s_journal_default_max_commit_age) -#define SB_JOURNAL_MAX_TRANS_AGE(s) (SB_JOURNAL(s)->s_journal_max_trans_age) - /* A safe version of the "bdevname", which returns the "s_id" field of * a superblock or else "Null superblock" if the super block is NULL. */ @@ -493,4 +527,10 @@ static inline char *reiserfs_bdevname(struct super_block *s) return (s == NULL) ? "Null superblock" : s -> s_id; } +#define reiserfs_is_journal_aborted(journal) (unlikely (__reiserfs_is_journal_aborted (journal))) +static inline int __reiserfs_is_journal_aborted (struct reiserfs_journal *journal) +{ + return test_bit (J_ABORTED, &journal->j_state); +} + #endif /* _LINUX_REISER_FS_SB */