linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Nick Piggin <npiggin@suse.de>, Andrew Morton <akpm@linux-foundation.org>
Cc: torvalds@linux-foundation.org, hch@infradead.org,
	linux-fsdevel@vger.kernel.org, pbadari@us.ibm.com,
	Reiserfs mailing list <reiserfs-devel@vger.kernel.org>
Subject: [patch 2/2] reiser4: adjust to the new aops fixup
Date: Sat, 27 Dec 2008 02:33:34 +0300	[thread overview]
Message-ID: <495569CE.2030400@gmail.com> (raw)
In-Reply-To: <20081127144811.GS28285@wotan.suse.de>

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

Nick Piggin wrote:
> On Thu, Nov 27, 2008 at 05:34:26PM +0300, Edward Shishkin wrote:
>   
>> reiser4_write_{begin,end} works only in splice.c (i.e. only for
>> loopback functionality) in the chunk of code which looks like this:
>>
>> pagecache_write_begin();
>> ...
>> memcpy(.., to_page);
>> ...
>> pagecache_write_end(.., to_page, ..);
>>
>> i.e. there can not be short writes and everything is uptodate.
>>     
>  
> Ah OK, indeed you are right. Although that's not to say that some
> other kernel code may not be able to start doing interruptible
> copies, although it would be fairly unlikely. Maybe if you just have
> a BUG_ON(!(flags & AOP_FLAG_UNINTERRUPTIBLE)); or something to just
> make sure?
Yup, I would say, it's a must..

Thanks,
Edward.

[-- Attachment #2: reiser4-adjust-to-the-new-aops-fixup.patch --]
[-- Type: text/x-patch, Size: 751 bytes --]

Make sure that reiser4_write_begin()
is not called for interruptible copies.

Signed-off-by: Edward Shishkin<edward.shishkin@gmail.com>
---
 linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file/file_conversion.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file/file_conversion.c.orig
+++ linux-2.6.28-rc2-mm1/fs/reiser4/plugin/file/file_conversion.c
@@ -682,6 +682,12 @@ int reiser4_write_begin_careful(struct f
 	reiser4_context *ctx;
 	struct inode * inode = file->f_dentry->d_inode;
 
+	/**
+	 * reiser4_write_end() can not cope with
+	 * short writes for now
+	 */
+	BUG_ON(!(flags & AOP_FLAG_UNINTERRUPTIBLE));
+
 	index = pos >> PAGE_CACHE_SHIFT;
 	start = pos & (PAGE_CACHE_SIZE - 1);
 	end = start + len;

  reply	other threads:[~2008-12-26 23:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 23:41 [patch] fs: remove prepare_write/commit_write Nick Piggin
2008-09-24 23:48 ` Christoph Hellwig
2008-09-24 23:54   ` Nick Piggin
2008-10-17 17:34 ` Christoph Hellwig
2008-10-17 18:45   ` Badari Pulavarty
2008-10-21  6:20     ` Nick Piggin
2008-10-21 21:35       ` Andrew Morton
2008-10-21 21:36         ` Christoph Hellwig
2008-10-21 21:45           ` Andrew Morton
2008-10-21 21:49             ` Christoph Hellwig
2008-10-21 22:01               ` Andrew Morton
2008-10-22  9:24         ` Nick Piggin
2008-10-22  0:43       ` Andrew Morton
2008-10-22 11:57         ` Edward Shishkin
2008-11-22 10:14         ` [patch 1/2] reiser4: adjust to the new aops Edward Shishkin
2008-11-27 10:34           ` Nick Piggin
2008-11-27 14:34             ` Edward Shishkin
2008-11-27 14:48               ` Nick Piggin
2008-12-26 23:33                 ` Edward Shishkin [this message]
2008-10-18  1:57   ` [patch] fs: remove prepare_write/commit_write 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=495569CE.2030400@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=pbadari@us.ibm.com \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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).