Thank you again for sending me your CacheFS patches. I tried applying them to Benny's latest kernel (http://git.linux-nfs.org/?p=bhalevy/linux-pnfs.git;a=commit;h=ca2f342be1149cd399ffdfca76918dda07e9994b) with the following results: PATCH 13 CacheFS Permit pre-allocation of radix-tree nodes ver#2.txt No problem. PATCH 23 CacheFS Add cache on blockdevice cache backend ver #2.txt A hunk that modified 'include/linux/fs.h' did not apply due to a change in its context. Here is a diff: 17749,17750c17749,17750 < extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, < int datasync); --- > extern int vfs_fsync_range(struct file *file, struct dentry *dentry, > loff_t start, loff_t end, int datasync); PATCH 33 CacheFS fixes ver #2.txt A hunk that modified fscache_write_op() in 'fs/fscache/page.c' needed another '}' In addition, I needed the patch that follows this email to account for a dropped argument to fscache_mark_pages_cached(). I just blindly chopped of the now extra "should_have_mapping" argument. Sometimes it was 'true', sometimes 'false'. Am I being to simplistic? Thanks! -=# Paul Giliam #=- PS: should I have also posted this to the "linux-cachefs" mailing list? tree-data.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff -ur a/fs/cachefs/tree-data.c b/fs/cachefs/tree-data.c --- a/fs/cachefs/tree-data.c 2010-07-21 15:08:36.690599847 -0700 +++ b/fs/cachefs/tree-data.c 2010-07-22 15:06:22.645767557 -0700 @@ -687,15 +687,14 @@ */ static void cachefs_data_read_mark_page(struct cachefs_object *object, struct fscache_retrieval *op, - struct page *page, - bool should_have_mapping) + struct page *page) { struct pagevec cached_pvec; pagevec_init(&cached_pvec, 0); pagevec_add(&cached_pvec, page); - fscache_mark_pages_cached(op, &cached_pvec, should_have_mapping); + fscache_mark_pages_cached(op, &cached_pvec); } /* @@ -706,8 +705,7 @@ struct cachefs_object *object, struct page *page, struct cachefs_read_callback *callback, - unsigned long gfp, - bool should_have_mapping) + unsigned long gfp) { struct cachefs_ondisc_leaf *leaf; struct cachefs_tree *point; @@ -734,7 +732,7 @@ if (bix == CACHEFS_NULL_PTR) { /* retain metadata for page 0, inasmuch as there is any */ cachefs_data_read_mark_page(object, callback->retrieval_op, - page, should_have_mapping); + page); atomic_inc(&object->page_usage); up_read(&point->sem); cachefs_tree_put(point); @@ -772,8 +770,7 @@ atomic_inc(&callback->usage); bio->bi_private = callback; - cachefs_data_read_mark_page(object, callback->retrieval_op, page, - should_have_mapping); + cachefs_data_read_mark_page(object, callback->retrieval_op, page); //dump_bio(bio, 1); submit_bio(READ, bio); @@ -811,7 +808,7 @@ /* special handling for 0-level trees */ if (object->data_levels == 0) return cachefs_data_read_page_0level(super, object, page, - callback, gfp, true); + callback, gfp); /* find the parent data pointer block */ ret = cachefs_data_walk(super, object, page->index, &dataptr, gfp); @@ -862,7 +859,7 @@ atomic_inc(&callback->usage); bio->bi_private = callback; - cachefs_data_read_mark_page(object, callback->retrieval_op, page, true); + cachefs_data_read_mark_page(object, callback->retrieval_op, page); //dump_bio(bio, 1); submit_bio(READ, bio); @@ -882,7 +879,7 @@ nodata: _debug("nodata"); - cachefs_data_read_mark_page(object, callback->retrieval_op, page, true); + cachefs_data_read_mark_page(object, callback->retrieval_op, page); if (atomic_add_return(1, &dataptr->netfs_usage) == 1) cachefs_tree_get(dataptr); @@ -935,7 +932,7 @@ if (bix == CACHEFS_NULL_PTR) { /* retain metadata for page 0, inasmuch as there is any */ cachefs_data_read_mark_page(object, callback->retrieval_op, - page, false); + page); atomic_inc(&object->page_usage); up_read(&point->sem); cachefs_tree_put(point); @@ -986,8 +983,7 @@ atomic_inc(&callback->usage); bio->bi_private = callback; - cachefs_data_read_mark_page(object, callback->retrieval_op, page, - false); + cachefs_data_read_mark_page(object, callback->retrieval_op, page); //dump_bio(bio, 1); submit_bio(READ, bio); @@ -1315,7 +1311,7 @@ /* special handling for 0-level trees */ if (object->data_levels == 0) { /* note metadata "retention" for page 0 */ - cachefs_data_read_mark_page(object, op, page, true); + cachefs_data_read_mark_page(object, op, page); atomic_inc(&object->page_usage); _leave(" = 0 [level 0]"); return 0; @@ -1330,7 +1326,7 @@ /* retain the level-1 data ptr block even if there's no data to be * read */ - cachefs_data_read_mark_page(object, op, page, true); + cachefs_data_read_mark_page(object, op, page); if (atomic_add_return(1, &dataptr->netfs_usage) == 1) cachefs_tree_get(dataptr); @@ -1374,12 +1370,11 @@ continue; ret = 0; if (!pagevec_add(&cached_pvec, page)) - fscache_mark_pages_cached(op, &cached_pvec, - false); + fscache_mark_pages_cached(op, &cached_pvec); nr++; } if (pagevec_count(&cached_pvec)) - fscache_mark_pages_cached(op, &cached_pvec, false); + fscache_mark_pages_cached(op, &cached_pvec); ASSERTCMP(nr, <=, *nr_pages); atomic_add(nr, &object->page_usage); _leave(" = %d [level 0, %u/%u]", ret, nr, *nr_pages); @@ -1418,14 +1413,14 @@ /* retain the level-1 data ptr block even if there's no data to * be read */ if (!pagevec_add(&cached_pvec, page)) - fscache_mark_pages_cached(op, &cached_pvec, false); + fscache_mark_pages_cached(op, &cached_pvec); if (atomic_add_return(1, &dataptr->netfs_usage) == 1) cachefs_tree_get(dataptr); atomic_inc(&object->page_usage); } if (pagevec_count(&cached_pvec)) - fscache_mark_pages_cached(op, &cached_pvec, false); + fscache_mark_pages_cached(op, &cached_pvec); if (last_valid) { up_read(&dataptr->sem); -- Linux-cachefs mailing list Linux-cachefs@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cachefs