public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingming <cmm@us.ibm.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Eric Sandeen <sandeen@redhat.com>,
	Jan Kara <jack@suse.cz>, Curt Wohlgemuth <curtw@google.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [RFC,PATCH 2/2] Direct IO for holes and fallocate
Date: Tue, 18 Aug 2009 15:49:10 -0700	[thread overview]
Message-ID: <1250635750.9822.31.camel@mingming-laptop> (raw)
In-Reply-To: <20090818001831.GB1215@mit.edu>

On Mon, 2009-08-17 at 20:18 -0400, Theodore Tso wrote:
> Here's my suggest rewrite of the patch description:
> 
> ext4: Direct IO for holes and fallocate: unwritten extents spt for DIO
> 
> From: Mingming <cmm@us.ibm.com>
> 
> When writing into an unitialized extent via direct I/O, and the direct
> I/O doesn't exactly cover the unitialized extent, split the extent
> into uninitialized and initialized extents before submitting the I/O.
                         ~~~~~~~~~~~~
would it better to replace this as to-be-initialized extents? Before
submmit the I/O, the extents are splitted but all remains uninitialized.
The written part is converted to initialized at the time I/O is
complete.

> The reason for doing this is to avoid needing to deal with an ENOSPC
> error in the end_io callback that gets used for direct I/O.
> 
> Singed-Off-By: Mingming Cao <cmm@us.ibm.com> 
> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
> 
> ------------------
> 
> 
> As mentioned in my comments for the previous patch,
> ext4_convert_unwritten_extents() needs to be defined in the previous
> patch.  This may requiring dragging in substantial portions of this
> patch.
> 
> The other observation is there seems to be quite a bit of overlap
> between ext4_split_unwritten_extents() and
> ext4_ext_convert_to_initialized().  Is there some way we can do some
> code factorization?
> 

I thought about factor the code before... that would require passing a
flag and avoid the convertion(as for DIO case we only do split) and zero
out( DIO does less agreesive zero out than buffered IO). It makes code
actually hard to read. I will give it a try to see if we could reuse the
code while still make the code easy to understand.

Thanks,
Mingming
> 						- 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



      reply	other threads:[~2009-08-18 22:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 15:00 [RFC,PATCH 2/2] Direct IO for holes and fallocate Mingming
2009-08-18  0:18 ` Theodore Tso
2009-08-18 22:49   ` Mingming [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=1250635750.9822.31.camel@mingming-laptop \
    --to=cmm@us.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=curtw@google.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /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