linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org, cmm@us.ibm.com,
	Badari Pulavarty <pbadari@gmail.com>,
	Dmitriy Monakhov <dmonakhov@sw.ru>,
	mark.fasheh@oracle.com
Subject: [patch 1/8] 2.6.22-rc4-mm2 buffered write fixes
Date: Thu, 14 Jun 2007 04:34:44 +0200	[thread overview]
Message-ID: <20070614023444.GA30943@wotan.suse.de> (raw)

Here are several fixes for issues that Dmitriy found, and also several
fixlets for non-compiling filesystems.

These only caused one trivial down-stack reject, so I won't worry about
sending you the fix for that.

These have had some testing with various filesystems, block sizes, and
journal modes with fsx-linux, fsstress and swapping-kbuilds.

--

Dmitriy noticed some weird code I had in __page_symlink that is wrong.

Fixes: fs-introduce-write_begin-write_end-and-perform_write-aops.patch

Signed-off-by: Nick Piggin <npiggin@suse.de>

Index: linux-2.6/fs/namei.c
===================================================================
--- linux-2.6.orig/fs/namei.c
+++ linux-2.6/fs/namei.c
@@ -2702,21 +2702,20 @@ int __page_symlink(struct inode *inode, 
 	char *kaddr;
 
 retry:
-	err = pagecache_write_begin(NULL, mapping, 0, PAGE_CACHE_SIZE,
+	err = pagecache_write_begin(NULL, mapping, 0, len-1,
 				AOP_FLAG_UNINTERRUPTIBLE, &page, &fsdata);
 	if (err)
 		goto fail;
 
 	kaddr = kmap_atomic(page, KM_USER0);
 	memcpy(kaddr, symname, len-1);
-	memset(kaddr+len-1, 0, PAGE_CACHE_SIZE-(len-1));
 	kunmap_atomic(kaddr, KM_USER0);
 
-	err = pagecache_write_end(NULL, mapping, 0, PAGE_CACHE_SIZE, PAGE_CACHE_SIZE,
+	err = pagecache_write_end(NULL, mapping, 0, len-1, len-1,
 							page, fsdata);
 	if (err < 0)
 		goto fail;
-	if (err < PAGE_CACHE_SIZE)
+	if (err < len-1)
 		goto retry;
 
 	mark_inode_dirty(inode);

             reply	other threads:[~2007-06-14  2:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  2:34 Nick Piggin [this message]
2007-06-14  2:35 ` [patch 2/8] 2.6.22-rc4-mm2 buffered write fixes Nick Piggin
2007-06-14  2:36 ` [patch 3/8] " Nick Piggin
2007-06-14  2:37 ` [patch 4/8] " Nick Piggin
2007-06-14  2:39 ` [patch 4/8] minix: convert to new aops fix Nick Piggin
2007-06-14  2:40 ` [patch 6/8] sysv: " Nick Piggin
2007-06-14  2:41 ` [patch 7/8] ufs: " Nick Piggin
2007-06-14  2:42 ` [patch 8/8] reiser4: fix for new aops patches Nick Piggin

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=20070614023444.GA30943@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=cmm@us.ibm.com \
    --cc=dmonakhov@sw.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mark.fasheh@oracle.com \
    --cc=pbadari@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).