From: Jan Kara <jack@suse.cz>
To: Taesoo Kim <tsgatesv@gmail.com>
Cc: jack@suse.cz, linux-kernel@vger.kernel.org, taesoo@gatech.edu,
changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu,
csong84@gatech.edu
Subject: Re: [PATCH 1/1] udf: block-based fs should use generic_write_end()
Date: Wed, 1 Apr 2015 09:53:01 +0200 [thread overview]
Message-ID: <20150401075301.GB26339@quack.suse.cz> (raw)
In-Reply-To: <1426822679-18076-1-git-send-email-tsgatesv@gmail.com>
On Thu 19-03-15 23:37:59, Taesoo Kim wrote:
> simple_write_end() is for non-block fs, which doesn't invoke
> mark_inode_dirty(). Instead, generic_write_end() correctly
> handles such case when i_size has changed.
>
> Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
So simple_write_end() is actually correct in that place. We cannot even
use generic_write_end() because that page doesn't have buffers attached -
it's a special case of a file which is smaller than a block and is packed
in the inode. Please test the patch better next time - this would oops on
you the first time you try to write to such a file. Thanks!
Honza
> ---
> fs/udf/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/udf/file.c b/fs/udf/file.c
> index 08f3555..28b1dab 100644
> --- a/fs/udf/file.c
> +++ b/fs/udf/file.c
> @@ -112,7 +112,7 @@ const struct address_space_operations udf_adinicb_aops = {
> .readpage = udf_adinicb_readpage,
> .writepage = udf_adinicb_writepage,
> .write_begin = udf_adinicb_write_begin,
> - .write_end = simple_write_end,
> + .write_end = generic_write_end,
> .direct_IO = udf_adinicb_direct_IO,
> };
>
> --
> 2.3.3
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2015-04-01 7:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 3:37 [PATCH 1/1] udf: block-based fs should use generic_write_end() Taesoo Kim
2015-04-01 7:53 ` Jan Kara [this message]
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=20150401075301.GB26339@quack.suse.cz \
--to=jack@suse.cz \
--cc=blee@gatech.edu \
--cc=changwoo@gatech.edu \
--cc=csong84@gatech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.edu \
--cc=tsgatesv@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).