* [BK] ReiserFS file write bug fix for 2.4
@ 2002-09-11 17:04 Hans Reiser
2002-09-11 17:34 ` [reiserfs-list] " Dieter Nützel
0 siblings, 1 reply; 5+ messages in thread
From: Hans Reiser @ 2002-09-11 17:04 UTC (permalink / raw)
To: marcelo, linux-kernel, Reiserfs mail-list
[-- Attachment #1: Type: text/plain, Size: 99 bytes --]
Well, at least getting the new file write code into pre6 found this bug
for us.... please apply.
[-- Attachment #2: reiserfs_file_write bugfix --]
[-- Type: message/rfc822, Size: 2552 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 230 bytes --]
Hello!
You probably want to ask Marcelo if he is going to leave reiserfs_file_write
stuff in kernel. If he is going to do that, then attached fix should be
applied. Otherwise it can be ignored, of course.
Bye,
Oleg
[-- Attachment #2.1.2: mail3 --]
[-- Type: text/plain, Size: 1384 bytes --]
Hello!
This fixes a buglet in new reiserfs_file_write() that escaped out previous
tests. Problem only occurs on non-empty appended (opened with O_APPEND)
files that are being written with more than 128k bytes data at a time
(write syscall). Fix itself is trivial.
Diffstat:
file.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Plain text patch:
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.632 -> 1.633
# fs/reiserfs/file.c 1.10 -> 1.11
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/11 green@angband.namesys.com 1.633
# reiserfs: Fix a case where non empty files written to with O_APPEND set and amount of bytes to write bigger than 128k (or up to 4k less for non page aligned writes) can get their content damaged.
# --------------------------------------------
#
diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
--- a/fs/reiserfs/file.c Wed Sep 11 18:50:13 2002
+++ b/fs/reiserfs/file.c Wed Sep 11 18:50:14 2002
@@ -1189,7 +1189,7 @@
already_written += write_bytes;
buf += write_bytes;
- pos = *ppos += write_bytes;
+ *ppos = pos += write_bytes;
count -= write_bytes;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [reiserfs-list] [BK] ReiserFS file write bug fix for 2.4
2002-09-11 17:04 [BK] ReiserFS file write bug fix for 2.4 Hans Reiser
@ 2002-09-11 17:34 ` Dieter Nützel
2002-09-11 17:53 ` Oleg Drokin
0 siblings, 1 reply; 5+ messages in thread
From: Dieter Nützel @ 2002-09-11 17:34 UTC (permalink / raw)
To: Hans Reiser, marcelo, linux-kernel, Reiserfs mail-list
On Wednesday 11 September 2002 19:04, Hans Reiser wrote:
> Well, at least getting the new file write code into pre6 found this bug
> for us.... please apply.
What is the "right" way to get the new block allocation going?
The mount option (-o alloc=prealloc min=4:preallocsize=9) only or better a
"reformat"?
Thanks,
Dieter
--
Dieter Nützel
Graduate Student, Computer Science
University of Hamburg
Department of Computer Science
@home: Dieter.Nuetzel at hamburg.de (replace at with @)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [reiserfs-list] [BK] ReiserFS file write bug fix for 2.4
2002-09-11 17:34 ` [reiserfs-list] " Dieter Nützel
@ 2002-09-11 17:53 ` Oleg Drokin
2002-09-11 19:37 ` Dieter Nützel
0 siblings, 1 reply; 5+ messages in thread
From: Oleg Drokin @ 2002-09-11 17:53 UTC (permalink / raw)
To: Dieter N?tzel; +Cc: Hans Reiser, marcelo, linux-kernel, Reiserfs mail-list
Hello!
On Wed, Sep 11, 2002 at 07:34:11PM +0200, Dieter N?tzel wrote:
> On Wednesday 11 September 2002 19:04, Hans Reiser wrote:
> > Well, at least getting the new file write code into pre6 found this bug
> > for us.... please apply.
> What is the "right" way to get the new block allocation going?
use 2.4.19-pre2+ and it is in there ;)
> The mount option (-o alloc=prealloc min=4:preallocsize=9) only or better a
> "reformat"?
Those mount options are no longer needed starting from 2.4.20-pre6.
They are default. Reformat is not needed, but all the blocks allocated by old
allocator will remain at their old places of course.
Bye,
Oleg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [reiserfs-list] [BK] ReiserFS file write bug fix for 2.4
2002-09-11 17:53 ` Oleg Drokin
@ 2002-09-11 19:37 ` Dieter Nützel
2002-09-12 4:53 ` Oleg Drokin
0 siblings, 1 reply; 5+ messages in thread
From: Dieter Nützel @ 2002-09-11 19:37 UTC (permalink / raw)
To: Oleg Drokin; +Cc: Linux Kernel List, ReiserFS List
On Wednesday 11 September 2002 19:53, Oleg Drokin wrote:
> Hello!
>
> On Wed, Sep 11, 2002 at 07:34:11PM +0200, Dieter N?tzel wrote:
> > On Wednesday 11 September 2002 19:04, Hans Reiser wrote:
> > > Well, at least getting the new file write code into pre6 found this bug
> > > for us.... please apply.
> >
> > What is the "right" way to get the new block allocation going?
>
> use 2.4.19-pre2+ and it is in there ;)
You meant 2.4.20-pre2, didn't you?
> > The mount option (-o alloc=prealloc min=4:preallocsize=9) only or better
> > a "reformat"?
>
> Those mount options are no longer needed starting from 2.4.20-pre6.
> They are default. Reformat is not needed, but all the blocks allocated by
> old allocator will remain at their old places of course.
>
> Bye,
> Oleg
--
Dieter Nützel
Graduate Student, Computer Science
University of Hamburg
Department of Computer Science
@home: Dieter.Nuetzel at hamburg.de (replace at with @)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [reiserfs-list] [BK] ReiserFS file write bug fix for 2.4
2002-09-11 19:37 ` Dieter Nützel
@ 2002-09-12 4:53 ` Oleg Drokin
0 siblings, 0 replies; 5+ messages in thread
From: Oleg Drokin @ 2002-09-12 4:53 UTC (permalink / raw)
To: Dieter N?tzel; +Cc: Linux Kernel List, ReiserFS List
Hello!
On Wed, Sep 11, 2002 at 09:37:22PM +0200, Dieter N?tzel wrote:
> > On Wed, Sep 11, 2002 at 07:34:11PM +0200, Dieter N?tzel wrote:
> > > On Wednesday 11 September 2002 19:04, Hans Reiser wrote:
> > > > Well, at least getting the new file write code into pre6 found this bug
> > > > for us.... please apply.
> > > What is the "right" way to get the new block allocation going?
> > use 2.4.19-pre2+ and it is in there ;)
> You meant 2.4.20-pre2, didn't you?
Ah, yes. 2.4.20-pre2+ of course.
Bye,
Oleg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-09-12 4:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-11 17:04 [BK] ReiserFS file write bug fix for 2.4 Hans Reiser
2002-09-11 17:34 ` [reiserfs-list] " Dieter Nützel
2002-09-11 17:53 ` Oleg Drokin
2002-09-11 19:37 ` Dieter Nützel
2002-09-12 4:53 ` Oleg Drokin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox