Skip to contentSkip to conversation

FS-Cache: Handle pages pending storage that get evicted under OOM conditions

DISCUSSION Stefan Lippers-Hollmann 2 participants 2 messages Dec 1, 2009 1 message not in the archive 9P file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi

Quoted 8 lines · Linux Kernel Mailing List
Gitweb:     http://git.kernel.org/linus/201a15428bd54f83eccec8b7c64a04b8f9431204
Commit:     201a15428bd54f83eccec8b7c64a04b8f9431204
Parent:     e3d4d28b1c8cc7c26536a50b43d86ccd39878550
Author:     David Howells <[email protected]>
AuthorDate: Thu Nov 19 18:11:35 2009 +0000
Committer:  David Howells <[email protected]>
CommitDate: Thu Nov 19 18:11:35 2009 +0000
Quoted 6 lines

FS-Cache: Handle pages pending storage that get evicted under OOM conditions

Handle netfs pages that the vmscan algorithm wants to evict from the pagecache under OOM conditions, but that are waiting for write to the cache. Under these conditions, vmscan calls the releasepage() function of the netfs, asking if a page can be discarded.

[...]

This commit breaks compiling 9p in 2.6.32-rc8-git2:

CC [M] fs/9p/cache.o
fs/9p/cache.c: In function '__v9fs_fscache_release_page':
fs/9p/cache.c:346: error: 'vnode' undeclared (first use in this function) fs/9p/cache.c:346: error: (Each undeclared identifier is reported only once fs/9p/cache.c:346: error: for each function it appears in.) make[2]: *** [fs/9p/cache.o] Error 1

Quoted 13 lines
fs/9p/cache.c +0 -5
index 51c94e2..bcc5357 100644
@@ -343,18 +343,7 @@ int __v9fs_fscache_release_page(struct page *page, gfp_t gfp)
 
 	BUG_ON(!vcookie->fscache);
 
-	if (PageFsCache(page)) {
-		if (fscache_check_page_write(vcookie->fscache, page)) {
-			if (!(gfp & __GFP_WAIT))
-				return 0;
-			fscache_wait_on_page_write(vcookie->fscache, page);

fs/9p/cache.c int __v9fs_fscache_release_page(struct page *page, gfp_t gfp) · line 348

Quoted 10 lines
fs/9p/cache.c +1 -7
-		}
-
-		fscache_uncache_page(vcookie->fscache, page);
-		ClearPageFsCache(page);
-	}
-
-	return 1;
+	return fscache_maybe_release_page(vnode->cache, page, gfp);
 }
 

[...]

Regards
Stefan Lippers-Hollmann

9p: fix build failure introduced by 201a15428bd54f83eccec8b7c64a04b8f9431204

CC [M] fs/9p/cache.o
fs/9p/cache.c: In function '__v9fs_fscache_release_page':
fs/9p/cache.c:346: error: 'vnode' undeclared (first use in this function) fs/9p/cache.c:346: error: (Each undeclared identifier is reported only once fs/9p/cache.c:346: error: for each function it appears in.) make[2]: *** [fs/9p/cache.o] Error 1

---
build tested only.

 fs/9p/cache.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/9p/cache.c +1 -1
index bcc5357..e777961 100644
@@ -343,7 +343,7 @@ int __v9fs_fscache_release_page(struct page *page, gfp_t gfp)
 
 	BUG_ON(!vcookie->fscache);
 
-	return fscache_maybe_release_page(vnode->cache, page, gfp);
+	return fscache_maybe_release_page(vcookie->fscache, page, gfp);
 }
 
 void __v9fs_fscache_invalidate_page(struct page *page)
#2 lore raw
Quoted 1 line · Stefan Lippers-Hollmann

This commit breaks compiling 9p in 2.6.32-rc8-git2:

Yep. I have two other patches for that so far.

David