linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] NFS: Fix up warnings
@ 2006-08-21 12:50 David Howells
  2006-08-21 12:50 ` [PATCH 2/4] FS-Cache: AFS: Fix up AFS filesystem caching patch David Howells
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: David Howells @ 2006-08-21 12:50 UTC (permalink / raw)
  To: akpm, trond.myklebust, michal.k.k.piotrowski, maciej.rutecki,
	bunk
  Cc: linux-fsdevel, linux-kernel, dhowells

Fix up warnings from compiling on ppc64.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 fs/nfs/client.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index dd4ff23..8620e14 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -839,7 +839,9 @@ struct nfs_server *nfs_create_server(con
 	}
 	memcpy(&server->fsid, &fattr.fsid, sizeof(server->fsid));
 
-	dprintk("Server FSID: %llx:%llx\n", server->fsid.major, server->fsid.minor);
+	dprintk("Server FSID: %llx:%llx\n",
+		(unsigned long long) server->fsid.major,
+		(unsigned long long) server->fsid.minor);
 
 	BUG_ON(!server->nfs_client);
 	BUG_ON(!server->nfs_client->rpc_ops);
@@ -1005,7 +1007,9 @@ struct nfs_server *nfs4_create_server(co
 	if (error < 0)
 		goto error;
 
-	dprintk("Server FSID: %llx:%llx\n", server->fsid.major, server->fsid.minor);
+	dprintk("Server FSID: %llx:%llx\n",
+		(unsigned long long) server->fsid.major,
+		(unsigned long long) server->fsid.minor);
 	dprintk("Mount FH: %d\n", mntfh->size);
 
 	error = nfs_probe_fsinfo(server, mntfh, &fattr);
@@ -1077,7 +1081,8 @@ struct nfs_server *nfs4_create_referral_
 		goto error;
 
 	dprintk("Referral FSID: %llx:%llx\n",
-		server->fsid.major, server->fsid.minor);
+		(unsigned long long) server->fsid.major,
+		(unsigned long long) server->fsid.minor);
 
 	spin_lock(&nfs_client_lock);
 	list_add_tail(&server->client_link, &server->nfs_client->cl_superblocks);
@@ -1109,7 +1114,8 @@ struct nfs_server *nfs_clone_server(stru
 	int error;
 
 	dprintk("--> nfs_clone_server(,%llx:%llx,)\n",
-		fattr->fsid.major, fattr->fsid.minor);
+		(unsigned long long) fattr->fsid.major,
+		(unsigned long long) fattr->fsid.minor);
 
 	server = nfs_alloc_server();
 	if (!server)
@@ -1134,7 +1140,8 @@ struct nfs_server *nfs_clone_server(stru
 		goto out_free_server;
 
 	dprintk("Cloned FSID: %llx:%llx\n",
-		server->fsid.major, server->fsid.minor);
+		(unsigned long long) server->fsid.major,
+		(unsigned long long) server->fsid.minor);
 
 	error = nfs_start_lockd(server);
 	if (error < 0)
@@ -1378,7 +1385,8 @@ static int nfs_volume_list_show(struct s
 		 MAJOR(server->s_dev), MINOR(server->s_dev));
 
 	snprintf(fsid, 17, "%llx:%llx",
-		 server->fsid.major, server->fsid.minor);
+		 (unsigned long long) server->fsid.major,
+		 (unsigned long long) server->fsid.minor);
 
 	seq_printf(m, "v%d %02x%02x%02x%02x %4hx %-7s %-17s %s\n",
 		   clp->cl_nfsversion,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/4] FS-Cache: AFS: Fix up AFS filesystem caching patch
  2006-08-21 12:50 [PATCH 1/4] NFS: Fix up warnings David Howells
@ 2006-08-21 12:50 ` David Howells
  2006-08-21 12:50 ` [PATCH 3/4] NFS: Fix up " David Howells
  2006-08-21 12:50 ` [PATCH 4/4] FS-Cache: CacheFiles: Fix up warnings David Howells
  2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2006-08-21 12:50 UTC (permalink / raw)
  To: akpm, trond.myklebust, michal.k.k.piotrowski, maciej.rutecki,
	bunk
  Cc: linux-fsdevel, linux-kernel, dhowells

Fix up the AFS filesystem caching patch for when caching is disabled.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 fs/afs/file.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/afs/file.c b/fs/afs/file.c
index 93f2cc0..db441c5 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -323,13 +323,15 @@ static int afs_file_releasepage(struct p
 {
 	_enter("{%lu},%x", page->index, gfp_flags);
 
-	/* deny */
+#ifdef CONFIG_AFS_FSCACHE
+	/* deny if page is being written to the cache */
 	if (PageFsMisc(page)) {
 		_leave(" = F");
 		return 0;
 	}
 
 	fscache_uncache_page(AFS_FS_I(page->mapping->host)->cache, page);
+#endif
 
 	/* indicate that the page can be released */
 	_leave(" = T");

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/4] NFS: Fix up filesystem caching patch
  2006-08-21 12:50 [PATCH 1/4] NFS: Fix up warnings David Howells
  2006-08-21 12:50 ` [PATCH 2/4] FS-Cache: AFS: Fix up AFS filesystem caching patch David Howells
@ 2006-08-21 12:50 ` David Howells
  2006-08-21 12:50 ` [PATCH 4/4] FS-Cache: CacheFiles: Fix up warnings David Howells
  2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2006-08-21 12:50 UTC (permalink / raw)
  To: akpm, trond.myklebust, michal.k.k.piotrowski, maciej.rutecki,
	bunk
  Cc: linux-fsdevel, linux-kernel, dhowells

Fix up the NFS filesystem caching patch for when caching is disabled.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 fs/nfs/fscache.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index 48a993a..8899f16 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -446,7 +446,10 @@ static inline void nfs_fscache_zap_fh_co
 static inline void nfs_fscache_renew_fh_cookie(struct nfs_server *server, struct nfs_inode *nfsi) {}
 static inline void nfs_fscache_disable_fh_cookie(struct inode *inode) {}
 static inline void nfs_fscache_install_vm_ops(struct inode *inode, struct vm_area_struct *vma) {}
-static inline void nfs_fscache_release_page(struct page *page) {}
+static inline int nfs_fscache_release_page(struct page *page)
+{
+	return 1; /* True: may release page */
+}
 static inline void nfs_fscache_invalidate_page(struct page *page,
 					       struct inode *inode,
 					       unsigned long offset)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 4/4] FS-Cache: CacheFiles: Fix up warnings
  2006-08-21 12:50 [PATCH 1/4] NFS: Fix up warnings David Howells
  2006-08-21 12:50 ` [PATCH 2/4] FS-Cache: AFS: Fix up AFS filesystem caching patch David Howells
  2006-08-21 12:50 ` [PATCH 3/4] NFS: Fix up " David Howells
@ 2006-08-21 12:50 ` David Howells
  2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2006-08-21 12:50 UTC (permalink / raw)
  To: akpm, trond.myklebust, michal.k.k.piotrowski, maciej.rutecki,
	bunk
  Cc: linux-fsdevel, linux-kernel, dhowells

Fix up warnings in the CacheFiles patch.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 fs/cachefiles/cf-bind.c      |   10 ++++++----
 fs/cachefiles/cf-interface.c |   15 +++++++++++----
 fs/cachefiles/cf-proc.c      |    6 +++---
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/fs/cachefiles/cf-bind.c b/fs/cachefiles/cf-bind.c
index d8cb4c3..5325719 100644
--- a/fs/cachefiles/cf-bind.c
+++ b/fs/cachefiles/cf-bind.c
@@ -173,7 +173,9 @@ static int cachefiles_proc_add_cache(str
 	_debug("blksize %u (shift %u)",
 	       cache->bsize, cache->bshift);
 
-	_debug("size %llu, avail %llu", stats.f_blocks, stats.f_bavail);
+	_debug("size %llu, avail %llu",
+	       (unsigned long long) stats.f_blocks,
+	       (unsigned long long) stats.f_bavail);
 
 	/* set up caching limits */
 	stats.f_blocks >>= cache->bshift;
@@ -183,9 +185,9 @@ static int cachefiles_proc_add_cache(str
 	cache->brun  = stats.f_blocks * cache->brun_percent;
 
 	_debug("limits {%llu,%llu,%llu}",
-	       cache->brun,
-	       cache->bcull,
-	       cache->bstop);
+	       (unsigned long long) cache->brun,
+	       (unsigned long long) cache->bcull,
+	       (unsigned long long) cache->bstop);
 
 	/* get the cache directory and check its type */
 	cachedir = cachefiles_get_directory(cache, root, "cache");
diff --git a/fs/cachefiles/cf-interface.c b/fs/cachefiles/cf-interface.c
index b5ca30f..6be3d98 100644
--- a/fs/cachefiles/cf-interface.c
+++ b/fs/cachefiles/cf-interface.c
@@ -323,7 +323,10 @@ int cachefiles_has_space(struct cachefil
 	int ret;
 
 	_enter("{%llu,%llu,%llu},%d",
-	       cache->brun, cache->bcull, cache->bstop,  nr);
+	       (unsigned long long) cache->brun,
+	       (unsigned long long) cache->bcull,
+	       (unsigned long long) cache->bstop,
+	       nr);
 
 	/* find out how many pages of blockdev are available */
 	memset(&stats, 0, sizeof(stats));
@@ -337,7 +340,7 @@ int cachefiles_has_space(struct cachefil
 
 	stats.f_bavail >>= cache->bshift;
 
-	_debug("avail %llu", stats.f_bavail);
+	_debug("avail %llu", (unsigned long long) stats.f_bavail);
 
 	/* see if there is sufficient space */
 	stats.f_bavail -= nr;
@@ -715,7 +718,9 @@ static int cachefiles_read_or_alloc_page
 	block0 <<= shift;
 
 	block = inode->i_mapping->a_ops->bmap(inode->i_mapping, block0);
-	_debug("%llx -> %llx", block0, block);
+	_debug("%llx -> %llx",
+	       (unsigned long long) block0,
+	       (unsigned long long) block);
 
 	if (block) {
 		/* submit the apparently valid page to the backing fs to be
@@ -1040,7 +1045,9 @@ static int cachefiles_read_or_alloc_page
 
 		block = inode->i_mapping->a_ops->bmap(inode->i_mapping,
 						      block0);
-		_debug("%llx -> %llx", block0, block);
+		_debug("%llx -> %llx",
+		       (unsigned long long) block0,
+		       (unsigned long long) block);
 
 		if (block) {
 			/* we have data - add it to the list to give to the
diff --git a/fs/cachefiles/cf-proc.c b/fs/cachefiles/cf-proc.c
index a4a056b..cf246a3 100644
--- a/fs/cachefiles/cf-proc.c
+++ b/fs/cachefiles/cf-proc.c
@@ -162,9 +162,9 @@ static ssize_t cachefiles_proc_read(stru
 		     " bcull=%llx"
 		     " bstop=%llx",
 		     test_bit(CACHEFILES_CULLING, &cache->flags) ? '1' : '0',
-		     cache->brun,
-		     cache->bcull,
-		     cache->bstop
+		     (unsigned long long) cache->brun,
+		     (unsigned long long) cache->bcull,
+		     (unsigned long long) cache->bstop
 		     );
 
 	if (n > buflen)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-21 12:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 12:50 [PATCH 1/4] NFS: Fix up warnings David Howells
2006-08-21 12:50 ` [PATCH 2/4] FS-Cache: AFS: Fix up AFS filesystem caching patch David Howells
2006-08-21 12:50 ` [PATCH 3/4] NFS: Fix up " David Howells
2006-08-21 12:50 ` [PATCH 4/4] FS-Cache: CacheFiles: Fix up warnings David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).