From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] vfs: Fix vmtruncate() regression
Date: Wed, 13 Jan 2010 21:07:59 +0900 [thread overview]
Message-ID: <87r5pucin4.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20100113060734.GC3901@nick> (Nick Piggin's message of "Wed, 13 Jan 2010 17:07:34 +1100")
Nick Piggin <npiggin@suse.de> writes:
>> If __block_prepare_write() was failed in block_write_begin(), the
>> allocated blocks can be outside of ->i_size.
>>
>> But new truncate_pagecache() in vmtuncate() does nothing if new < old.
>> It means the above usage is not working anymore.
>>
>> So, this patch fixes it by removing "new < old" check. It would need
>> more cleanup/change. But, now -rc and truncate working is in progress,
>> so, this tried to fix it minimum change.
>>
>> Cc: stable@kernel.org
>> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>
> Hmm, truncate_pagecache() is for truncating the mm/vm part of the
> pagecache. vmtruncate should still call inode->i_op->truncate() to
> trim blocks if required.
>
> However I'd say we do still need to ensure do_invalidatepage is
> called for the page, for private metadata. So yes I think your patch
> looks good.
Thanks for reviewing. Yes, and it also needs to be called to ensure that
have the same state on-disk and page/bh state. [BTW, this became the
cause of fatfs corruption.]
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2010-01-13 12:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 18:40 [PATCH] vfs: Fix vmtruncate() regression OGAWA Hirofumi
2010-01-13 6:07 ` Nick Piggin
2010-01-13 12:07 ` OGAWA Hirofumi [this message]
2010-01-13 12:14 ` OGAWA Hirofumi
2010-01-14 22:30 ` Andrew Morton
2010-01-15 0:26 ` OGAWA Hirofumi
2010-01-18 3:51 ` Nick Piggin
2010-01-19 23:52 ` [stable] " Greg KH
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=87r5pucin4.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=viro@zeniv.linux.org.uk \
/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.