X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Freiserfs_fs_sb.h;h=8592644c82156a627d7202c5d159287169974a4f;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=8cc1494f88772a3a41df8a027e8ad35374febc69;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 8cc1494f8..8592644c8 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -206,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 */ @@ -242,14 +242,24 @@ 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; }; +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); @@ -399,6 +409,11 @@ struct reiserfs_sb_info 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: */ @@ -444,12 +459,20 @@ enum reiserfs_mount_options { 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)) @@ -474,6 +497,11 @@ enum reiserfs_mount_options { #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; @@ -491,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. */ @@ -505,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 */