From: Nick Piggin <nickpiggin@yahoo.com.au>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Nick Piggin <npiggin@suse.de>, Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [patch 3/3] fs: fix cont vs deadlock patches
Date: Sat, 02 Dec 2006 11:36:32 +1100 [thread overview]
Message-ID: <4570CA90.8050203@yahoo.com.au> (raw)
In-Reply-To: <87slfzu0ty.fsf@duaron.myhome.or.jp>
OGAWA Hirofumi wrote:
> Nick Piggin <npiggin@suse.de> writes:
>
>
>>>> status = __block_prepare_write(inode, new_page, zerofrom,
>>>> PAGE_CACHE_SIZE, get_block);
>>>> if (status)
>>>>@@ -2110,7 +2111,7 @@
>>>> memset(kaddr+zerofrom, 0, PAGE_CACHE_SIZE-zerofrom);
>>>> flush_dcache_page(new_page);
>>>> kunmap_atomic(kaddr, KM_USER0);
>>>>- generic_commit_write(NULL, new_page, zerofrom, PAGE_CACHE_SIZE);
>>>>+ __block_commit_write(inode, new_page, zerofrom, PAGE_CACHE_SIZE);
>>>
>>>Whatever function this is doesn't need to update i_size?
>>
>>Yes, it is the code in cont_prepare_write that is expanding a hole
>>at the end of file.
>>
>>We can do this now because fat_commit_write is now changed to call
>>generic_commit_write in the case of a non-zero length.
>>
>>I think it is an improvement because now the file will not get
>>arbitrarily extended in the case of a write failure somewhere down
>>the track.
>
>
> Ah, unfortunately we can't this. If we don't update ->i_size before
> page_cache_release, pdflush will think these pages is outside ->i_size
> and just clean the page without writing it.
I see. I guess you need to synchronise your writepage versus this
extention in order to handle it properly then. I won't bother with
that though: it won't be worse than it was before.
Thanks for review, do you agree with the other hunks?
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2006-12-02 0:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 7:20 [patch 1/3] mm: pagecache write deadlocks zerolength fix Nick Piggin
2006-11-30 7:22 ` [patch 2/3] mm: pagecache write deadlocks stale holes fix Nick Piggin
2006-11-30 7:22 ` [patch 3/3] fs: fix cont vs deadlock patches Nick Piggin
2006-11-30 11:32 ` Nick Piggin
2006-11-30 22:14 ` OGAWA Hirofumi
2006-12-01 0:27 ` Nick Piggin
2006-12-01 1:11 ` OGAWA Hirofumi
2006-12-01 2:03 ` Nick Piggin
2006-12-01 2:09 ` Nick Piggin
2006-12-01 3:41 ` OGAWA Hirofumi
2006-12-01 3:47 ` Nick Piggin
2006-12-01 5:08 ` Nick Piggin
2006-12-01 7:21 ` Andrew Morton
2006-12-01 7:53 ` Nick Piggin
2006-12-01 14:50 ` OGAWA Hirofumi
2006-12-01 15:47 ` OGAWA Hirofumi
2006-12-02 0:36 ` Nick Piggin [this message]
2006-12-02 7:28 ` [new patch " Nick Piggin
2006-12-02 9:43 ` OGAWA Hirofumi
2006-11-30 7:26 ` [patch 0/3] more buffered write fixes Nick Piggin
2006-11-30 10:15 ` [patch 1/3] mm: pagecache write deadlocks zerolength fix Andreas Schwab
2006-11-30 10:15 ` Andreas Schwab
2006-11-30 10:19 ` Nick Piggin
2006-11-30 10:30 ` Andreas Schwab
2006-11-30 10:30 ` Andreas Schwab
2006-11-30 11:30 ` 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=4570CA90.8050203@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.