[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87slfzu0ty.fsf@duaron.myhome.or.jp>
Date: Fri, 01 Dec 2006 23:50:49 +0900
From: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To: Nick Piggin <npiggin@...e.de>
Cc: Andrew Morton <akpm@...l.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: [patch 3/3] fs: fix cont vs deadlock patches
Nick Piggin <npiggin@...e.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.
--
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists