Re: [PATCH 04/10] btrfs: Add error check for add_to_page_cache_lru

2010-05-23 Thread liubo
On 05/20/2010 04:43 PM, Mike Fedyk wrote: > Shouldn't this use a pre-processor label instead of hard coding > compression sensitivity or readahead tuning? this way it'll be set in > one place. > > All right. Since Adding a macro may make the whole code harder to read, I add a "goto" to avoid

Re: [PATCH 04/10] btrfs: Add error check for add_to_page_cache_lru

2010-05-20 Thread Mike Fedyk
On Thu, May 20, 2010 at 12:18 AM, Miao Xie wrote: > From: Liu Bo > > If add_to_page_cache_lru() returns -EEXIST, it indicates the page > that belongs to this page_index has been added and this readahead > action can go on to next page. > > If add_to_page_cache_lru() returns -ENOMEM, it should bre

[PATCH 04/10] btrfs: Add error check for add_to_page_cache_lru

2010-05-20 Thread Miao Xie
From: Liu Bo If add_to_page_cache_lru() returns -EEXIST, it indicates the page that belongs to this page_index has been added and this readahead action can go on to next page. If add_to_page_cache_lru() returns -ENOMEM, it should break for no memory left. Signed-off-by: Liu Bo Signed-off-by: M