diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-11 23:28:02 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-12-11 23:28:02 -0500 |
commit | 4d9d4ebf5de848e3450e23e4db9ac74e23e5daa6 (patch) | |
tree | 2c6d2766054a925a42c1863e91fb5b8c6d0eb5cb /fs/xfs/linux-2.6 | |
parent | cfbe52672fbc6f333892e8dde82c35e0a76aa5f5 (diff) | |
parent | c4cd747ee6c3ba1e7727878e3fce482d0d8c0136 (diff) |
Merge branch 'master' of git+ssh://git.melbourne.sgi.com/git/xfs
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 145 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 29 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.h | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 56 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.h | 1 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 11 |
8 files changed, 70 insertions, 188 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index aae8d0768eca..cb329edc925b 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1085,7 +1085,7 @@ xfs_bawrite( | |||
1085 | bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD); | 1085 | bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD); |
1086 | bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); | 1086 | bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); |
1087 | 1087 | ||
1088 | bp->b_fspriv3 = mp; | 1088 | bp->b_mount = mp; |
1089 | bp->b_strat = xfs_bdstrat_cb; | 1089 | bp->b_strat = xfs_bdstrat_cb; |
1090 | return xfs_bdstrat_cb(bp); | 1090 | return xfs_bdstrat_cb(bp); |
1091 | } | 1091 | } |
@@ -1098,7 +1098,7 @@ xfs_bdwrite( | |||
1098 | XB_TRACE(bp, "bdwrite", 0); | 1098 | XB_TRACE(bp, "bdwrite", 0); |
1099 | 1099 | ||
1100 | bp->b_strat = xfs_bdstrat_cb; | 1100 | bp->b_strat = xfs_bdstrat_cb; |
1101 | bp->b_fspriv3 = mp; | 1101 | bp->b_mount = mp; |
1102 | 1102 | ||
1103 | bp->b_flags &= ~XBF_READ; | 1103 | bp->b_flags &= ~XBF_READ; |
1104 | bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); | 1104 | bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); |
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 0e2aa16f5e41..af8764e02d78 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -168,7 +168,7 @@ typedef struct xfs_buf { | |||
168 | struct completion b_iowait; /* queue for I/O waiters */ | 168 | struct completion b_iowait; /* queue for I/O waiters */ |
169 | void *b_fspriv; | 169 | void *b_fspriv; |
170 | void *b_fspriv2; | 170 | void *b_fspriv2; |
171 | void *b_fspriv3; | 171 | struct xfs_mount *b_mount; |
172 | unsigned short b_error; /* error code on I/O */ | 172 | unsigned short b_error; /* error code on I/O */ |
173 | unsigned int b_page_count; /* size of page array */ | 173 | unsigned int b_page_count; /* size of page array */ |
174 | unsigned int b_offset; /* page offset in first page */ | 174 | unsigned int b_offset; /* page offset in first page */ |
@@ -335,8 +335,6 @@ extern void xfs_buf_trace(xfs_buf_t *, char *, void *, void *); | |||
335 | #define XFS_BUF_SET_FSPRIVATE(bp, val) ((bp)->b_fspriv = (void*)(val)) | 335 | #define XFS_BUF_SET_FSPRIVATE(bp, val) ((bp)->b_fspriv = (void*)(val)) |
336 | #define XFS_BUF_FSPRIVATE2(bp, type) ((type)(bp)->b_fspriv2) | 336 | #define XFS_BUF_FSPRIVATE2(bp, type) ((type)(bp)->b_fspriv2) |
337 | #define XFS_BUF_SET_FSPRIVATE2(bp, val) ((bp)->b_fspriv2 = (void*)(val)) | 337 | #define XFS_BUF_SET_FSPRIVATE2(bp, val) ((bp)->b_fspriv2 = (void*)(val)) |
338 | #define XFS_BUF_FSPRIVATE3(bp, type) ((type)(bp)->b_fspriv3) | ||
339 | #define XFS_BUF_SET_FSPRIVATE3(bp, val) ((bp)->b_fspriv3 = (void*)(val)) | ||
340 | #define XFS_BUF_SET_START(bp) do { } while (0) | 338 | #define XFS_BUF_SET_START(bp) do { } while (0) |
341 | #define XFS_BUF_SET_BRELSE_FUNC(bp, func) ((bp)->b_relse = (func)) | 339 | #define XFS_BUF_SET_BRELSE_FUNC(bp, func) ((bp)->b_relse = (func)) |
342 | 340 | ||
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index f999d20a429c..a0c45cc8a6b8 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -45,81 +45,45 @@ | |||
45 | 45 | ||
46 | static struct vm_operations_struct xfs_file_vm_ops; | 46 | static struct vm_operations_struct xfs_file_vm_ops; |
47 | 47 | ||
48 | STATIC_INLINE ssize_t | 48 | STATIC ssize_t |
49 | __xfs_file_read( | 49 | xfs_file_aio_read( |
50 | struct kiocb *iocb, | 50 | struct kiocb *iocb, |
51 | const struct iovec *iov, | 51 | const struct iovec *iov, |
52 | unsigned long nr_segs, | 52 | unsigned long nr_segs, |
53 | int ioflags, | ||
54 | loff_t pos) | 53 | loff_t pos) |
55 | { | 54 | { |
56 | struct file *file = iocb->ki_filp; | 55 | struct file *file = iocb->ki_filp; |
56 | int ioflags = IO_ISAIO; | ||
57 | 57 | ||
58 | BUG_ON(iocb->ki_pos != pos); | 58 | BUG_ON(iocb->ki_pos != pos); |
59 | if (unlikely(file->f_flags & O_DIRECT)) | 59 | if (unlikely(file->f_flags & O_DIRECT)) |
60 | ioflags |= IO_ISDIRECT; | 60 | ioflags |= IO_ISDIRECT; |
61 | if (file->f_mode & FMODE_NOCMTIME) | ||
62 | ioflags |= IO_INVIS; | ||
61 | return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov, | 63 | return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov, |
62 | nr_segs, &iocb->ki_pos, ioflags); | 64 | nr_segs, &iocb->ki_pos, ioflags); |
63 | } | 65 | } |
64 | 66 | ||
65 | STATIC ssize_t | 67 | STATIC ssize_t |
66 | xfs_file_aio_read( | 68 | xfs_file_aio_write( |
67 | struct kiocb *iocb, | ||
68 | const struct iovec *iov, | ||
69 | unsigned long nr_segs, | ||
70 | loff_t pos) | ||
71 | { | ||
72 | return __xfs_file_read(iocb, iov, nr_segs, IO_ISAIO, pos); | ||
73 | } | ||
74 | |||
75 | STATIC ssize_t | ||
76 | xfs_file_aio_read_invis( | ||
77 | struct kiocb *iocb, | ||
78 | const struct iovec *iov, | ||
79 | unsigned long nr_segs, | ||
80 | loff_t pos) | ||
81 | { | ||
82 | return __xfs_file_read(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos); | ||
83 | } | ||
84 | |||
85 | STATIC_INLINE ssize_t | ||
86 | __xfs_file_write( | ||
87 | struct kiocb *iocb, | 69 | struct kiocb *iocb, |
88 | const struct iovec *iov, | 70 | const struct iovec *iov, |
89 | unsigned long nr_segs, | 71 | unsigned long nr_segs, |
90 | int ioflags, | ||
91 | loff_t pos) | 72 | loff_t pos) |
92 | { | 73 | { |
93 | struct file *file = iocb->ki_filp; | 74 | struct file *file = iocb->ki_filp; |
75 | int ioflags = IO_ISAIO; | ||
94 | 76 | ||
95 | BUG_ON(iocb->ki_pos != pos); | 77 | BUG_ON(iocb->ki_pos != pos); |
96 | if (unlikely(file->f_flags & O_DIRECT)) | 78 | if (unlikely(file->f_flags & O_DIRECT)) |
97 | ioflags |= IO_ISDIRECT; | 79 | ioflags |= IO_ISDIRECT; |
80 | if (file->f_mode & FMODE_NOCMTIME) | ||
81 | ioflags |= IO_INVIS; | ||
98 | return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs, | 82 | return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs, |
99 | &iocb->ki_pos, ioflags); | 83 | &iocb->ki_pos, ioflags); |
100 | } | 84 | } |
101 | 85 | ||
102 | STATIC ssize_t | 86 | STATIC ssize_t |
103 | xfs_file_aio_write( | ||
104 | struct kiocb *iocb, | ||
105 | const struct iovec *iov, | ||
106 | unsigned long nr_segs, | ||
107 | loff_t pos) | ||
108 | { | ||
109 | return __xfs_file_write(iocb, iov, nr_segs, IO_ISAIO, pos); | ||
110 | } | ||
111 | |||
112 | STATIC ssize_t | ||
113 | xfs_file_aio_write_invis( | ||
114 | struct kiocb *iocb, | ||
115 | const struct iovec *iov, | ||
116 | unsigned long nr_segs, | ||
117 | loff_t pos) | ||
118 | { | ||
119 | return __xfs_file_write(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos); | ||
120 | } | ||
121 | |||
122 | STATIC ssize_t | ||
123 | xfs_file_splice_read( | 87 | xfs_file_splice_read( |
124 | struct file *infilp, | 88 | struct file *infilp, |
125 | loff_t *ppos, | 89 | loff_t *ppos, |
@@ -127,20 +91,13 @@ xfs_file_splice_read( | |||
127 | size_t len, | 91 | size_t len, |
128 | unsigned int flags) | 92 | unsigned int flags) |
129 | { | 93 | { |
130 | return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode), | 94 | int ioflags = 0; |
131 | infilp, ppos, pipe, len, flags, 0); | 95 | |
132 | } | 96 | if (infilp->f_mode & FMODE_NOCMTIME) |
97 | ioflags |= IO_INVIS; | ||
133 | 98 | ||
134 | STATIC ssize_t | ||
135 | xfs_file_splice_read_invis( | ||
136 | struct file *infilp, | ||
137 | loff_t *ppos, | ||
138 | struct pipe_inode_info *pipe, | ||
139 | size_t len, | ||
140 | unsigned int flags) | ||
141 | { | ||
142 | return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode), | 99 | return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode), |
143 | infilp, ppos, pipe, len, flags, IO_INVIS); | 100 | infilp, ppos, pipe, len, flags, ioflags); |
144 | } | 101 | } |
145 | 102 | ||
146 | STATIC ssize_t | 103 | STATIC ssize_t |
@@ -151,20 +108,13 @@ xfs_file_splice_write( | |||
151 | size_t len, | 108 | size_t len, |
152 | unsigned int flags) | 109 | unsigned int flags) |
153 | { | 110 | { |
154 | return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode), | 111 | int ioflags = 0; |
155 | pipe, outfilp, ppos, len, flags, 0); | 112 | |
156 | } | 113 | if (outfilp->f_mode & FMODE_NOCMTIME) |
114 | ioflags |= IO_INVIS; | ||
157 | 115 | ||
158 | STATIC ssize_t | ||
159 | xfs_file_splice_write_invis( | ||
160 | struct pipe_inode_info *pipe, | ||
161 | struct file *outfilp, | ||
162 | loff_t *ppos, | ||
163 | size_t len, | ||
164 | unsigned int flags) | ||
165 | { | ||
166 | return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode), | 116 | return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode), |
167 | pipe, outfilp, ppos, len, flags, IO_INVIS); | 117 | pipe, outfilp, ppos, len, flags, ioflags); |
168 | } | 118 | } |
169 | 119 | ||
170 | STATIC int | 120 | STATIC int |
@@ -275,42 +225,6 @@ xfs_file_mmap( | |||
275 | return 0; | 225 | return 0; |
276 | } | 226 | } |
277 | 227 | ||
278 | STATIC long | ||
279 | xfs_file_ioctl( | ||
280 | struct file *filp, | ||
281 | unsigned int cmd, | ||
282 | unsigned long p) | ||
283 | { | ||
284 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
285 | |||
286 | |||
287 | /* NOTE: some of the ioctl's return positive #'s as a | ||
288 | * byte count indicating success, such as | ||
289 | * readlink_by_handle. So we don't "sign flip" | ||
290 | * like most other routines. This means true | ||
291 | * errors need to be returned as a negative value. | ||
292 | */ | ||
293 | return xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); | ||
294 | } | ||
295 | |||
296 | STATIC long | ||
297 | xfs_file_ioctl_invis( | ||
298 | struct file *filp, | ||
299 | unsigned int cmd, | ||
300 | unsigned long p) | ||
301 | { | ||
302 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
303 | |||
304 | |||
305 | /* NOTE: some of the ioctl's return positive #'s as a | ||
306 | * byte count indicating success, such as | ||
307 | * readlink_by_handle. So we don't "sign flip" | ||
308 | * like most other routines. This means true | ||
309 | * errors need to be returned as a negative value. | ||
310 | */ | ||
311 | return xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p); | ||
312 | } | ||
313 | |||
314 | /* | 228 | /* |
315 | * mmap()d file has taken write protection fault and is being made | 229 | * mmap()d file has taken write protection fault and is being made |
316 | * writable. We can set the page state up correctly for a writable | 230 | * writable. We can set the page state up correctly for a writable |
@@ -346,25 +260,6 @@ const struct file_operations xfs_file_operations = { | |||
346 | #endif | 260 | #endif |
347 | }; | 261 | }; |
348 | 262 | ||
349 | const struct file_operations xfs_invis_file_operations = { | ||
350 | .llseek = generic_file_llseek, | ||
351 | .read = do_sync_read, | ||
352 | .write = do_sync_write, | ||
353 | .aio_read = xfs_file_aio_read_invis, | ||
354 | .aio_write = xfs_file_aio_write_invis, | ||
355 | .splice_read = xfs_file_splice_read_invis, | ||
356 | .splice_write = xfs_file_splice_write_invis, | ||
357 | .unlocked_ioctl = xfs_file_ioctl_invis, | ||
358 | #ifdef CONFIG_COMPAT | ||
359 | .compat_ioctl = xfs_file_compat_invis_ioctl, | ||
360 | #endif | ||
361 | .mmap = xfs_file_mmap, | ||
362 | .open = xfs_file_open, | ||
363 | .release = xfs_file_release, | ||
364 | .fsync = xfs_file_fsync, | ||
365 | }; | ||
366 | |||
367 | |||
368 | const struct file_operations xfs_dir_file_operations = { | 263 | const struct file_operations xfs_dir_file_operations = { |
369 | .open = xfs_dir_open, | 264 | .open = xfs_dir_open, |
370 | .read = generic_read_dir, | 265 | .read = generic_read_dir, |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index c8f1e632ba94..0264c8719ffd 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -319,10 +319,11 @@ xfs_open_by_handle( | |||
319 | put_unused_fd(new_fd); | 319 | put_unused_fd(new_fd); |
320 | return -XFS_ERROR(-PTR_ERR(filp)); | 320 | return -XFS_ERROR(-PTR_ERR(filp)); |
321 | } | 321 | } |
322 | |||
322 | if (inode->i_mode & S_IFREG) { | 323 | if (inode->i_mode & S_IFREG) { |
323 | /* invisible operation should not change atime */ | 324 | /* invisible operation should not change atime */ |
324 | filp->f_flags |= O_NOATIME; | 325 | filp->f_flags |= O_NOATIME; |
325 | filp->f_op = &xfs_invis_file_operations; | 326 | filp->f_mode |= FMODE_NOCMTIME; |
326 | } | 327 | } |
327 | 328 | ||
328 | fd_install(new_fd, filp); | 329 | fd_install(new_fd, filp); |
@@ -1328,21 +1329,31 @@ xfs_ioc_getbmapx( | |||
1328 | return 0; | 1329 | return 0; |
1329 | } | 1330 | } |
1330 | 1331 | ||
1331 | int | 1332 | /* |
1332 | xfs_ioctl( | 1333 | * Note: some of the ioctl's return positive numbers as a |
1333 | xfs_inode_t *ip, | 1334 | * byte count indicating success, such as readlink_by_handle. |
1335 | * So we don't "sign flip" like most other routines. This means | ||
1336 | * true errors need to be returned as a negative value. | ||
1337 | */ | ||
1338 | long | ||
1339 | xfs_file_ioctl( | ||
1334 | struct file *filp, | 1340 | struct file *filp, |
1335 | int ioflags, | ||
1336 | unsigned int cmd, | 1341 | unsigned int cmd, |
1337 | void __user *arg) | 1342 | unsigned long p) |
1338 | { | 1343 | { |
1339 | struct inode *inode = filp->f_path.dentry->d_inode; | 1344 | struct inode *inode = filp->f_path.dentry->d_inode; |
1340 | xfs_mount_t *mp = ip->i_mount; | 1345 | struct xfs_inode *ip = XFS_I(inode); |
1346 | struct xfs_mount *mp = ip->i_mount; | ||
1347 | void __user *arg = (void __user *)p; | ||
1348 | int ioflags = 0; | ||
1341 | int error; | 1349 | int error; |
1342 | 1350 | ||
1343 | xfs_itrace_entry(XFS_I(inode)); | 1351 | if (filp->f_mode & FMODE_NOCMTIME) |
1344 | switch (cmd) { | 1352 | ioflags |= IO_INVIS; |
1345 | 1353 | ||
1354 | xfs_itrace_entry(ip); | ||
1355 | |||
1356 | switch (cmd) { | ||
1346 | case XFS_IOC_ALLOCSP: | 1357 | case XFS_IOC_ALLOCSP: |
1347 | case XFS_IOC_FREESP: | 1358 | case XFS_IOC_FREESP: |
1348 | case XFS_IOC_RESVSP: | 1359 | case XFS_IOC_RESVSP: |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.h b/fs/xfs/linux-2.6/xfs_ioctl.h index d92131c827bc..8c16bf2d7e03 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.h +++ b/fs/xfs/linux-2.6/xfs_ioctl.h | |||
@@ -68,13 +68,13 @@ xfs_attrmulti_attr_remove( | |||
68 | __uint32_t flags); | 68 | __uint32_t flags); |
69 | 69 | ||
70 | extern long | 70 | extern long |
71 | xfs_file_compat_ioctl( | 71 | xfs_file_ioctl( |
72 | struct file *file, | 72 | struct file *filp, |
73 | unsigned int cmd, | 73 | unsigned int cmd, |
74 | unsigned long arg); | 74 | unsigned long p); |
75 | 75 | ||
76 | extern long | 76 | extern long |
77 | xfs_file_compat_invis_ioctl( | 77 | xfs_file_compat_ioctl( |
78 | struct file *file, | 78 | struct file *file, |
79 | unsigned int cmd, | 79 | unsigned int cmd, |
80 | unsigned long arg); | 80 | unsigned long arg); |
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index b34b3d8892a2..0504cece9f66 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -599,19 +599,24 @@ out: | |||
599 | return error; | 599 | return error; |
600 | } | 600 | } |
601 | 601 | ||
602 | STATIC long | 602 | long |
603 | xfs_compat_ioctl( | 603 | xfs_file_compat_ioctl( |
604 | xfs_inode_t *ip, | 604 | struct file *filp, |
605 | struct file *filp, | 605 | unsigned cmd, |
606 | int ioflags, | 606 | unsigned long p) |
607 | unsigned cmd, | ||
608 | void __user *arg) | ||
609 | { | 607 | { |
610 | struct inode *inode = filp->f_path.dentry->d_inode; | 608 | struct inode *inode = filp->f_path.dentry->d_inode; |
611 | xfs_mount_t *mp = ip->i_mount; | 609 | struct xfs_inode *ip = XFS_I(inode); |
612 | int error; | 610 | struct xfs_mount *mp = ip->i_mount; |
611 | void __user *arg = (void __user *)p; | ||
612 | int ioflags = 0; | ||
613 | int error; | ||
614 | |||
615 | if (filp->f_mode & FMODE_NOCMTIME) | ||
616 | ioflags |= IO_INVIS; | ||
617 | |||
618 | xfs_itrace_entry(ip); | ||
613 | 619 | ||
614 | xfs_itrace_entry(XFS_I(inode)); | ||
615 | switch (cmd) { | 620 | switch (cmd) { |
616 | /* No size or alignment issues on any arch */ | 621 | /* No size or alignment issues on any arch */ |
617 | case XFS_IOC_DIOINFO: | 622 | case XFS_IOC_DIOINFO: |
@@ -632,7 +637,7 @@ xfs_compat_ioctl( | |||
632 | case XFS_IOC_GOINGDOWN: | 637 | case XFS_IOC_GOINGDOWN: |
633 | case XFS_IOC_ERROR_INJECTION: | 638 | case XFS_IOC_ERROR_INJECTION: |
634 | case XFS_IOC_ERROR_CLEARALL: | 639 | case XFS_IOC_ERROR_CLEARALL: |
635 | return xfs_ioctl(ip, filp, ioflags, cmd, arg); | 640 | return xfs_file_ioctl(filp, cmd, p); |
636 | #ifndef BROKEN_X86_ALIGNMENT | 641 | #ifndef BROKEN_X86_ALIGNMENT |
637 | /* These are handled fine if no alignment issues */ | 642 | /* These are handled fine if no alignment issues */ |
638 | case XFS_IOC_ALLOCSP: | 643 | case XFS_IOC_ALLOCSP: |
@@ -646,7 +651,7 @@ xfs_compat_ioctl( | |||
646 | case XFS_IOC_FSGEOMETRY_V1: | 651 | case XFS_IOC_FSGEOMETRY_V1: |
647 | case XFS_IOC_FSGROWFSDATA: | 652 | case XFS_IOC_FSGROWFSDATA: |
648 | case XFS_IOC_FSGROWFSRT: | 653 | case XFS_IOC_FSGROWFSRT: |
649 | return xfs_ioctl(ip, filp, ioflags, cmd, arg); | 654 | return xfs_file_ioctl(filp, cmd, p); |
650 | #else | 655 | #else |
651 | case XFS_IOC_ALLOCSP_32: | 656 | case XFS_IOC_ALLOCSP_32: |
652 | case XFS_IOC_FREESP_32: | 657 | case XFS_IOC_FREESP_32: |
@@ -687,7 +692,7 @@ xfs_compat_ioctl( | |||
687 | case XFS_IOC_SETXFLAGS_32: | 692 | case XFS_IOC_SETXFLAGS_32: |
688 | case XFS_IOC_GETVERSION_32: | 693 | case XFS_IOC_GETVERSION_32: |
689 | cmd = _NATIVE_IOC(cmd, long); | 694 | cmd = _NATIVE_IOC(cmd, long); |
690 | return xfs_ioctl(ip, filp, ioflags, cmd, arg); | 695 | return xfs_file_ioctl(filp, cmd, p); |
691 | case XFS_IOC_SWAPEXT: { | 696 | case XFS_IOC_SWAPEXT: { |
692 | struct xfs_swapext sxp; | 697 | struct xfs_swapext sxp; |
693 | struct compat_xfs_swapext __user *sxu = arg; | 698 | struct compat_xfs_swapext __user *sxu = arg; |
@@ -738,26 +743,3 @@ xfs_compat_ioctl( | |||
738 | return -XFS_ERROR(ENOIOCTLCMD); | 743 | return -XFS_ERROR(ENOIOCTLCMD); |
739 | } | 744 | } |
740 | } | 745 | } |
741 | |||
742 | long | ||
743 | xfs_file_compat_ioctl( | ||
744 | struct file *filp, | ||
745 | unsigned int cmd, | ||
746 | unsigned long p) | ||
747 | { | ||
748 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
749 | |||
750 | return xfs_compat_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); | ||
751 | } | ||
752 | |||
753 | long | ||
754 | xfs_file_compat_invis_ioctl( | ||
755 | struct file *filp, | ||
756 | unsigned int cmd, | ||
757 | unsigned long p) | ||
758 | { | ||
759 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
760 | |||
761 | return xfs_compat_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, | ||
762 | (void __user *)p); | ||
763 | } | ||
diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h index 8b1a1e31dc21..ef41c92ce66e 100644 --- a/fs/xfs/linux-2.6/xfs_iops.h +++ b/fs/xfs/linux-2.6/xfs_iops.h | |||
@@ -22,7 +22,6 @@ struct xfs_inode; | |||
22 | 22 | ||
23 | extern const struct file_operations xfs_file_operations; | 23 | extern const struct file_operations xfs_file_operations; |
24 | extern const struct file_operations xfs_dir_file_operations; | 24 | extern const struct file_operations xfs_dir_file_operations; |
25 | extern const struct file_operations xfs_invis_file_operations; | ||
26 | 25 | ||
27 | extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size); | 26 | extern ssize_t xfs_vn_listxattr(struct dentry *, char *data, size_t size); |
28 | 27 | ||
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 59b7d5f9e64a..92ce34b3787a 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -847,13 +847,7 @@ retry: | |||
847 | int | 847 | int |
848 | xfs_bdstrat_cb(struct xfs_buf *bp) | 848 | xfs_bdstrat_cb(struct xfs_buf *bp) |
849 | { | 849 | { |
850 | xfs_mount_t *mp; | 850 | if (XFS_FORCED_SHUTDOWN(bp->b_mount)) { |
851 | |||
852 | mp = XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *); | ||
853 | if (!XFS_FORCED_SHUTDOWN(mp)) { | ||
854 | xfs_buf_iorequest(bp); | ||
855 | return 0; | ||
856 | } else { | ||
857 | xfs_buftrace("XFS__BDSTRAT IOERROR", bp); | 851 | xfs_buftrace("XFS__BDSTRAT IOERROR", bp); |
858 | /* | 852 | /* |
859 | * Metadata write that didn't get logged but | 853 | * Metadata write that didn't get logged but |
@@ -866,6 +860,9 @@ xfs_bdstrat_cb(struct xfs_buf *bp) | |||
866 | else | 860 | else |
867 | return (xfs_bioerror(bp)); | 861 | return (xfs_bioerror(bp)); |
868 | } | 862 | } |
863 | |||
864 | xfs_buf_iorequest(bp); | ||
865 | return 0; | ||
869 | } | 866 | } |
870 | 867 | ||
871 | /* | 868 | /* |