Ack! Just realized I'd created the patch based on the reiser4-for-2.6.36.path.bz2 from November and not the latest r4 patch. Here is an amended version of my patch that removes the export of generic_writeback_sb_inodes and the definition & export of writeback_skip_sb_inodes from fs/fs-writeback.c as they're already in vanilla 2.6.37. On Wed, Jan 26, 2011 at 12:14 PM, Kaelyn Uhrain <Kaelyn.Alexi+reiserfs@xxxxxxxxx> wrote: > Here's a quick patch I just made for the resier4-for-2.6.36 patch to > compile against the 2.6.37 sources. To use, apply > resier4-for-2.6.36.patch to the 2.6.37 kernel sources (ignoring the > one rejected chunk which just adds a comment at the end of > fs/fs-writeback.c) then apply this patch. My patch is a revert of > 766f9164193f6dda1497bbf3861060198421fb92 along with three very small > one-liner changes to fix compilation issues; I haven't had a chance to > test it beyond building the kernel itself, and won't until after I'm > off work tonight. I also make no claims as to the correctness of my > patch since it is my first venture into the reiser4 and linux fs code. > > Cheers, > Kaelyn >
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index eb23a9a..d046b99 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -712,7 +712,7 @@ void writeback_skip_sb_inodes(struct super_block *sb, if (list_empty(&wb->b_io)) break; - inode = list_entry(wb->b_io.prev, struct inode, i_list); + inode = wb_inode(wb->b_io.prev); if (sb != inode->i_sb) break; redirty_tail(inode); @@ -834,7 +834,7 @@ int bdi_writeback_thread(void *data) struct backing_dev_info *bdi = wb->bdi; long pages_written; - current->flags |= PF_SWAPWRITE; + current->flags |= PF_FLUSHER | PF_SWAPWRITE; set_freezable(); wb->last_active = jiffies; diff --git a/fs/reiser4/jnode.c b/fs/reiser4/jnode.c index 3eab11a..e5b5943 100644 --- a/fs/reiser4/jnode.c +++ b/fs/reiser4/jnode.c @@ -247,8 +247,6 @@ void jnode_init(jnode * node, reiser4_tree * tree, jnode_type type) ASSIGN_NODE_LIST(node, NOT_CAPTURED); - INIT_RCU_HEAD(&node->rcu); - #if REISER4_DEBUG { reiser4_super_info_data *sbinfo; diff --git a/fs/reiser4/wander.c b/fs/reiser4/wander.c index 8f75096..2538b66 100644 --- a/fs/reiser4/wander.c +++ b/fs/reiser4/wander.c @@ -720,7 +720,7 @@ static int write_jnodes_to_disk_extent( flush_queue_t *fq, int flags) { struct super_block *super = reiser4_get_current_sb(); - int write_op = ( flags & WRITEOUT_BARRIER ) ? WRITE_BARRIER : WRITE; + int write_op = ( flags & WRITEOUT_BARRIER ) ? WRITE_FLUSH_FUA : WRITE; int max_blocks; jnode *cur = first; reiser4_block_nr block; diff --git a/include/linux/sched.h b/include/linux/sched.h index 2238745..7667bdf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1711,6 +1711,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * #define PF_DUMPCORE 0x00000200 /* dumped core */ #define PF_SIGNALED 0x00000400 /* killed by a signal */ #define PF_MEMALLOC 0x00000800 /* Allocating memory */ +#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 027100d..956dfec 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -362,7 +362,7 @@ static int bdi_forker_thread(void *ptr) { struct bdi_writeback *me = ptr; - current->flags |= PF_SWAPWRITE; + current->flags |= PF_FLUSHER | PF_SWAPWRITE; set_freezable(); /* diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index cb44c5b..b88483f 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -825,31 +825,6 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait) return wrote; } -EXPORT_SYMBOL(generic_writeback_sb_inodes); - -/* - * This function is for file systems which have their - * own means of periodical write-out of old data. - * NOTE: inode_lock should be hold. - * - * Skip a portion of b_io inodes which belong to @sb - * and go sequentially in reverse order. - */ -void writeback_skip_sb_inodes(struct super_block *sb, - struct bdi_writeback *wb) -{ - while (1) { - struct inode *inode; - - if (list_empty(&wb->b_io)) - break; - inode = list_entry(wb->b_io.prev, struct inode, i_list); - if (sb != inode->i_sb) - break; - redirty_tail(inode); - } -} -EXPORT_SYMBOL(writeback_skip_sb_inodes); /*