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

TOMOYO Linux Cross Reference
Linux/include/linux/nfs.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 ] ~

Diff markup

Differences between /include/linux/nfs.h (Version linux-6.11.5) and /include/linux/nfs.h (Version linux-4.15.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * NFS protocol definitions                         3  * NFS protocol definitions
  4  *                                                  4  *
  5  * This file contains constants mostly for Ver      5  * This file contains constants mostly for Version 2 of the protocol,
  6  * but also has a couple of NFSv3 bits in (not      6  * but also has a couple of NFSv3 bits in (notably the error codes).
  7  */                                                 7  */
  8 #ifndef _LINUX_NFS_H                                8 #ifndef _LINUX_NFS_H
  9 #define _LINUX_NFS_H                                9 #define _LINUX_NFS_H
 10                                                    10 
 11 #include <linux/sunrpc/msg_prot.h>                 11 #include <linux/sunrpc/msg_prot.h>
 12 #include <linux/string.h>                          12 #include <linux/string.h>
 13 #include <linux/crc32.h>                       << 
 14 #include <uapi/linux/nfs.h>                        13 #include <uapi/linux/nfs.h>
 15                                                    14 
 16 /*                                                 15 /*
 17  * This is the kernel NFS client file handle r     16  * This is the kernel NFS client file handle representation
 18  */                                                17  */
 19 #define NFS_MAXFHSIZE           128                18 #define NFS_MAXFHSIZE           128
 20 struct nfs_fh {                                    19 struct nfs_fh {
 21         unsigned short          size;              20         unsigned short          size;
 22         unsigned char           data[NFS_MAXFH     21         unsigned char           data[NFS_MAXFHSIZE];
 23 };                                                 22 };
 24                                                    23 
 25 /*                                                 24 /*
 26  * Returns a zero iff the size and data fields     25  * Returns a zero iff the size and data fields match.
 27  * Checks only "size" bytes in the data field.     26  * Checks only "size" bytes in the data field.
 28  */                                                27  */
 29 static inline int nfs_compare_fh(const struct      28 static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
 30 {                                                  29 {
 31         return a->size != b->size || memcmp(a-     30         return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
 32 }                                                  31 }
 33                                                    32 
 34 static inline void nfs_copy_fh(struct nfs_fh *     33 static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
 35 {                                                  34 {
 36         target->size = source->size;               35         target->size = source->size;
 37         memcpy(target->data, source->data, sou     36         memcpy(target->data, source->data, source->size);
 38 }                                                  37 }
 39                                                    38 
                                                   >>  39 
                                                   >>  40 /*
                                                   >>  41  * This is really a general kernel constant, but since nothing like
                                                   >>  42  * this is defined in the kernel headers, I have to do it here.
                                                   >>  43  */
                                                   >>  44 #define NFS_OFFSET_MAX          ((__s64)((~(__u64)0) >> 1))
                                                   >>  45 
                                                   >>  46 
 40 enum nfs3_stable_how {                             47 enum nfs3_stable_how {
 41         NFS_UNSTABLE = 0,                          48         NFS_UNSTABLE = 0,
 42         NFS_DATA_SYNC = 1,                         49         NFS_DATA_SYNC = 1,
 43         NFS_FILE_SYNC = 2,                         50         NFS_FILE_SYNC = 2,
 44                                                    51 
 45         /* used by direct.c to mark verf as in     52         /* used by direct.c to mark verf as invalid */
 46         NFS_INVALID_STABLE_HOW = -1                53         NFS_INVALID_STABLE_HOW = -1
 47 };                                                 54 };
 48                                                << 
 49 #ifdef CONFIG_CRC32                            << 
 50 /**                                            << 
 51  * nfs_fhandle_hash - calculate the crc32 hash << 
 52  * @fh - pointer to filehandle                 << 
 53  *                                             << 
 54  * returns a crc32 hash for the filehandle tha << 
 55  * the one displayed by "wireshark".           << 
 56  */                                            << 
 57 static inline u32 nfs_fhandle_hash(const struc << 
 58 {                                              << 
 59         return ~crc32_le(0xFFFFFFFF, &fh->data << 
 60 }                                              << 
 61 #else /* CONFIG_CRC32 */                       << 
 62 static inline u32 nfs_fhandle_hash(const struc << 
 63 {                                              << 
 64         return 0;                              << 
 65 }                                              << 
 66 #endif /* CONFIG_CRC32 */                      << 
 67 #endif /* _LINUX_NFS_H */                          55 #endif /* _LINUX_NFS_H */
 68                                                    56 

~ [ 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