diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 15:31:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-14 15:31:14 -0400 |
| commit | 8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (patch) | |
| tree | d610c8d39246c33c499ee9d92d302d3ca9e89ae3 /include | |
| parent | c269bc00fcb876ae3b85f178f1e34601185c8ccc (diff) | |
| parent | 107e0008dfb8bd6366bc8827f5bbbc0c1f795d2d (diff) | |
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux: (59 commits)
svcrdma: Fix IRD/ORD polarity
svcrdma: Update svc_rdma_send_error to use DMA LKEY
svcrdma: Modify the RPC reply path to use FRMR when available
svcrdma: Modify the RPC recv path to use FRMR when available
svcrdma: Add support to svc_rdma_send to handle chained WR
svcrdma: Modify post recv path to use local dma key
svcrdma: Add a service to register a Fast Reg MR with the device
svcrdma: Query device for Fast Reg support during connection setup
svcrdma: Add FRMR get/put services
NLM: Remove unused argument from svc_addsock() function
NLM: Remove "proto" argument from lockd_up()
NLM: Always start both UDP and TCP listeners
lockd: Remove unused fields in the nlm_reboot structure
lockd: Add helper to sanity check incoming NOTIFY requests
lockd: change nlmclnt_grant() to take a "struct sockaddr *"
lockd: Adjust nlmsvc_lookup_host() to accomodate AF_INET6 addresses
lockd: Adjust nlmclnt_lookup_host() signature to accomodate non-AF_INET
lockd: Support non-AF_INET addresses in nlm_lookup_host()
NLM: Convert nlm_lookup_host() to use a single argument
svcrdma: Add Fast Reg MR Data Types
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/fs.h | 65 | ||||
| -rw-r--r-- | include/linux/lockd/bind.h | 11 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 137 | ||||
| -rw-r--r-- | include/linux/lockd/xdr.h | 2 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsd.h | 3 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 5 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 19 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 27 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 5 |
9 files changed, 226 insertions, 48 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 44e3cb2f196..a6a625be13f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -947,6 +947,14 @@ struct lock_manager_operations { | |||
| 947 | int (*fl_change)(struct file_lock **, int); | 947 | int (*fl_change)(struct file_lock **, int); |
| 948 | }; | 948 | }; |
| 949 | 949 | ||
| 950 | struct lock_manager { | ||
| 951 | struct list_head list; | ||
| 952 | }; | ||
| 953 | |||
| 954 | void locks_start_grace(struct lock_manager *); | ||
| 955 | void locks_end_grace(struct lock_manager *); | ||
| 956 | int locks_in_grace(void); | ||
| 957 | |||
| 950 | /* that will die - we need it for nfs_lock_info */ | 958 | /* that will die - we need it for nfs_lock_info */ |
| 951 | #include <linux/nfs_fs_i.h> | 959 | #include <linux/nfs_fs_i.h> |
| 952 | 960 | ||
| @@ -988,6 +996,13 @@ struct file_lock { | |||
| 988 | 996 | ||
| 989 | #include <linux/fcntl.h> | 997 | #include <linux/fcntl.h> |
| 990 | 998 | ||
| 999 | extern void send_sigio(struct fown_struct *fown, int fd, int band); | ||
| 1000 | |||
| 1001 | /* fs/sync.c */ | ||
| 1002 | extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, | ||
| 1003 | loff_t endbyte, unsigned int flags); | ||
| 1004 | |||
| 1005 | #ifdef CONFIG_FILE_LOCKING | ||
| 991 | extern int fcntl_getlk(struct file *, struct flock __user *); | 1006 | extern int fcntl_getlk(struct file *, struct flock __user *); |
| 992 | extern int fcntl_setlk(unsigned int, struct file *, unsigned int, | 1007 | extern int fcntl_setlk(unsigned int, struct file *, unsigned int, |
| 993 | struct flock __user *); | 1008 | struct flock __user *); |
| @@ -998,14 +1013,9 @@ extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, | |||
| 998 | struct flock64 __user *); | 1013 | struct flock64 __user *); |
| 999 | #endif | 1014 | #endif |
| 1000 | 1015 | ||
| 1001 | extern void send_sigio(struct fown_struct *fown, int fd, int band); | ||
| 1002 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); | 1016 | extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); |
| 1003 | extern int fcntl_getlease(struct file *filp); | 1017 | extern int fcntl_getlease(struct file *filp); |
| 1004 | 1018 | ||
| 1005 | /* fs/sync.c */ | ||
| 1006 | extern int do_sync_mapping_range(struct address_space *mapping, loff_t offset, | ||
| 1007 | loff_t endbyte, unsigned int flags); | ||
| 1008 | |||
| 1009 | /* fs/locks.c */ | 1019 | /* fs/locks.c */ |
| 1010 | extern void locks_init_lock(struct file_lock *); | 1020 | extern void locks_init_lock(struct file_lock *); |
| 1011 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); | 1021 | extern void locks_copy_lock(struct file_lock *, struct file_lock *); |
| @@ -1028,6 +1038,37 @@ extern int lease_modify(struct file_lock **, int); | |||
| 1028 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1038 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
| 1029 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1039 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
| 1030 | extern struct seq_operations locks_seq_operations; | 1040 | extern struct seq_operations locks_seq_operations; |
| 1041 | #else /* !CONFIG_FILE_LOCKING */ | ||
| 1042 | #define fcntl_getlk(a, b) ({ -EINVAL; }) | ||
| 1043 | #define fcntl_setlk(a, b, c, d) ({ -EACCES; }) | ||
| 1044 | #if BITS_PER_LONG == 32 | ||
| 1045 | #define fcntl_getlk64(a, b) ({ -EINVAL; }) | ||
| 1046 | #define fcntl_setlk64(a, b, c, d) ({ -EACCES; }) | ||
| 1047 | #endif | ||
| 1048 | #define fcntl_setlease(a, b, c) ({ 0; }) | ||
| 1049 | #define fcntl_getlease(a) ({ 0; }) | ||
| 1050 | #define locks_init_lock(a) ({ }) | ||
| 1051 | #define __locks_copy_lock(a, b) ({ }) | ||
| 1052 | #define locks_copy_lock(a, b) ({ }) | ||
| 1053 | #define locks_remove_posix(a, b) ({ }) | ||
| 1054 | #define locks_remove_flock(a) ({ }) | ||
| 1055 | #define posix_test_lock(a, b) ({ 0; }) | ||
| 1056 | #define posix_lock_file(a, b, c) ({ -ENOLCK; }) | ||
| 1057 | #define posix_lock_file_wait(a, b) ({ -ENOLCK; }) | ||
| 1058 | #define posix_unblock_lock(a, b) (-ENOENT) | ||
| 1059 | #define vfs_test_lock(a, b) ({ 0; }) | ||
| 1060 | #define vfs_lock_file(a, b, c, d) (-ENOLCK) | ||
| 1061 | #define vfs_cancel_lock(a, b) ({ 0; }) | ||
| 1062 | #define flock_lock_file_wait(a, b) ({ -ENOLCK; }) | ||
| 1063 | #define __break_lease(a, b) ({ 0; }) | ||
| 1064 | #define lease_get_mtime(a, b) ({ }) | ||
| 1065 | #define generic_setlease(a, b, c) ({ -EINVAL; }) | ||
| 1066 | #define vfs_setlease(a, b, c) ({ -EINVAL; }) | ||
| 1067 | #define lease_modify(a, b) ({ -EINVAL; }) | ||
| 1068 | #define lock_may_read(a, b, c) ({ 1; }) | ||
| 1069 | #define lock_may_write(a, b, c) ({ 1; }) | ||
| 1070 | #endif /* !CONFIG_FILE_LOCKING */ | ||
| 1071 | |||
| 1031 | 1072 | ||
| 1032 | struct fasync_struct { | 1073 | struct fasync_struct { |
| 1033 | int magic; | 1074 | int magic; |
| @@ -1575,9 +1616,12 @@ extern int vfs_statfs(struct dentry *, struct kstatfs *); | |||
| 1575 | /* /sys/fs */ | 1616 | /* /sys/fs */ |
| 1576 | extern struct kobject *fs_kobj; | 1617 | extern struct kobject *fs_kobj; |
| 1577 | 1618 | ||
| 1619 | extern int rw_verify_area(int, struct file *, loff_t *, size_t); | ||
| 1620 | |||
| 1578 | #define FLOCK_VERIFY_READ 1 | 1621 | #define FLOCK_VERIFY_READ 1 |
| 1579 | #define FLOCK_VERIFY_WRITE 2 | 1622 | #define FLOCK_VERIFY_WRITE 2 |
| 1580 | 1623 | ||
| 1624 | #ifdef CONFIG_FILE_LOCKING | ||
| 1581 | extern int locks_mandatory_locked(struct inode *); | 1625 | extern int locks_mandatory_locked(struct inode *); |
| 1582 | extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); | 1626 | extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); |
| 1583 | 1627 | ||
| @@ -1608,8 +1652,6 @@ static inline int locks_verify_locked(struct inode *inode) | |||
| 1608 | return 0; | 1652 | return 0; |
| 1609 | } | 1653 | } |
| 1610 | 1654 | ||
| 1611 | extern int rw_verify_area(int, struct file *, loff_t *, size_t); | ||
| 1612 | |||
| 1613 | static inline int locks_verify_truncate(struct inode *inode, | 1655 | static inline int locks_verify_truncate(struct inode *inode, |
| 1614 | struct file *filp, | 1656 | struct file *filp, |
| 1615 | loff_t size) | 1657 | loff_t size) |
| @@ -1630,6 +1672,15 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
| 1630 | return __break_lease(inode, mode); | 1672 | return __break_lease(inode, mode); |
| 1631 | return 0; | 1673 | return 0; |
| 1632 | } | 1674 | } |
| 1675 | #else /* !CONFIG_FILE_LOCKING */ | ||
| 1676 | #define locks_mandatory_locked(a) ({ 0; }) | ||
| 1677 | #define locks_mandatory_area(a, b, c, d, e) ({ 0; }) | ||
| 1678 | #define __mandatory_lock(a) ({ 0; }) | ||
| 1679 | #define mandatory_lock(a) ({ 0; }) | ||
| 1680 | #define locks_verify_locked(a) ({ 0; }) | ||
| 1681 | #define locks_verify_truncate(a, b, c) ({ 0; }) | ||
| 1682 | #define break_lease(a, b) ({ 0; }) | ||
| 1683 | #endif /* CONFIG_FILE_LOCKING */ | ||
| 1633 | 1684 | ||
| 1634 | /* fs/open.c */ | 1685 | /* fs/open.c */ |
| 1635 | 1686 | ||
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 3d25bcd139d..e5872dc994c 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
| @@ -27,7 +27,6 @@ struct nlmsvc_binding { | |||
| 27 | struct nfs_fh *, | 27 | struct nfs_fh *, |
| 28 | struct file **); | 28 | struct file **); |
| 29 | void (*fclose)(struct file *); | 29 | void (*fclose)(struct file *); |
| 30 | unsigned long (*get_grace_period)(void); | ||
| 31 | }; | 30 | }; |
| 32 | 31 | ||
| 33 | extern struct nlmsvc_binding * nlmsvc_ops; | 32 | extern struct nlmsvc_binding * nlmsvc_ops; |
| @@ -53,15 +52,7 @@ extern void nlmclnt_done(struct nlm_host *host); | |||
| 53 | 52 | ||
| 54 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, | 53 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, |
| 55 | struct file_lock *fl); | 54 | struct file_lock *fl); |
| 56 | extern int lockd_up(int proto); | 55 | extern int lockd_up(void); |
| 57 | extern void lockd_down(void); | 56 | extern void lockd_down(void); |
| 58 | 57 | ||
| 59 | unsigned long get_nfs_grace_period(void); | ||
| 60 | |||
| 61 | #ifdef CONFIG_NFSD_V4 | ||
| 62 | unsigned long get_nfs4_grace_period(void); | ||
| 63 | #else | ||
| 64 | static inline unsigned long get_nfs4_grace_period(void) {return 0;} | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #endif /* LINUX_LOCKD_BIND_H */ | 58 | #endif /* LINUX_LOCKD_BIND_H */ |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index dbb87ab282e..b56d5aa9b19 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
| 13 | 13 | ||
| 14 | #include <linux/in.h> | 14 | #include <linux/in.h> |
| 15 | #include <linux/in6.h> | ||
| 16 | #include <net/ipv6.h> | ||
| 15 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 16 | #include <linux/kref.h> | 18 | #include <linux/kref.h> |
| 17 | #include <linux/utsname.h> | 19 | #include <linux/utsname.h> |
| @@ -38,8 +40,9 @@ | |||
| 38 | */ | 40 | */ |
| 39 | struct nlm_host { | 41 | struct nlm_host { |
| 40 | struct hlist_node h_hash; /* doubly linked list */ | 42 | struct hlist_node h_hash; /* doubly linked list */ |
| 41 | struct sockaddr_in h_addr; /* peer address */ | 43 | struct sockaddr_storage h_addr; /* peer address */ |
| 42 | struct sockaddr_in h_saddr; /* our address (optional) */ | 44 | size_t h_addrlen; |
