]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.suse/xfs-dmapi-enable
Move xen patchset to new version's subdir.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / xfs-dmapi-enable
1 Date: Thu, 09 Oct 2008 17:11:14 +1100
2 From: Donald Douwsma <donaldd@sgi.com>
3 Subject: VFS changes to support DMAPI
4 Patch-mainline: ?
5 References: bnc#450658
6
7 VFS changes to support DMAPI including open_exec(), mprotect()
8 and build infastructure.
9
10 Acked-by: Jan Kara <jack@suse.cz>
11
12 ---
13 MAINTAINERS | 7 +++++++
14 fs/Kconfig | 19 +++++++++++++++++++
15 fs/Makefile | 2 ++
16 fs/exec.c | 8 ++++++++
17 include/linux/fs.h | 2 ++
18 include/linux/mm.h | 3 +++
19 mm/mprotect.c | 5 +++++
20 7 files changed, 46 insertions(+)
21
22 --- a/fs/exec.c
23 +++ b/fs/exec.c
24 @@ -690,6 +690,14 @@ struct file *open_exec(const char *name)
25 if (IS_ERR(file))
26 return file;
27
28 + if (file->f_op && file->f_op->open_exec) {
29 + err = file->f_op->open_exec(nd.path.dentry->d_inode);
30 + if (err) {
31 + fput(file);
32 + goto out;
33 + }
34 + }
35 +
36 err = deny_write_access(file);
37 if (err) {
38 fput(file);
39 --- a/fs/Kconfig
40 +++ b/fs/Kconfig
41 @@ -557,6 +557,25 @@ config INOTIFY_USER
42
43 If unsure, say Y.
44
45 +config DMAPI
46 + tristate "DMAPI support"
47 + help
48 + The Data Management API is a system interface used to implement
49 + the interface defined in the X/Open document:
50 + "Systems Management: Data Storage Management (XDSM) API",
51 + dated February 1997. This interface is used by hierarchical
52 + storage management systems.
53 +
54 + If any DMAPI-capable filesystem is built into the kernel, then
55 + DMAPI must also be built into the kernel.
56 +
57 +config DMAPI_DEBUG
58 + bool "DMAPI debugging support"
59 + depends on DMAPI
60 + help
61 + If you don't know whether you need it, then you don't need it:
62 + answer N.
63 +
64 config QUOTA
65 bool "Quota support"
66 help
67 --- a/fs/Makefile
68 +++ b/fs/Makefile
69 @@ -56,6 +56,8 @@ obj-$(CONFIG_QFMT_V2) += quota_v2.o
70 obj-$(CONFIG_QUOTA_TREE) += quota_tree.o
71 obj-$(CONFIG_QUOTACTL) += quota.o
72
73 +obj-$(CONFIG_DMAPI) += dmapi/
74 +
75 obj-$(CONFIG_DNOTIFY) += dnotify.o
76
77 obj-$(CONFIG_PROC_FS) += proc/
78 --- a/include/linux/fs.h
79 +++ b/include/linux/fs.h
80 @@ -1271,6 +1271,8 @@ struct file_operations {
81 int (*flock) (struct file *, int, struct file_lock *);
82 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
83 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
84 +#define HAVE_FOP_OPEN_EXEC
85 + int (*open_exec) (struct inode *);
86 int (*setlease)(struct file *, long, struct file_lock **);
87 };
88
89 --- a/include/linux/mm.h
90 +++ b/include/linux/mm.h
91 @@ -173,6 +173,9 @@ struct vm_operations_struct {
92 void (*close)(struct vm_area_struct * area);
93 int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
94
95 +#define HAVE_VMOP_MPROTECT
96 + int (*mprotect)(struct vm_area_struct * area, unsigned int newflags);
97 +
98 #ifdef __GENKSYMS__
99 int (*page_mkwrite)(struct vm_area_struct *, struct page *);
100 #else
101 --- a/MAINTAINERS
102 +++ b/MAINTAINERS
103 @@ -4584,6 +4584,13 @@ W: http://oss.sgi.com/projects/xfs
104 T: git git://oss.sgi.com:8090/xfs/xfs-2.6.git
105 S: Supported
106
107 +DMAPI
108 +P: Silicon Graphics Inc
109 +M: xfs-masters@oss.sgi.com
110 +L: xfs@oss.sgi.com
111 +W: http://oss.sgi.com/projects/xfs
112 +S: Supported
113 +
114 XILINX SYSTEMACE DRIVER
115 P: Grant Likely
116 M: grant.likely@secretlab.ca
117 --- a/mm/mprotect.c
118 +++ b/mm/mprotect.c
119 @@ -294,6 +294,11 @@ SYSCALL_DEFINE3(mprotect, unsigned long,
120 if (error)
121 goto out;
122
123 + if (vma->vm_ops && vma->vm_ops->mprotect) {
124 + error = vma->vm_ops->mprotect(vma, newflags);
125 + if (error < 0)
126 + goto out;
127 + }
128 tmp = vma->vm_end;
129 if (tmp > end)
130 tmp = end;