* [PATCH] Change the check for PageReadahead into an else-if
@ 2012-10-16 18:58 ` raghu.prabhu13
0 siblings, 0 replies; 7+ messages in thread
From: raghu.prabhu13 @ 2012-10-16 18:58 UTC (permalink / raw)
To: zheng.yan, fengguang.wu; +Cc: linux-mm, linux-btrfs, Raghavendra D Prabhu
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
async readahead into its readahead window, so another checking for that again is
not required.
Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
---
fs/btrfs/relocation.c | 10 ++++------
mm/filemap.c | 3 +--
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 4da0865..6362003 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
ret = -ENOMEM;
goto out;
}
- }
-
- if (PageReadahead(page)) {
- page_cache_async_readahead(inode->i_mapping,
- ra, NULL, page, index,
- last_index + 1 - index);
+ } else if (PageReadahead(page)) {
+ page_cache_async_readahead(inode->i_mapping,
+ ra, NULL, page, index,
+ last_index + 1 - index);
}
if (!PageUptodate(page)) {
diff --git a/mm/filemap.c b/mm/filemap.c
index 3843445..d703224 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1113,8 +1113,7 @@ find_page:
page = find_get_page(mapping, index);
if (unlikely(page == NULL))
goto no_cached_page;
- }
- if (PageReadahead(page)) {
+ } else if (PageReadahead(page)) {
page_cache_async_readahead(mapping,
ra, filp, page,
index, last_index - index);
--
1.7.12.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] Change the check for PageReadahead into an else-if
@ 2012-10-16 18:58 ` raghu.prabhu13
0 siblings, 0 replies; 7+ messages in thread
From: raghu.prabhu13 @ 2012-10-16 18:58 UTC (permalink / raw)
To: zheng.yan, fengguang.wu; +Cc: linux-mm, linux-btrfs, Raghavendra D Prabhu
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
async readahead into its readahead window, so another checking for that again is
not required.
Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
---
fs/btrfs/relocation.c | 10 ++++------
mm/filemap.c | 3 +--
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 4da0865..6362003 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
ret = -ENOMEM;
goto out;
}
- }
-
- if (PageReadahead(page)) {
- page_cache_async_readahead(inode->i_mapping,
- ra, NULL, page, index,
- last_index + 1 - index);
+ } else if (PageReadahead(page)) {
+ page_cache_async_readahead(inode->i_mapping,
+ ra, NULL, page, index,
+ last_index + 1 - index);
}
if (!PageUptodate(page)) {
diff --git a/mm/filemap.c b/mm/filemap.c
index 3843445..d703224 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1113,8 +1113,7 @@ find_page:
page = find_get_page(mapping, index);
if (unlikely(page == NULL))
goto no_cached_page;
- }
- if (PageReadahead(page)) {
+ } else if (PageReadahead(page)) {
page_cache_async_readahead(mapping,
ra, filp, page,
index, last_index - index);
--
1.7.12.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Change the check for PageReadahead into an else-if
2012-10-16 18:58 ` raghu.prabhu13
@ 2012-10-17 2:00 ` Fengguang Wu
-1 siblings, 0 replies; 7+ messages in thread
From: Fengguang Wu @ 2012-10-17 2:00 UTC (permalink / raw)
To: raghu.prabhu13
Cc: zheng.yan, linux-mm, linux-btrfs, Raghavendra D Prabhu, Andrew Morton
On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabhu13@gmail.com wrote:
> From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>
> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
> async readahead into its readahead window, so another checking for that again is
> not required.
>
> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
> ---
> fs/btrfs/relocation.c | 10 ++++------
> mm/filemap.c | 3 +--
> 2 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 4da0865..6362003 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
> ret = -ENOMEM;
> goto out;
> }
> - }
> -
> - if (PageReadahead(page)) {
> - page_cache_async_readahead(inode->i_mapping,
> - ra, NULL, page, index,
> - last_index + 1 - index);
> + } else if (PageReadahead(page)) {
> + page_cache_async_readahead(inode->i_mapping,
> + ra, NULL, page, index,
> + last_index + 1 - index);
That extra indent is not necessary.
Otherwise looks good to me. Thanks!
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
> }
>
> if (!PageUptodate(page)) {
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 3843445..d703224 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1113,8 +1113,7 @@ find_page:
> page = find_get_page(mapping, index);
> if (unlikely(page == NULL))
> goto no_cached_page;
> - }
> - if (PageReadahead(page)) {
> + } else if (PageReadahead(page)) {
> page_cache_async_readahead(mapping,
> ra, filp, page,
> index, last_index - index);
> --
> 1.7.12.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Change the check for PageReadahead into an else-if
@ 2012-10-17 2:00 ` Fengguang Wu
0 siblings, 0 replies; 7+ messages in thread
From: Fengguang Wu @ 2012-10-17 2:00 UTC (permalink / raw)
To: raghu.prabhu13
Cc: zheng.yan, linux-mm, linux-btrfs, Raghavendra D Prabhu, Andrew Morton
On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabhu13@gmail.com wrote:
> From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>
> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
> async readahead into its readahead window, so another checking for that again is
> not required.
>
> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
> ---
> fs/btrfs/relocation.c | 10 ++++------
> mm/filemap.c | 3 +--
> 2 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 4da0865..6362003 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
> ret = -ENOMEM;
> goto out;
> }
> - }
> -
> - if (PageReadahead(page)) {
> - page_cache_async_readahead(inode->i_mapping,
> - ra, NULL, page, index,
> - last_index + 1 - index);
> + } else if (PageReadahead(page)) {
> + page_cache_async_readahead(inode->i_mapping,
> + ra, NULL, page, index,
> + last_index + 1 - index);
That extra indent is not necessary.
Otherwise looks good to me. Thanks!
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
> }
>
> if (!PageUptodate(page)) {
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 3843445..d703224 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1113,8 +1113,7 @@ find_page:
> page = find_get_page(mapping, index);
> if (unlikely(page == NULL))
> goto no_cached_page;
> - }
> - if (PageReadahead(page)) {
> + } else if (PageReadahead(page)) {
> page_cache_async_readahead(mapping,
> ra, filp, page,
> index, last_index - index);
> --
> 1.7.12.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Change the check for PageReadahead into an else-if
2012-10-17 2:00 ` Fengguang Wu
@ 2012-10-17 2:02 ` KOSAKI Motohiro
-1 siblings, 0 replies; 7+ messages in thread
From: KOSAKI Motohiro @ 2012-10-17 2:02 UTC (permalink / raw)
To: Fengguang Wu
Cc: raghu.prabhu13, zheng.yan, linux-mm, linux-btrfs,
Raghavendra D Prabhu, Andrew Morton
On Tue, Oct 16, 2012 at 10:00 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabhu13@gmail.com wrote:
>> From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>>
>> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
>> async readahead into its readahead window, so another checking for that again is
>> not required.
>>
>> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
>> ---
>> fs/btrfs/relocation.c | 10 ++++------
>> mm/filemap.c | 3 +--
>> 2 files changed, 5 insertions(+), 8 deletions(-)
>>
>> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
>> index 4da0865..6362003 100644
>
>> --- a/fs/btrfs/relocation.c
>> +++ b/fs/btrfs/relocation.c
>> @@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
>> ret = -ENOMEM;
>> goto out;
>> }
>> - }
>> -
>> - if (PageReadahead(page)) {
>> - page_cache_async_readahead(inode->i_mapping,
>> - ra, NULL, page, index,
>> - last_index + 1 - index);
>> + } else if (PageReadahead(page)) {
>> + page_cache_async_readahead(inode->i_mapping,
>> + ra, NULL, page, index,
>> + last_index + 1 - index);
>
> That extra indent is not necessary.
>
> Otherwise looks good to me. Thanks!
>
> Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Hi Raghavendra,
Indentation breakage is now welcome. Please respin it. Otherwise
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Change the check for PageReadahead into an else-if
@ 2012-10-17 2:02 ` KOSAKI Motohiro
0 siblings, 0 replies; 7+ messages in thread
From: KOSAKI Motohiro @ 2012-10-17 2:02 UTC (permalink / raw)
To: Fengguang Wu
Cc: raghu.prabhu13, zheng.yan, linux-mm, linux-btrfs,
Raghavendra D Prabhu, Andrew Morton
On Tue, Oct 16, 2012 at 10:00 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabhu13@gmail.com wrote:
>> From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>>
>> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
>> async readahead into its readahead window, so another checking for that again is
>> not required.
>>
>> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
>> ---
>> fs/btrfs/relocation.c | 10 ++++------
>> mm/filemap.c | 3 +--
>> 2 files changed, 5 insertions(+), 8 deletions(-)
>>
>> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
>> index 4da0865..6362003 100644
>
>> --- a/fs/btrfs/relocation.c
>> +++ b/fs/btrfs/relocation.c
>> @@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
>> ret = -ENOMEM;
>> goto out;
>> }
>> - }
>> -
>> - if (PageReadahead(page)) {
>> - page_cache_async_readahead(inode->i_mapping,
>> - ra, NULL, page, index,
>> - last_index + 1 - index);
>> + } else if (PageReadahead(page)) {
>> + page_cache_async_readahead(inode->i_mapping,
>> + ra, NULL, page, index,
>> + last_index + 1 - index);
>
> That extra indent is not necessary.
>
> Otherwise looks good to me. Thanks!
>
> Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Hi Raghavendra,
Indentation breakage is now welcome. Please respin it. Otherwise
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Change the check for PageReadahead into an else-if
2012-10-17 2:02 ` KOSAKI Motohiro
(?)
@ 2012-10-24 20:44 ` Raghavendra D Prabhu
-1 siblings, 0 replies; 7+ messages in thread
From: Raghavendra D Prabhu @ 2012-10-24 20:44 UTC (permalink / raw)
To: KOSAKI Motohiro
Cc: Fengguang Wu, zheng.yan, linux-mm, linux-btrfs, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
Hi,
* On Tue, Oct 16, 2012 at 10:02:44PM -0400, KOSAKI Motohiro <kosaki.motohiro@gmail.com> wrote:
>On Tue, Oct 16, 2012 at 10:00 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
>> On Wed, Oct 17, 2012 at 12:28:05AM +0530, raghu.prabhu13@gmail.com wrote:
>>> From: Raghavendra D Prabhu <rprabhu@wnohang.net>
>>>
>>> >From 51daa88ebd8e0d437289f589af29d4b39379ea76, page_sync_readahead coalesces
>>> async readahead into its readahead window, so another checking for that again is
>>> not required.
>>>
>>> Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
>>> ---
>>> fs/btrfs/relocation.c | 10 ++++------
>>> mm/filemap.c | 3 +--
>>> 2 files changed, 5 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
>>> index 4da0865..6362003 100644
>>
>>> --- a/fs/btrfs/relocation.c
>>> +++ b/fs/btrfs/relocation.c
>>> @@ -2996,12 +2996,10 @@ static int relocate_file_extent_cluster(struct inode *inode,
>>> ret = -ENOMEM;
>>> goto out;
>>> }
>>> - }
>>> -
>>> - if (PageReadahead(page)) {
>>> - page_cache_async_readahead(inode->i_mapping,
>>> - ra, NULL, page, index,
>>> - last_index + 1 - index);
>>> + } else if (PageReadahead(page)) {
>>> + page_cache_async_readahead(inode->i_mapping,
>>> + ra, NULL, page, index,
>>> + last_index + 1 - index);
>>
>> That extra indent is not necessary.
>>
>> Otherwise looks good to me. Thanks!
>>
>> Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
>
>Hi Raghavendra,
>
>Indentation breakage is now welcome. Please respin it. Otherwise
>
>Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Thanks, will do.
Regards,
--
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-10-24 20:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 18:58 [PATCH] Change the check for PageReadahead into an else-if raghu.prabhu13
2012-10-16 18:58 ` raghu.prabhu13
2012-10-17 2:00 ` Fengguang Wu
2012-10-17 2:00 ` Fengguang Wu
2012-10-17 2:02 ` KOSAKI Motohiro
2012-10-17 2:02 ` KOSAKI Motohiro
2012-10-24 20:44 ` Raghavendra D Prabhu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.