aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reiserfs_fs_sb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/reiserfs_fs_sb.h')
-rw-r--r--include/linux/reiserfs_fs_sb.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index bda6b562a1e..5621d87c447 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -14,7 +14,7 @@ typedef enum {
14} reiserfs_super_block_flags; 14} reiserfs_super_block_flags;
15 15
16/* struct reiserfs_super_block accessors/mutators 16/* struct reiserfs_super_block accessors/mutators
17 * since this is a disk structure, it will always be in 17 * since this is a disk structure, it will always be in
18 * little endian format. */ 18 * little endian format. */
19#define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count)) 19#define sb_block_count(sbp) (le32_to_cpu((sbp)->s_v1.s_block_count))
20#define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v)) 20#define set_sb_block_count(sbp,v) ((sbp)->s_v1.s_block_count = cpu_to_le32(v))
@@ -73,6 +73,9 @@ typedef enum {
73#define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version)) 73#define sb_version(sbp) (le16_to_cpu((sbp)->s_v1.s_version))
74#define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v)) 74#define set_sb_version(sbp,v) ((sbp)->s_v1.s_version = cpu_to_le16(v))
75 75
76#define sb_mnt_count(sbp) (le16_to_cpu((sbp)->s_mnt_count))
77#define set_sb_mnt_count(sbp, v) ((sbp)->s_mnt_count = cpu_to_le16(v))
78
76#define sb_reserved_for_journal(sbp) \ 79#define sb_reserved_for_journal(sbp) \
77 (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal)) 80 (le16_to_cpu((sbp)->s_v1.s_reserved_for_journal))
78#define set_sb_reserved_for_journal(sbp,v) \ 81#define set_sb_reserved_for_journal(sbp,v) \
@@ -80,16 +83,16 @@ typedef enum {
80 83
81/* LOGGING -- */ 84/* LOGGING -- */
82 85
83/* These all interelate for performance. 86/* These all interelate for performance.
84** 87**
85** If the journal block count is smaller than n transactions, you lose speed. 88** If the journal block count is smaller than n transactions, you lose speed.
86** I don't know what n is yet, I'm guessing 8-16. 89** I don't know what n is yet, I'm guessing 8-16.
87** 90**
88** typical transaction size depends on the application, how often fsync is 91** typical transaction size depends on the application, how often fsync is
89** called, and how many metadata blocks you dirty in a 30 second period. 92** called, and how many metadata blocks you dirty in a 30 second period.
90** The more small files (<16k) you use, the larger your transactions will 93** The more small files (<16k) you use, the larger your transactions will
91** be. 94** be.
92** 95**
93** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal 96** If your journal fills faster than dirty buffers get flushed to disk, it must flush them before allowing the journal
94** to wrap, which slows things down. If you need high speed meta data updates, the journal should be big enough 97** to wrap, which slows things down. If you need high speed meta data updates, the journal should be big enough
95** to prevent wrapping before dirty meta blocks get to disk. 98** to prevent wrapping before dirty meta blocks get to disk.
@@ -153,7 +156,7 @@ struct reiserfs_journal_list {
153 atomic_t j_commit_left; 156 atomic_t j_commit_left;
154 atomic_t j_older_commits_done; /* all commits older than this on disk */ 157 atomic_t j_older_commits_done; /* all commits older than this on disk */
155 struct mutex j_commit_mutex; 158 struct mutex j_commit_mutex;
156 unsigned long j_trans_id; 159 unsigned int j_trans_id;
157 time_t j_timestamp; 160 time_t j_timestamp;
158 struct reiserfs_list_bitmap *j_list_bitmap; 161 struct reiserfs_list_bitmap *j_list_bitmap;
159 struct buffer_head *j_commit_bh; /* commit buffer head */ 162 struct buffer_head *j_commit_bh; /* commit buffer head */
@@ -182,7 +185,7 @@ struct reiserfs_journal {
182 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */ 185 int j_1st_reserved_block; /* first block on s_dev of reserved area journal */
183 186
184 unsigned long j_state; 187 unsigned long j_state;
185 unsigned long j_trans_id; 188 unsigned int j_trans_id;
186 unsigned long j_mount_id; 189 unsigned long j_mount_id;
187 unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */ 190 unsigned long j_start; /* start of current waiting commit (index into j_ap_blocks) */
188 unsigned long j_len; /* length of current waiting commit */ 191 unsigned long j_len; /* length of current waiting commit */
@@ -223,10 +226,10 @@ struct reiserfs_journal {
223 int j_num_work_lists; /* number that need attention from kreiserfsd */ 226 int j_num_work_lists; /* number that need attention from kreiserfsd */
224 227
225 /* debugging to make sure things are flushed in order */ 228 /* debugging to make sure things are flushed in order */
226 int j_last_flush_id; 229 unsigned int j_last_flush_id;
227 230
228 /* debugging to make sure things are committed in order */ 231 /* debugging to make sure things are committed in order */
229 int j_last_commit_id; 232 unsigned int j_last_commit_id;
230 233
231 struct list_head j_bitmap_nodes; 234 struct list_head j_bitmap_nodes;
232 struct list_head j_dirty_buffers; 235 struct list_head j_dirty_buffers;
@@ -239,7 +242,7 @@ struct reiserfs_journal {
239 242
240 struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */ 243 struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS]; /* array of bitmaps to record the deleted blocks */
241 struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */ 244 struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE]; /* hash table for real buffer heads in current trans */
242 struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE]; /* hash table for all the real buffer heads in all 245 struct reiserfs_journal_cnode *j_list_hash_table[JOURNAL_HASH_SIZE]; /* hash table for all the real buffer heads in all
243 the transactions */ 246 the transactions */
244 struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */ 247 struct list_head j_prealloc_list; /* list of inodes which have preallocated blocks */
245 int j_persistent_trans; 248 int j_persistent_trans;
@@ -399,10 +402,7 @@ struct reiserfs_sb_info {
399 int reserved_blocks; /* amount of blocks reserved for further allocations */ 402 int reserved_blocks; /* amount of blocks reserved for further allocations */
400 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */ 403 spinlock_t bitmap_lock; /* this lock on now only used to protect reserved_blocks variable */
401 struct dentry *priv_root; /* root of /.reiserfs_priv */ 404 struct dentry *priv_root; /* root of /.reiserfs_priv */
402#ifdef CONFIG_REISERFS_FS_XATTR
403 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */ 405 struct dentry *xattr_root; /* root of /.reiserfs_priv/.xa */
404 struct rw_semaphore xattr_dir_sem;
405#endif
406 int j_errno; 406 int j_errno;
407#ifdef CONFIG_QUOTA 407#ifdef CONFIG_QUOTA
408 char *s_qf_names[MAXQUOTAS]; 408 char *s_qf_names[MAXQUOTAS];
@@ -426,7 +426,7 @@ enum reiserfs_mount_options {
426 partition will be dealt with in a 426 partition will be dealt with in a
427 manner of 3.5.x */ 427 manner of 3.5.x */
428 428
429/* -o hash={tea, rupasov, r5, detect} is meant for properly mounting 429/* -o hash={tea, rupasov, r5, detect} is meant for properly mounting
430** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option 430** reiserfs disks from 3.5.19 or earlier. 99% of the time, this option
431** is not required. If the normal autodection code can't determine which 431** is not required. If the normal autodection code can't determine which
432** hash to use (because both hashes had the same value for a file) 432** hash to use (because both hashes had the same value for a file)
@@ -451,7 +451,6 @@ enum reiserfs_mount_options {
451 REISERFS_NO_UNHASHED_RELOCATION, 451 REISERFS_NO_UNHASHED_RELOCATION,
452 REISERFS_HASHED_RELOCATION, 452 REISERFS_HASHED_RELOCATION,
453 REISERFS_ATTRS, 453 REISERFS_ATTRS,
454 REISERFS_XATTRS,
455 REISERFS_XATTRS_USER, 454 REISERFS_XATTRS_USER,
456 REISERFS_POSIXACL, 455 REISERFS_POSIXACL,
457 REISERFS_BARRIER_NONE, 456 REISERFS_BARRIER_NONE,
@@ -489,7 +488,7 @@ enum reiserfs_mount_options {
489#define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG)) 488#define reiserfs_data_log(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_LOG))
490#define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED)) 489#define reiserfs_data_ordered(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_ORDERED))
491#define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK)) 490#define reiserfs_data_writeback(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_DATA_WRITEBACK))
492#define reiserfs_xattrs(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS)) 491#define reiserfs_xattrs(s) ((s)->s_xattr != NULL)
493#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER)) 492#define reiserfs_xattrs_user(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_XATTRS_USER))
494#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL)) 493#define reiserfs_posixacl(s) (REISERFS_SB(s)->s_mount_opt & (1 << REISERFS_POSIXACL))
495#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s)) 494#define reiserfs_xattrs_optional(s) (reiserfs_xattrs_user(s) || reiserfs_posixacl(s))