]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/internal.h
Pull osi into release branch
[linux-2.6-omap-h63xx.git] / fs / nfs / internal.h
index a28f6ce2e131e4df24e40223ebdc36d7d986da6f..76cf55d57101ab5b2cf3acfac638684e27bb6543 100644 (file)
@@ -107,10 +107,6 @@ extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus);
 /* nfs4proc.c */
 #ifdef CONFIG_NFS_V4
 extern struct rpc_procinfo nfs4_procedures[];
-
-extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
-                                 struct nfs4_fs_locations *fs_locations,
-                                 struct page *page);
 #endif
 
 /* dir.c */
@@ -187,9 +183,9 @@ unsigned long nfs_block_bits(unsigned long bsize, unsigned char *nrbitsp)
 /*
  * Calculate the number of 512byte blocks used.
  */
-static inline unsigned long nfs_calc_block_size(u64 tsize)
+static inline blkcnt_t nfs_calc_block_size(u64 tsize)
 {
-       loff_t used = (tsize + 511) >> 9;
+       blkcnt_t used = (tsize + 511) >> 9;
        return (used > ULONG_MAX) ? ULONG_MAX : used;
 }
 
@@ -235,3 +231,15 @@ unsigned int nfs_page_length(struct page *page)
        }
        return 0;
 }
+
+/*
+ * Determine the number of pages in an array of length 'len' and
+ * with a base offset of 'base'
+ */
+static inline
+unsigned int nfs_page_array_len(unsigned int base, size_t len)
+{
+       return ((unsigned long)len + (unsigned long)base +
+               PAGE_SIZE - 1) >> PAGE_SHIFT;
+}
+