linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH v1] ext4:Make FIEMAP and delayed allocation play well together.
Date: Thu, 24 Feb 2011 11:17:13 -0600	[thread overview]
Message-ID: <4D669299.1080200@redhat.com> (raw)
In-Reply-To: <1298564112-11078-1-git-send-email-xiaoqiangnk@gmail.com>

On 02/24/2011 10:15 AM, Yongqiang Yang wrote:
> 1. lookup dirty pages with specified range in pagecache.
>    If no page is got, then there is no delayed-extent and
>    return with EXT_CONTINUE.
> 2. find the 1st mapped buffer,
> 3. check if the mapped buffer is both in the request range
>    and a delayed buffer. If not, there is no delayed-extent,
>    then return.
> 4. a delayed-extent is found, the extent will be collected.

...

looking better, I think - please run this through scripts/checkpatch.pl,
there are a lot of whitespace issues etc.

> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
> ---
>  fs/ext4/extents.c |  183 +++++++++++++++++++++++++++++++++++++++++-----------
>  1 files changed, 144 insertions(+), 39 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index ccce8a7..710d46e 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3778,42 +3778,155 @@ int ext4_convert_unwritten_extents(struct inode *inode, loff_t offset,
>  /*
>   * Callback function called for each extent to gather FIEMAP information.
>   */
> +#define NR_PAGES_PER_TIME 128
> +
>  static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path,
>  		       struct ext4_ext_cache *newex, struct ext4_extent *ex,
>  		       void *data)
>  {
> +	struct page *pages[NR_PAGES_PER_TIME];

This is going to be a problem... stack usage of this function has jumped
from 96 bytes to 1K with this change.  I don't think this
can live on the stack.

I'll take some time to read over the rest of this, though, thanks.
It does pass xfstests 225, which exercises fiemap, but with the sync flag.

-Eric

  reply	other threads:[~2011-02-24 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 16:15 [PATCH v1] ext4:Make FIEMAP and delayed allocation play well together Yongqiang Yang
2011-02-24 17:17 ` Eric Sandeen [this message]
2011-02-24 21:14 ` Andreas Dilger
2011-02-25  8:05   ` Yongqiang Yang
2011-02-24 22:23 ` Eric Sandeen

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=4D669299.1080200@redhat.com \
    --to=sandeen@redhat.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).