^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* NFS filesystem cache interface definitions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Written by David Howells (dhowells@redhat.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifndef _NFS_FSCACHE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define _NFS_FSCACHE_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/nfs_fs.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/nfs_mount.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/nfs4_mount.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/fscache.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #ifdef CONFIG_NFS_FSCACHE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * set of NFS FS-Cache objects that form a superblock key
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) struct nfs_fscache_key {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) struct rb_node node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct nfs_client *nfs_client; /* the server */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) /* the elements of the unique key - as used by nfs_compare_super() and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * nfs_compare_mount_options() to distinguish superblocks */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) unsigned long s_flags; /* various flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * (& NFS_MS_MASK) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) } super;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) struct nfs_fsid fsid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) unsigned int rsize; /* read size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) unsigned int wsize; /* write size */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) unsigned int acregmin; /* attr cache timeouts */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) unsigned int acregmax;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) unsigned int acdirmin;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) unsigned int acdirmax;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) } nfs_server;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) rpc_authflavor_t au_flavor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) } rpc_auth;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) /* uniquifier - can be used if nfs_server.flags includes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * NFS_MOUNT_UNSHARED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) u8 uniq_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) char uniquifier[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) } key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) * Definition of the auxiliary data attached to NFS inode storage objects
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) * within the cache.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) * The contents of this struct are recorded in the on-disk local cache in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) * auxiliary data attached to the data storage object backing an inode. This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) * permits coherency to be managed when a new inode binds to an already extant
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) * cache object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) struct nfs_fscache_inode_auxdata {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) s64 mtime_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) s64 mtime_nsec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) s64 ctime_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) s64 ctime_nsec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) u64 change_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) * fscache-index.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) extern struct fscache_netfs nfs_fscache_netfs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) extern const struct fscache_cookie_def nfs_fscache_server_index_def;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) extern const struct fscache_cookie_def nfs_fscache_super_index_def;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) extern const struct fscache_cookie_def nfs_fscache_inode_object_def;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) extern int nfs_fscache_register(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) extern void nfs_fscache_unregister(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * fscache.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) extern void nfs_fscache_get_client_cookie(struct nfs_client *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) extern void nfs_fscache_release_client_cookie(struct nfs_client *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) extern void nfs_fscache_get_super_cookie(struct super_block *, const char *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) extern void nfs_fscache_release_super_cookie(struct super_block *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) extern void nfs_fscache_init_inode(struct inode *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) extern void nfs_fscache_clear_inode(struct inode *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) extern void nfs_fscache_open_file(struct inode *, struct file *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) extern void __nfs_fscache_invalidate_page(struct page *, struct inode *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) extern int nfs_fscache_release_page(struct page *, gfp_t);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) extern int __nfs_readpage_from_fscache(struct nfs_open_context *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) struct inode *, struct page *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) extern int __nfs_readpages_from_fscache(struct nfs_open_context *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) struct inode *, struct address_space *,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) struct list_head *, unsigned *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) extern void __nfs_readpage_to_fscache(struct inode *, struct page *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) * wait for a page to complete writing to the cache
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) static inline void nfs_fscache_wait_on_page_write(struct nfs_inode *nfsi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) struct page *page)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) if (PageFsCache(page))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) fscache_wait_on_page_write(nfsi->fscache, page);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) * release the caching state associated with a page if undergoing complete page
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) * invalidation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) static inline void nfs_fscache_invalidate_page(struct page *page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) struct inode *inode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) if (PageFsCache(page))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) __nfs_fscache_invalidate_page(page, inode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) * Retrieve a page from an inode data storage object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) static inline int nfs_readpage_from_fscache(struct nfs_open_context *ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) struct page *page)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) if (NFS_I(inode)->fscache)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) return __nfs_readpage_from_fscache(ctx, inode, page);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) return -ENOBUFS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) * Retrieve a set of pages from an inode data storage object.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) struct address_space *mapping,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) struct list_head *pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) unsigned *nr_pages)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) if (NFS_I(inode)->fscache)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) return __nfs_readpages_from_fscache(ctx, inode, mapping, pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) nr_pages);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) return -ENOBUFS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) * Store a page newly fetched from the server in an inode data storage object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) * in the cache.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) static inline void nfs_readpage_to_fscache(struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) struct page *page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) int sync)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) if (PageFsCache(page))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) __nfs_readpage_to_fscache(inode, page, sync);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) * Invalidate the contents of fscache for this inode. This will not sleep.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) static inline void nfs_fscache_invalidate(struct inode *inode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) fscache_invalidate(NFS_I(inode)->fscache);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) * Wait for an object to finish being invalidated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) static inline void nfs_fscache_wait_on_invalidate(struct inode *inode)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) fscache_wait_on_invalidate(NFS_I(inode)->fscache);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) * indicate the client caching state as readable text
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) static inline const char *nfs_server_fscache_state(struct nfs_server *server)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) if (server->fscache)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) return "yes";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) return "no ";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #else /* CONFIG_NFS_FSCACHE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) static inline int nfs_fscache_register(void) { return 0; }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) static inline void nfs_fscache_unregister(void) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) static inline void nfs_fscache_get_client_cookie(struct nfs_client *clp) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) static inline void nfs_fscache_release_client_cookie(struct nfs_client *clp) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) static inline void nfs_fscache_release_super_cookie(struct super_block *sb) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) static inline void nfs_fscache_init_inode(struct inode *inode) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) static inline void nfs_fscache_clear_inode(struct inode *inode) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) static inline void nfs_fscache_open_file(struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) struct file *filp) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) return 1; /* True: may release page */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static inline void nfs_fscache_invalidate_page(struct page *page,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) struct inode *inode) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) static inline void nfs_fscache_wait_on_page_write(struct nfs_inode *nfsi,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) struct page *page) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) static inline int nfs_readpage_from_fscache(struct nfs_open_context *ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) struct page *page)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) return -ENOBUFS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) struct address_space *mapping,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) struct list_head *pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) unsigned *nr_pages)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) return -ENOBUFS;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) static inline void nfs_readpage_to_fscache(struct inode *inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) struct page *page, int sync) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) static inline void nfs_fscache_invalidate(struct inode *inode) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) static inline void nfs_fscache_wait_on_invalidate(struct inode *inode) {}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) static inline const char *nfs_server_fscache_state(struct nfs_server *server)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) return "no ";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) #endif /* CONFIG_NFS_FSCACHE */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) #endif /* _NFS_FSCACHE_H */