cifs_fs_sb.h 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* SPDX-License-Identifier: LGPL-2.1 */
  2. /*
  3. *
  4. * Copyright (c) International Business Machines Corp., 2002,2004
  5. * Author(s): Steve French ([email protected])
  6. *
  7. */
  8. #include <linux/rbtree.h>
  9. #ifndef _CIFS_FS_SB_H
  10. #define _CIFS_FS_SB_H
  11. #include <linux/backing-dev.h>
  12. #define CIFS_MOUNT_NO_PERM 1 /* do not do client vfs_perm check */
  13. #define CIFS_MOUNT_SET_UID 2 /* set current's euid in create etc. */
  14. #define CIFS_MOUNT_SERVER_INUM 4 /* inode numbers from uniqueid from server */
  15. #define CIFS_MOUNT_DIRECT_IO 8 /* do not write nor read through page cache */
  16. #define CIFS_MOUNT_NO_XATTR 0x10 /* if set - disable xattr support */
  17. #define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames */
  18. #define CIFS_MOUNT_POSIX_PATHS 0x40 /* Negotiate posix pathnames if possible*/
  19. #define CIFS_MOUNT_UNX_EMUL 0x80 /* Network compat with SFUnix emulation */
  20. #define CIFS_MOUNT_NO_BRL 0x100 /* No sending byte range locks to srv */
  21. #define CIFS_MOUNT_CIFS_ACL 0x200 /* send ACL requests to non-POSIX srv */
  22. #define CIFS_MOUNT_OVERR_UID 0x400 /* override uid returned from server */
  23. #define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */
  24. #define CIFS_MOUNT_DYNPERM 0x1000 /* allow in-memory only mode setting */
  25. #define CIFS_MOUNT_NOPOSIXBRL 0x2000 /* mandatory not posix byte range lock */
  26. #define CIFS_MOUNT_NOSSYNC 0x4000 /* don't do slow SMBflush on every sync*/
  27. #define CIFS_MOUNT_FSCACHE 0x8000 /* local caching enabled */
  28. #define CIFS_MOUNT_MF_SYMLINKS 0x10000 /* Minshall+French Symlinks enabled */
  29. #define CIFS_MOUNT_MULTIUSER 0x20000 /* multiuser mount */
  30. #define CIFS_MOUNT_STRICT_IO 0x40000 /* strict cache mode */
  31. #define CIFS_MOUNT_RWPIDFORWARD 0x80000 /* use pid forwarding for rw */
  32. #define CIFS_MOUNT_POSIXACL 0x100000 /* mirror of SB_POSIXACL in mnt_cifs_flags */
  33. #define CIFS_MOUNT_CIFS_BACKUPUID 0x200000 /* backup intent bit for a user */
  34. #define CIFS_MOUNT_CIFS_BACKUPGID 0x400000 /* backup intent bit for a group */
  35. #define CIFS_MOUNT_MAP_SFM_CHR 0x800000 /* SFM/MAC mapping for illegal chars */
  36. #define CIFS_MOUNT_USE_PREFIX_PATH 0x1000000 /* make subpath with unaccessible
  37. * root mountable
  38. */
  39. #define CIFS_MOUNT_UID_FROM_ACL 0x2000000 /* try to get UID via special SID */
  40. #define CIFS_MOUNT_NO_HANDLE_CACHE 0x4000000 /* disable caching dir handles */
  41. #define CIFS_MOUNT_NO_DFS 0x8000000 /* disable DFS resolving */
  42. #define CIFS_MOUNT_MODE_FROM_SID 0x10000000 /* retrieve mode from special ACE */
  43. #define CIFS_MOUNT_RO_CACHE 0x20000000 /* assumes share will not change */
  44. #define CIFS_MOUNT_RW_CACHE 0x40000000 /* assumes only client accessing */
  45. #define CIFS_MOUNT_SHUTDOWN 0x80000000
  46. struct cifs_sb_info {
  47. struct rb_root tlink_tree;
  48. spinlock_t tlink_tree_lock;
  49. struct tcon_link *master_tlink;
  50. struct nls_table *local_nls;
  51. struct smb3_fs_context *ctx;
  52. atomic_t active;
  53. unsigned int mnt_cifs_flags;
  54. struct delayed_work prune_tlinks;
  55. struct rcu_head rcu;
  56. /* only used when CIFS_MOUNT_USE_PREFIX_PATH is set */
  57. char *prepath;
  58. /* randomly generated 128-bit number for indexing dfs mount groups in referral cache */
  59. uuid_t dfs_mount_id;
  60. /*
  61. * Indicate whether serverino option was turned off later
  62. * (cifs_autodisable_serverino) in order to match new mounts.
  63. */
  64. bool mnt_cifs_serverino_autodisabled;
  65. /*
  66. * Available once the mount has completed.
  67. */
  68. struct dentry *root;
  69. };
  70. #endif /* _CIFS_FS_SB_H */