~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/nfsd/pnfs.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _FS_NFSD_PNFS_H
  3 #define _FS_NFSD_PNFS_H 1
  4 
  5 #ifdef CONFIG_NFSD_V4
  6 #include <linux/exportfs.h>
  7 #include <linux/nfsd/export.h>
  8 
  9 #include "state.h"
 10 #include "xdr4.h"
 11 
 12 struct xdr_stream;
 13 
 14 struct nfsd4_deviceid_map {
 15         struct list_head        hash;
 16         u64                     idx;
 17         int                     fsid_type;
 18         u32                     fsid[];
 19 };
 20 
 21 struct nfsd4_layout_ops {
 22         u32             notify_types;
 23         bool            disable_recalls;
 24 
 25         __be32 (*proc_getdeviceinfo)(struct super_block *sb,
 26                         struct svc_rqst *rqstp,
 27                         struct nfs4_client *clp,
 28                         struct nfsd4_getdeviceinfo *gdevp);
 29         __be32 (*encode_getdeviceinfo)(struct xdr_stream *xdr,
 30                         const struct nfsd4_getdeviceinfo *gdevp);
 31 
 32         __be32 (*proc_layoutget)(struct inode *, const struct svc_fh *fhp,
 33                         struct nfsd4_layoutget *lgp);
 34         __be32 (*encode_layoutget)(struct xdr_stream *xdr,
 35                         const struct nfsd4_layoutget *lgp);
 36 
 37         __be32 (*proc_layoutcommit)(struct inode *inode,
 38                         struct nfsd4_layoutcommit *lcp);
 39 
 40         void (*fence_client)(struct nfs4_layout_stateid *ls,
 41                              struct nfsd_file *file);
 42 };
 43 
 44 extern const struct nfsd4_layout_ops *nfsd4_layout_ops[];
 45 #ifdef CONFIG_NFSD_BLOCKLAYOUT
 46 extern const struct nfsd4_layout_ops bl_layout_ops;
 47 #endif
 48 #ifdef CONFIG_NFSD_SCSILAYOUT
 49 extern const struct nfsd4_layout_ops scsi_layout_ops;
 50 #endif
 51 #ifdef CONFIG_NFSD_FLEXFILELAYOUT
 52 extern const struct nfsd4_layout_ops ff_layout_ops;
 53 #endif
 54 
 55 __be32 nfsd4_preprocess_layout_stateid(struct svc_rqst *rqstp,
 56                 struct nfsd4_compound_state *cstate, stateid_t *stateid,
 57                 bool create, u32 layout_type, struct nfs4_layout_stateid **lsp);
 58 __be32 nfsd4_insert_layout(struct nfsd4_layoutget *lgp,
 59                 struct nfs4_layout_stateid *ls);
 60 __be32 nfsd4_return_file_layouts(struct svc_rqst *rqstp,
 61                 struct nfsd4_compound_state *cstate,
 62                 struct nfsd4_layoutreturn *lrp);
 63 __be32 nfsd4_return_client_layouts(struct svc_rqst *rqstp,
 64                 struct nfsd4_compound_state *cstate,
 65                 struct nfsd4_layoutreturn *lrp);
 66 int nfsd4_set_deviceid(struct nfsd4_deviceid *id, const struct svc_fh *fhp,
 67                 u32 device_generation);
 68 struct nfsd4_deviceid_map *nfsd4_find_devid_map(int idx);
 69 #endif /* CONFIG_NFSD_V4 */
 70 
 71 #ifdef CONFIG_NFSD_PNFS
 72 void nfsd4_setup_layout_type(struct svc_export *exp);
 73 void nfsd4_return_all_client_layouts(struct nfs4_client *);
 74 void nfsd4_return_all_file_layouts(struct nfs4_client *clp,
 75                 struct nfs4_file *fp);
 76 void nfsd4_close_layout(struct nfs4_layout_stateid *ls);
 77 int nfsd4_init_pnfs(void);
 78 void nfsd4_exit_pnfs(void);
 79 #else
 80 struct nfs4_client;
 81 struct nfs4_file;
 82 struct nfs4_layout_stateid;
 83 
 84 static inline void nfsd4_setup_layout_type(struct svc_export *exp)
 85 {
 86 }
 87 
 88 static inline void nfsd4_return_all_client_layouts(struct nfs4_client *clp)
 89 {
 90 }
 91 static inline void nfsd4_return_all_file_layouts(struct nfs4_client *clp,
 92                 struct nfs4_file *fp)
 93 {
 94 }
 95 static inline void nfsd4_close_layout(struct nfs4_layout_stateid *ls)
 96 {
 97 }
 98 static inline void nfsd4_exit_pnfs(void)
 99 {
100 }
101 static inline int nfsd4_init_pnfs(void)
102 {
103         return 0;
104 }
105 #endif /* CONFIG_NFSD_PNFS */
106 #endif /* _FS_NFSD_PNFS_H */
107 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php