- fs-cache-make-kafs-use-fs-cache-12.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     FS-Cache: Make kAFS use FS-Cache [try #12]
has been removed from the -mm tree.  Its filename was
     fs-cache-make-kafs-use-fs-cache-12.patch

This patch was dropped because it is obsolete

------------------------------------------------------
Subject: FS-Cache: Make kAFS use FS-Cache [try #12]
From: David Howells <dhowells@xxxxxxxxxx>

The attached patch makes the kAFS filesystem in fs/afs/ use FS-Cache, and
through it any attached caches.  The kAFS filesystem will use caching
automatically if it's available.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/afs/file.c  |   60 +++++++++++++++++++++--------------------------
 fs/afs/vnode.c |    2 +
 2 files changed, 30 insertions(+), 32 deletions(-)

diff -puN fs/afs/file.c~fs-cache-make-kafs-use-fs-cache-12 fs/afs/file.c
--- a/fs/afs/file.c~fs-cache-make-kafs-use-fs-cache-12
+++ a/fs/afs/file.c
@@ -83,7 +83,7 @@ static int afs_file_mmap(struct file *fi
 	file_accessed(file);
 	vma->vm_ops = &afs_fs_vm_operations;
 	return 0;
-} /* end afs_file_mmap() */
+}
 
 /*****************************************************************************/
 /*
@@ -101,8 +101,7 @@ static void afs_file_readpage_read_compl
 	if (!error)
 		SetPageUptodate(page);
 	unlock_page(page);
-
-} /* end afs_file_readpage_read_complete() */
+}
 #endif
 
 /*****************************************************************************/
@@ -119,8 +118,7 @@ static void afs_file_readpage_write_comp
 	/* note that the page has been written to the cache and can now be
 	 * modified */
 	end_page_fs_misc(page);
-
-} /* end afs_file_readpage_write_complete() */
+}
 #endif
 
 /*****************************************************************************/
@@ -230,8 +228,7 @@ static int afs_file_readpage(struct file
 
 	_leave(" = %d", ret);
 	return ret;
-
-} /* end afs_file_readpage() */
+}
 
 /*****************************************************************************/
 /*
@@ -242,10 +239,6 @@ static int afs_file_readpages(struct fil
 			      struct list_head *pages, unsigned nr_pages)
 {
 	struct afs_vnode *vnode;
-#if 0
-	struct pagevec lru_pvec;
-	unsigned page_idx;
-#endif
 	int ret = 0;
 
 	_enter(",{%lu},,%d", mapping->host->i_ino, nr_pages);
@@ -290,13 +283,14 @@ static int afs_file_readpages(struct fil
 
 	_leave(" = %d [netting]", ret);
 	return ret;
-
-} /* end afs_file_readpages() */
+}
 #endif
 
 /*****************************************************************************/
 /*
  * invalidate part or all of a page
+ * - release a page and clean up its private data if offset is 0 (indicating
+ *   the entire page)
  */
 static void afs_file_invalidatepage(struct page *page, unsigned long offset)
 {
@@ -305,38 +299,41 @@ static void afs_file_invalidatepage(stru
 	BUG_ON(!PageLocked(page));
 
 	if (PagePrivate(page)) {
-		/* We release buffers only if the entire page is being
-		 * invalidated.
-		 * The get_block cached value has been unconditionally
-		 * invalidated, so real IO is not possible anymore.
-		 */
-		if (offset == 0 && !PageWriteback(page))
-			page->mapping->a_ops->releasepage(page, 0);
+		/* we clean up only if the entire page is being invalidated */
+		if (offset == 0 && !PageWriteback(page)) {
+#ifdef CONFIG_AFS_FSCACHE
+			wait_on_page_fs_misc(page);
+			fscache_uncache_page(
+				AFS_FS_I(page->mapping->host)->cache, page);
+			ClearPagePrivate(page);
+#endif
+		}
 	}
 
 	_leave("");
-
-} /* end afs_file_invalidatepage() */
+}
 
 /*****************************************************************************/
 /*
- * release a page and cleanup its private data
+ * release a page and clean up its private state if it's not busy
+ * - return true if the page can now be released, false if not
  */
 static int afs_file_releasepage(struct page *page, gfp_t gfp_flags)
 {
 	_enter("{%lu},%x", page->index, gfp_flags);
 
-#ifdef CONFIG_AFS_FSCACHE
-	wait_on_page_fs_misc(page);
+	/* deny */
+	if (PageFsMisc(page)) {
+		_leave(" = F");
+		return 0;
+	}
+
 	fscache_uncache_page(AFS_FS_I(page->mapping->host)->cache, page);
-	ClearPagePrivate(page);
-#endif
 
 	/* indicate that the page can be released */
-	_leave(" = 1");
+	_leave(" = T");
 	return 1;
-
-} /* end afs_file_releasepage() */
+}
 
 /*****************************************************************************/
 /*
@@ -348,6 +345,5 @@ static int afs_file_page_mkwrite(struct 
 {
 	wait_on_page_fs_misc(page);
 	return 0;
-
-} /* end afs_file_page_mkwrite() */
+}
 #endif
diff -puN fs/afs/vnode.c~fs-cache-make-kafs-use-fs-cache-12 fs/afs/vnode.c
--- a/fs/afs/vnode.c~fs-cache-make-kafs-use-fs-cache-12
+++ a/fs/afs/vnode.c
@@ -508,6 +508,7 @@ static void afs_vnode_cache_mark_pages_c
 	}
 
 } /* end afs_vnode_cache_mark_pages_cached() */
+#endif
 
 /*****************************************************************************/
 /*
@@ -517,6 +518,7 @@ static void afs_vnode_cache_mark_pages_c
  * - the netfs should use this to clean up any markers indicating cached pages
  * - this is mandatory for any object that may have data
  */
+#ifdef CONFIG_AFS_FSCACHE
 static void afs_vnode_cache_now_uncached(void *cookie_netfs_data)
 {
 	struct afs_vnode *vnode = cookie_netfs_data;
_

Patches currently in -mm which might be from dhowells@xxxxxxxxxx are

origin.patch
nfs-represent-64-bit-fileids-as-64-bit-inode-numbers-on-32-bit-systems.patch
security-keys-user-kmemdup.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-fix.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-vs-git-cryptodev.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-ppc-fix.patch
log2-alter-roundup_pow_of_two-so-that-it-can-use-a-ilog2-on-a-constant.patch
log2-alter-get_order-so-that-it-can-make-use-of-ilog2-on-a-constant.patch
log2-provide-ilog2-fallbacks-for-powerpc.patch
fs-cache-make-kafs-use-fs-cache-12.patch
fs-cache-make-kafs-use-fs-cache-12-fix.patch
fs-cache-make-kafs-use-fs-cache-kconfig-fix.patch
fs-cache-make-kafs-use-fs-cache-vs-streamline-generic_file_-interfaces-and-filemap.patch
nfs-use-local-caching.patch
nfs-use-local-caching-12.patch
nfs-use-local-caching-12-fix.patch
nfs-use-local-caching-kconfig-fix.patch
nfs-use-local-caching-configh.patch
add-missing-page_copy-export-for-ppc-and-powerpc.patch
fs-cache-cachefiles-ia64-missing-copy_page-export.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-fscache-fix-gfp_t-sparse-annotations.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-warning-fixes.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-cachefiles_write_page-shouldnt-indicate-error-twice.patch
fscache-kconfig-tidying.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-log2-fix.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-handle-enospc-on-create-mkdir-better.patch
fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-inode-count-maintenance.patch
afs-amend-the-afs-configuration-options.patch
reiser4-get_sb_dev-fix.patch
mutex-subsystem-synchro-test-module.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux