linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: cmm@us.ibm.com, tytso@mit.edu, sandeen@redhat.com,
	vallesroc@gmail.com, Solofo.Ramangalahy@bull.net,
	cryptooctoploid@gmail.com
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: Mark the buffer_heads as dirty and uptodate after prepare_write
Date: Fri, 7 Nov 2008 15:15:42 +0530	[thread overview]
Message-ID: <20081107094542.GJ25194@skywalker> (raw)
In-Reply-To: <1226050948-32221-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>

On Fri, Nov 07, 2008 at 03:12:28PM +0530, Aneesh Kumar K.V wrote:
> We need to make sure we mark the buffer_heads as dirty and uptodate
> so that block_write_full_page write them correctly.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>  fs/ext4/inode.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 95d0d12..d986018 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2351,6 +2351,8 @@ static int ext4_da_writepage(struct page *page,
>  			unlock_page(page);
>  			return 0;
>  		}
> +		/* now mark the buffer_heads as dirty and uptodate */
> +		block_commit_write(page, 0, PAGE_CACHE_SIZE);
>  	}
> 
>  	if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))


With this patch i am able to run the mmap program from Linus without
errors. Can you test the changes with rtorrent and see if the change
fixes the file corruption ?

-aneesh

  reply	other threads:[~2008-11-07  9:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07  9:42 [PATCH 1/2] ext4: Fix the delalloc writepages to allocate blocks at the right offset Aneesh Kumar K.V
2008-11-07  9:42 ` [PATCH 2/2] ext4: Mark the buffer_heads as dirty and uptodate after prepare_write Aneesh Kumar K.V
2008-11-07  9:45   ` Aneesh Kumar K.V [this message]
2008-11-26  5:53 ` [PATCH 1/2] ext4: Fix the delalloc writepages to allocate blocks at the right offset Theodore Tso
2008-11-27  5:37   ` Aneesh Kumar K.V

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=20081107094542.GJ25194@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=Solofo.Ramangalahy@bull.net \
    --cc=cmm@us.ibm.com \
    --cc=cryptooctoploid@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    --cc=vallesroc@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).