From: Jan Kara <jack@suse.cz>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: jack@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] udf : add readpages support for udf.
Date: Thu, 6 Oct 2011 00:14:42 +0200 [thread overview]
Message-ID: <20111005221442.GL23467@quack.suse.cz> (raw)
In-Reply-To: <1317618179-22176-1-git-send-email-linkinjeon@gmail.com>
On Mon 03-10-11 14:02:59, Namjae Jeon wrote:
> Using mpage_readpages instead of multiple calls to udf_readpage to reduce the CPU utilization and make performance higher.
Thanks. I've merged this patch.
Honza
>
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> ---
> fs/udf/inode.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/fs/udf/inode.c b/fs/udf/inode.c
> index 58665ce..81f9ce1 100644
> --- a/fs/udf/inode.c
> +++ b/fs/udf/inode.c
> @@ -37,6 +37,7 @@
> #include <linux/writeback.h>
> #include <linux/slab.h>
> #include <linux/crc-itu-t.h>
> +#include <linux/mpage.h>
>
> #include "udf_i.h"
> #include "udf_sb.h"
> @@ -104,7 +105,13 @@ static int udf_writepage(struct page *page, struct writeback_control *wbc)
>
> static int udf_readpage(struct file *file, struct page *page)
> {
> - return block_read_full_page(page, udf_get_block);
> + return mpage_readpage(page, udf_get_block);
> +}
> +
> +static int udf_readpages(struct file *file, struct address_space *mapping,
> + struct list_head *pages, unsigned nr_pages)
> +{
> + return mpage_readpages(mapping, pages, nr_pages, udf_get_block);
> }
>
> static int udf_write_begin(struct file *file, struct address_space *mapping,
> @@ -139,6 +146,7 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block)
>
> const struct address_space_operations udf_aops = {
> .readpage = udf_readpage,
> + .readpages = udf_readpages,
> .writepage = udf_writepage,
> .write_begin = udf_write_begin,
> .write_end = generic_write_end,
> --
> 1.7.4.4
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2011-10-05 22:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-03 5:02 [PATCH 2/2 v2] udf : add readpages support for udf Namjae Jeon
2011-10-05 22:14 ` Jan Kara [this message]
2011-10-06 0:33 ` NamJae Jeon
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=20111005221442.GL23467@quack.suse.cz \
--to=jack@suse.cz \
--cc=linkinjeon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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