All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: yangerkun <yangerkun@huawei.com>
Cc: jack@suse.cz, linux-ext4@vger.kernel.org, yi.zhang@huawei.com,
	houtao1@huawei.com
Subject: Re: [PATCH] ext4: fix a bug in ext4_wait_for_tail_page_commit
Date: Tue, 17 Sep 2019 11:31:40 -0400	[thread overview]
Message-ID: <20190917153140.GF6762@mit.edu> (raw)
In-Reply-To: <20190917084814.40370-1-yangerkun@huawei.com>

On Tue, Sep 17, 2019 at 04:48:14PM +0800, yangerkun wrote:
> No need to wait when offset equals to 0. And it will trigger a bug since
> the latter __ext4_journalled_invalidatepage can free the buffers but leave
> page still dirty.

That's only true if the block size == the page size, no?  If the
offset is zero and the block size is 1k, we still need to wait.
Shouldn't the better fix be:

> -	if (offset > PAGE_SIZE - i_blocksize(inode))
> +	if (offset >= PAGE_SIZE - i_blocksize(inode))

  	   	      		- Ted

  reply	other threads:[~2019-09-17 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17  8:48 [PATCH] ext4: fix a bug in ext4_wait_for_tail_page_commit yangerkun
2019-09-17 15:31 ` Theodore Y. Ts'o [this message]
2019-09-18  1:47   ` yangerkun
2019-09-18 10:06   ` Jan Kara
2019-09-18 10:45 ` Jan Kara
2019-09-18 13:09   ` yangerkun
2019-09-18 13:27     ` Jan Kara
2019-09-19  1:29       ` yangerkun

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=20190917153140.GF6762@mit.edu \
    --to=tytso@mit.edu \
    --cc=houtao1@huawei.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.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 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.