linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Robin Dong <hao.bigrat@gmail.com>
Cc: linux-ext4@vger.kernel.org, Tao Ma <tm@tao.ma>,
	Eric Sandeen <sandeen@redhat.com>,
	Zheng Liu <wenqing.lz@taobao.com>
Subject: Re: [RFC][PATCH v2 3/3] ext4: add dio overwrite nolock
Date: Fri, 15 Jun 2012 19:02:20 +0800	[thread overview]
Message-ID: <20120615110219.GA8395@gmail.com> (raw)
In-Reply-To: <CAFZ0FUXyxKT0cAUzkaMkE+PmoaErikcQDfL4Z_624BeqBR2WGw@mail.gmail.com>

On Fri, Jun 15, 2012 at 06:16:29PM +0800, Robin Dong wrote:
> > +               /*
> > +                * 'err==len' means that all of blocks has been preallocated no
> > +                * matter they are initialized or not.  For excluding
> > +                * uninitialized extents, we need to check m_flags.  There are
> > +                * two conditions that indicate for initialized extents.
> > +                * 1) If we hit extent cache, EXT4_MAP_MAPPED flag is returned;
> > +                * 2) If we do a real lookup, non-flags are returned.
> > +                * So we should check these two conditions.
> > +                */
> > +               if (err == len && (!map.m_flags ||
> > +                                  map.m_flags & EXT4_MAP_MAPPED))
> 
> If we do a real lookup in ext4_map_blocks, it also return with
> EXT4_MAP_MAPPED flag, the condition should be:
> 
>                      if (err == len && (map.m_flags & EXT4_MAP_MAPPED))

Yes, you are right.  I will fix it in next version.

Regards,
Zheng
--
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

      reply	other threads:[~2012-06-15 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14  3:32 [RFC][PATCH v2 0/3] ext4: dio overwrite nolock Zheng Liu
2012-06-14  3:32 ` [RFC][PATCH v2 1/3] ext4: split ext4_file_write into buffered IO and direct IO Zheng Liu
2012-06-14  3:32 ` [RFC][PATCH v2 2/3] ext4: add a new flag for ext4_map_blocks Zheng Liu
2012-06-15  9:29   ` Robin Dong
2012-06-14  3:32 ` [RFC][PATCH v2 3/3] ext4: add dio overwrite nolock Zheng Liu
2012-06-15 10:16   ` Robin Dong
2012-06-15 11:02     ` Zheng Liu [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=20120615110219.GA8395@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=hao.bigrat@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tm@tao.ma \
    --cc=wenqing.lz@taobao.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).