public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingming <cmm@us.ibm.com>
To: tytso@mit.edu
Cc: ext4 development <linux-ext4@vger.kernel.org>,
	Curt Wohlgemuth <curtw@google.com>
Subject: Re: [PATCH 1/2] code clean up for dio fallocate handling
Date: Thu, 08 Oct 2009 18:03:49 -0700	[thread overview]
Message-ID: <1255050229.4931.146.camel@mingming-laptop> (raw)
In-Reply-To: <1254935953.18662.2.camel@mingming-laptop>

On Wed, 2009-10-07 at 10:19 -0700, Mingming wrote:
> ext4: code clean up for dio fallocate handling
> 
> In the non async IO direct IO case, the io_end structure could be NULL.
> The ext4_debug() call in ext4_end_io_dio() (inode.c) should be moved
> after checking the io_end structure to be a non NULL pointer.
> 
> The comment above ext4_get_block_dio_write() ("Maximum
> number of blocks...") is a duplicate; the original and correct comment
> is above the #define DIO_MAX_BLOCKS up above.
> 
> The check for allocated > max_blocks in ext4_split_unwritten_extents()
> can be removed, since the code returns immediately once allocated blocks
> is less or equals to the requested blocks to convert.
> 
> Based on review comments from Curt Wohlgemuth.
> 
> Signed-off-by:	Mingming Cao <cmm@us.ibm.com>

Updated cleanup patch after [patch 2/2 Fix return value of splitting
extents for dio write over fallocate ]fixed another bug. We still need
the check for allocated > max_blocks in ext4_split_unwritten_extents().

I'll resubmit the updated patch series (including two other bug
fixes/clean ups sent earlier this week) to the list again to avoid
confusion.

Thanks,
Mingming


ext4: code clean up for dio fallocate handling

The ext4_debug() call in ext4_end_io_dio() (inode.c) has a
should be moved after checking the io_end structure to be not a NULL pointer.

The comment above ext4_get_block_dio_write() ("Maximum
number of blocks...") is a duplicate; the original and correct comment
is above the #define DIO_MAX_BLOCKS up above.

The check for allocated > max_blocks in ext4_split_unwritten_extents()
can be removed, since the code returns immediately once allocated blocks is
less or equals to the requested blocks to convert.

Based on review comments from Curt Wohlgemuth.

Signed-off-by:	Mingming Cao <cmm@us.ibm.com>
---
 fs/ext4/extents.c |   96 +++++++++++++++++++++++++-----------------------------
 fs/ext4/inode.c   |    9 ++---
 2 files changed, 50 insertions(+), 55 deletions(-)

Index: linux-2.6.31-rc4/fs/ext4/inode.c
===================================================================
--- linux-2.6.31-rc4.orig/fs/ext4/inode.c
+++ linux-2.6.31-rc4/fs/ext4/inode.c
@@ -3367,8 +3367,6 @@ out:
 	return ret;
 }
 
-/* Maximum number of blocks we map for direct IO at once. */

      reply	other threads:[~2009-10-09  1:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 17:19 [PATCH 1/2] code clean up for dio fallocate handling Mingming
2009-10-09  1:03 ` 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=1255050229.4931.146.camel@mingming-laptop \
    --to=cmm@us.ibm.com \
    --cc=curtw@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --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