summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 19:11:28 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 19:11:28 -0800
commitfff10634980710b1edd0c849b8478d3f5ec5ee95 (patch)
tree81139d648c53ee0a816e17a60dc5d213decc23e6 /include/linux
parent74f5133bc757c27c168be048b66ddfe53160a793 (diff)
v2.4.6.7 -> v2.4.6.8
- Chris Mason: reiserfs update - Paul Mackerras: PPC updates (softirq) - Kai Germaschewski: ISDN updates - various: workaround for cpuid inline asm problem with egcs-2.91.66
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h11
-rw-r--r--include/linux/reiserfs_fs.h29
-rw-r--r--include/linux/reiserfs_fs_i.h20
-rw-r--r--include/linux/reiserfs_fs_sb.h4
4 files changed, 19 insertions, 45 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6f6ef817b059..76bebdc14974 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1069,6 +1069,17 @@ extern void set_buffer_async_io(struct buffer_head *bh) ;
#define BUF_PROTECTED 3 /* Ramdisk persistent storage */
#define NR_LIST 4
+static inline void get_bh(struct buffer_head * bh)
+{
+ atomic_inc(&(bh)->b_count);
+}
+
+static inline void put_bh(struct buffer_head *bh)
+{
+ smp_mb__before_atomic_dec();
+ atomic_dec(&bh->b_count);
+}
+
/*
* This is called by bh->b_end_io() handlers when I/O has completed.
*/
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index f46154e9fdac..2bd224e60dd6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -65,6 +65,9 @@
/* enable journalling */
#define ENABLE_JOURNAL
+#define USE_INODE_GENERATION_COUNTER
+
+
#ifdef __KERNEL__
/* #define REISERFS_CHECK */
@@ -708,6 +711,7 @@ struct stat_data {
__u32 sd_blocks;
union {
__u32 sd_rdev;
+ __u32 sd_generation;
//__u32 sd_first_direct_byte;
/* first byte of file which is stored in a
direct item: except that if it equals 1
@@ -1102,7 +1106,7 @@ struct path var = {ILLEGAL_PATH_ELEMENT_OFFSET, }
#define PATH_H_PATH_OFFSET(p_s_path, n_h) ((p_s_path)->path_length - (n_h))
-#define get_bh(path) PATH_PLAST_BUFFER(path)
+#define get_last_bh(path) PATH_PLAST_BUFFER(path)
#define get_ih(path) PATH_PITEM_HEAD(path)
#define get_item_pos(path) PATH_LAST_POSITION(path)
#define get_item(path) ((void *)B_N_PITEM(PATH_PLAST_BUFFER(path), PATH_LAST_POSITION (path)))
@@ -1541,29 +1545,6 @@ struct reiserfs_journal_header {
__u32 j_mount_id ;
} ;
-/* these are used to keep flush pages that contain converted direct items.
-** if the page is not flushed before the transaction that converted it
-** is committed, we risk losing data
-**
-** note, while a page is in this list, its counter is incremented.
-*/
-struct reiserfs_page_list {
- struct reiserfs_page_list *next ;
- struct reiserfs_page_list *prev ;
- struct page *page ;
- unsigned long blocknr ; /* block number holding converted data */
-
- /* if a transaction writer has the page locked the flush_page_list
- ** function doesn't need to (and can't) get the lock while flushing
- ** the page. do_not_lock needs to be set by anyone who calls journal_end
- ** with a page lock held. They have to look in the inode and see
- ** if the inode has the page they have locked in the flush list.
- **
- ** this sucks.
- */
- int do_not_lock ;
-} ;
-
extern task_queue reiserfs_commit_thread_tq ;
extern wait_queue_head_t reiserfs_commit_thread_wait ;
diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h
index 39c37e2045c6..a43342f84d56 100644
--- a/include/linux/reiserfs_fs_i.h
+++ b/include/linux/reiserfs_fs_i.h
@@ -3,11 +3,6 @@
#include <linux/list.h>
-/* these are used to keep track of the pages that need
-** flushing before the current transaction can commit
-*/
-struct reiserfs_page_list ;
-
struct reiserfs_inode_info {
__u32 i_key [4];/* key is still 4 32 bit integers */
@@ -22,21 +17,6 @@ struct reiserfs_inode_info {
__u32 i_first_direct_byte; // offset of first byte stored in direct item.
- /* pointer to the page that must be flushed before
- ** the current transaction can commit.
- **
- ** this pointer is only used when the tail is converted back into
- ** a direct item, or the file is deleted
- */
- struct reiserfs_page_list *i_converted_page ;
-
- /* we save the id of the transaction when we did the direct->indirect
- ** conversion. That allows us to flush the buffers to disk
- ** without having to update this inode to zero out the converted
- ** page variable
- */
- int i_conversion_trans_id ;
-
/* My guess is this contains the first
unused block of a sequence of
blocks plus the length of the
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 68d2e003b724..6e203657bfc7 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -60,7 +60,8 @@ struct reiserfs_super_block
don't need to save bytes in the
superblock. -Hans */
__u16 s_reserved;
- char s_unused[128] ; /* zero filled by mkreiserfs */
+ __u32 s_inode_generation;
+ char s_unused[124] ; /* zero filled by mkreiserfs */
} __attribute__ ((__packed__));
#define SB_SIZE (sizeof(struct reiserfs_super_block))
@@ -249,6 +250,7 @@ struct reiserfs_journal {
int j_free_bitmap_nodes ;
int j_used_bitmap_nodes ;
struct list_head j_bitmap_nodes ;
+ struct inode j_dummy_inode ;
struct reiserfs_list_bitmap j_list_bitmap[JOURNAL_NUM_BITMAPS] ; /* array of bitmaps to record the deleted blocks */
struct reiserfs_journal_list j_journal_list[JOURNAL_LIST_COUNT] ; /* array of all the journal lists */
struct reiserfs_journal_cnode *j_hash_table[JOURNAL_HASH_SIZE] ; /* hash table for real buffer heads in current trans */