* Quick & dirty r4 for 2.6.37
@ 2011-01-26 20:14 Kaelyn Uhrain
2011-01-26 20:30 ` Kaelyn Uhrain
2011-01-26 20:49 ` Edward Shishkin
0 siblings, 2 replies; 5+ messages in thread
From: Kaelyn Uhrain @ 2011-01-26 20:14 UTC (permalink / raw)
To: reiserfs-devel
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
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
[-- Attachment #2: reiser4-for-2.6.36-to-2.6.37.patch --]
[-- Type: text/x-diff, Size: 2559 bytes --]
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();
/*
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Quick & dirty r4 for 2.6.37
2011-01-26 20:14 Quick & dirty r4 for 2.6.37 Kaelyn Uhrain
@ 2011-01-26 20:30 ` Kaelyn Uhrain
2011-01-26 20:51 ` Edward Shishkin
2011-01-26 20:49 ` Edward Shishkin
1 sibling, 1 reply; 5+ messages in thread
From: Kaelyn Uhrain @ 2011-01-26 20:30 UTC (permalink / raw)
To: reiserfs-devel
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
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@gmail.com> 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
>
[-- Attachment #2: reiser4-for-2.6.36-to-2.6.37.patch --]
[-- Type: text/x-diff, Size: 3445 bytes --]
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);
/*
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Quick & dirty r4 for 2.6.37
2011-01-26 20:14 Quick & dirty r4 for 2.6.37 Kaelyn Uhrain
2011-01-26 20:30 ` Kaelyn Uhrain
@ 2011-01-26 20:49 ` Edward Shishkin
1 sibling, 0 replies; 5+ messages in thread
From: Edward Shishkin @ 2011-01-26 20:49 UTC (permalink / raw)
To: Kaelyn Uhrain; +Cc: reiserfs-devel
Kaelyn Uhrain 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
>
Hello.
Correct, but not enough:
return value BIO_EOPNOTSUPP has gone with WRITE_BARRIER,
and vfs changes in default_llseek() now cause self-blocking in ->llseek()
reiser4 file operation path.
Actually, I have already prepared the patch for .37 at last weekends
(still testing), will be available soon.
Anyway thanks!
Edward.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Quick & dirty r4 for 2.6.37
2011-01-26 20:30 ` Kaelyn Uhrain
@ 2011-01-26 20:51 ` Edward Shishkin
2011-01-26 21:00 ` Kaelyn Uhrain
0 siblings, 1 reply; 5+ messages in thread
From: Edward Shishkin @ 2011-01-26 20:51 UTC (permalink / raw)
To: Kaelyn Uhrain; +Cc: reiserfs-devel
Kaelyn Uhrain wrote:
> 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.
>
writeback_skip_sb_inodes() in vanilla? With whose blessing? :)
You are confused :)
> On Wed, Jan 26, 2011 at 12:14 PM, Kaelyn Uhrain
> <Kaelyn.Alexi+reiserfs@gmail.com> 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
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Quick & dirty r4 for 2.6.37
2011-01-26 20:51 ` Edward Shishkin
@ 2011-01-26 21:00 ` Kaelyn Uhrain
0 siblings, 0 replies; 5+ messages in thread
From: Kaelyn Uhrain @ 2011-01-26 21:00 UTC (permalink / raw)
To: Edward Shishkin; +Cc: reiserfs-devel
Glad to hear you've prepared a proper .37 patch that will be available soon! ^.^
On Wed, Jan 26, 2011 at 12:51 PM, Edward Shishkin
<edward.shishkin@gmail.com> wrote:
> Kaelyn Uhrain wrote:
>>
>> 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.
>>
>
> writeback_skip_sb_inodes() in vanilla? With whose blessing? :)
> You are confused :)
Yeah, I was confused about it. My tree got a bit munged after I'd
realized I'd been working with an old version of the .36 r4 patch and
had tried to update my tree without doing the smart thing of backing
out all changes and reapplying them.
Sorry for the confusion!
Cheers,
Kaelyn
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-26 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 20:14 Quick & dirty r4 for 2.6.37 Kaelyn Uhrain
2011-01-26 20:30 ` Kaelyn Uhrain
2011-01-26 20:51 ` Edward Shishkin
2011-01-26 21:00 ` Kaelyn Uhrain
2011-01-26 20:49 ` Edward Shishkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).