From: Ted Ts'o <tytso@mit.edu>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: bugzilla-daemon@bugzilla.kernel.org, damien@grassart.com,
feng.tang@intel.com, linux-ext4@vger.kernel.org
Subject: Re: [Bug 32972] New: EXT4 causes corrupt BitTorrent downloads
Date: Sun, 10 Apr 2011 21:46:25 -0400 [thread overview]
Message-ID: <20110411014625.GA5802@thunk.org> (raw)
In-Reply-To: <BANLkTikQa3UaBVVFdrvzwUcdR_qvOPcmFw@mail.gmail.com>
On Sun, Apr 10, 2011 at 10:30:13PM +0800, Yongqiang Yang wrote:
> So the right code should be:
>
> bh->b_state = (bh->b_state & ~EXT4_MAP_FLAGS) | map.m_flags;
> map_bh(bh, inode->i_sb, map.m_pblk);
> if (buffer_unwritten(bh)) {
> /* A delayed write to unwritten bh should be marked
> * new and mapped. Mapped ensures that we don't do
> * get_block multiple times when we write to the same
> * offset and new ensures that we do proper zero out
> * for partial write.
> */
> set_buffer_new(bh);
> }
Actually, I'm much more comfortable backing out commit 6de9843da
entirely. The above is *not* equivalent to what we had before ---
consider the case where ext4_map_blocks returns !EXT4_MAP_MAPPED &&
!EXT4_MAP_UNWRITTEN.
I don't *think* this should happen in the case where ext4_map_blocks
returns a value > 0, but the fact that it's not obvious, means I'd
much rather keep things the way that they are. It's not like dropping
the set_buffer_mapped(bh) was saving anything measurable anyway....
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-04-11 1:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 13:44 [Bug 32972] New: EXT4 causes corrupt BitTorrent downloads bugzilla-daemon
2011-04-10 14:30 ` Yongqiang Yang
2011-04-11 1:46 ` Ted Ts'o [this message]
2011-04-11 1:50 ` Yongqiang Yang
2011-04-10 14:30 ` [Bug 32972] " bugzilla-daemon
2011-04-10 16:18 ` bugzilla-daemon
2011-04-11 1:46 ` bugzilla-daemon
2011-04-11 1:50 ` bugzilla-daemon
2011-04-11 2:26 ` bugzilla-daemon
2011-04-11 23:10 ` bugzilla-daemon
2011-04-12 9:20 ` bugzilla-daemon
2011-04-12 9:25 ` bugzilla-daemon
2011-04-12 9:25 ` bugzilla-daemon
2011-04-13 19:03 ` bugzilla-daemon
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=20110411014625.GA5802@thunk.org \
--to=tytso@mit.edu \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=damien@grassart.com \
--cc=feng.tang@intel.com \
--cc=linux-ext4@vger.kernel.org \
--cc=xiaoqiangnk@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).