Re: [PATCH 2/2 v2] udf : add readpages support for udf.

From: NamJae Jeon
Date: Wed Oct 05 2011 - 20:33:42 EST


2011/10/6 Jan Kara <jack@xxxxxxx>:
> 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.
Hi. Jan.
this patch is created by the second from [PATCH 1/2 v3] udf : enable
error print in udf_read_tagged().
So if hunk or problem happen, plz inform me it.
Thanks a lot.
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂHonza
>>
>> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxx>
>> ---
>> Â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@xxxxxxx>
> SUSE Labs, CR
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/