diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 07:18:45 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2015-08-09 06:21:16 -0400 |
commit | 13a30b8fd8fd4a5f41d0bb82718024e5a3823c2e (patch) | |
tree | 7724cd95c0ea4c928aa52afc53fa26effbcf8427 /include/linux/fs.h | |
parent | bdd72ea40e761db68dfbf564af6d18a545f84382 (diff) |
Add object list to inodes
This patch adds a list of arbitrary objects to inodes.
This is used by Linux's locking API to attach lock objects to inodes
(which represent namespaces in Linux's locking API).
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 571aab91bfc0..1ea979d984c2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -270,7 +270,7 @@ struct iattr { | |||
270 | */ | 270 | */ |
271 | #define FILESYSTEM_MAX_STACK_DEPTH 2 | 271 | #define FILESYSTEM_MAX_STACK_DEPTH 2 |
272 | 272 | ||
273 | /** | 273 | /** |
274 | * enum positive_aop_returns - aop return codes with specific semantics | 274 | * enum positive_aop_returns - aop return codes with specific semantics |
275 | * | 275 | * |
276 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has | 276 | * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has |
@@ -280,7 +280,7 @@ struct iattr { | |||
280 | * be a candidate for writeback again in the near | 280 | * be a candidate for writeback again in the near |
281 | * future. Other callers must be careful to unlock | 281 | * future. Other callers must be careful to unlock |
282 | * the page if they get this return. Returned by | 282 | * the page if they get this return. Returned by |
283 | * writepage(); | 283 | * writepage(); |
284 | * | 284 | * |
285 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has | 285 | * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has |
286 | * unlocked it and the page might have been truncated. | 286 | * unlocked it and the page might have been truncated. |
@@ -569,6 +569,7 @@ static inline void mapping_allow_writable(struct address_space *mapping) | |||
569 | 569 | ||
570 | struct posix_acl; | 570 | struct posix_acl; |
571 | #define ACL_NOT_CACHED ((void *)(-1)) | 571 | #define ACL_NOT_CACHED ((void *)(-1)) |
572 | struct inode_obj_id_table; | ||
572 | 573 | ||
573 | #define IOP_FASTPERM 0x0001 | 574 | #define IOP_FASTPERM 0x0001 |
574 | #define IOP_LOOKUP 0x0002 | 575 | #define IOP_LOOKUP 0x0002 |
@@ -665,6 +666,9 @@ struct inode { | |||
665 | struct hlist_head i_fsnotify_marks; | 666 | struct hlist_head i_fsnotify_marks; |
666 | #endif | 667 | #endif |
667 | 668 | ||
669 | struct list_head i_obj_list; | ||
670 | struct mutex i_obj_mutex; | ||
671 | |||
668 | void *i_private; /* fs or device private pointer */ | 672 | void *i_private; /* fs or device private pointer */ |
669 | }; | 673 | }; |
670 | 674 | ||
@@ -881,10 +885,10 @@ static inline struct file *get_file(struct file *f) | |||
881 | 885 | ||
882 | #define MAX_NON_LFS ((1UL<<31) - 1) | 886 | #define MAX_NON_LFS ((1UL<<31) - 1) |
883 | 887 | ||
884 | /* Page cache limit. The filesystems should put that into their s_maxbytes | 888 | /* Page cache limit. The filesystems should put that into their s_maxbytes |
885 | limits, otherwise bad things can happen in VM. */ | 889 | limits, otherwise bad things can happen in VM. */ |
886 | #if BITS_PER_LONG==32 | 890 | #if BITS_PER_LONG==32 |
887 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 891 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) |
888 | #elif BITS_PER_LONG==64 | 892 | #elif BITS_PER_LONG==64 |
889 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) | 893 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) |
890 | #endif | 894 | #endif |
@@ -1892,7 +1896,7 @@ int sync_inode_metadata(struct inode *inode, int wait); | |||
1892 | struct file_system_type { | 1896 | struct file_system_type { |
1893 | const char *name; | 1897 | const char *name; |
1894 | int fs_flags; | 1898 | int fs_flags; |
1895 | #define FS_REQUIRES_DEV 1 | 1899 | #define FS_REQUIRES_DEV 1 |
1896 | #define FS_BINARY_MOUNTDATA 2 | 1900 | #define FS_BINARY_MOUNTDATA 2 |
1897 | #define FS_HAS_SUBTYPE 4 | 1901 | #define FS_HAS_SUBTYPE 4 |
1898 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ | 1902 | #define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */ |
@@ -2496,7 +2500,7 @@ extern int kernel_read(struct file *, loff_t, char *, unsigned long); | |||
2496 | extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); | 2500 | extern ssize_t kernel_write(struct file *, const char *, size_t, loff_t); |
2497 | extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *); | 2501 | extern ssize_t __kernel_write(struct file *, const char *, size_t, loff_t *); |
2498 | extern struct file * open_exec(const char *); | 2502 | extern struct file * open_exec(const char *); |
2499 | 2503 | ||
2500 | /* fs/dcache.c -- generic fs support functions */ | 2504 | /* fs/dcache.c -- generic fs support functions */ |
2501 | extern int is_subdir(struct dentry *, struct dentry *); | 2505 | extern int is_subdir(struct dentry *, struct dentry *); |
2502 | extern int path_is_under(struct path *, struct path *); | 2506 | extern int path_is_under(struct path *, struct path *); |