public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org,
	Reiserfs mail-list <Reiserfs-List@Namesys.COM>
Subject: [BK] ReiserFS file write bug fix for 2.4
Date: Wed, 11 Sep 2002 21:04:03 +0400	[thread overview]
Message-ID: <3D7F7783.6030804@namesys.com> (raw)

[-- 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;
     }
 

             reply	other threads:[~2002-09-11 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-11 17:04 Hans Reiser [this message]
2002-09-11 17:34 ` [reiserfs-list] [BK] ReiserFS file write bug fix for 2.4 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D7F7783.6030804@namesys.com \
    --to=reiser@namesys.com \
    --cc=Reiserfs-List@Namesys.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox