aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-08-03 23:28:20 -0400
committerDave Chinner <david@fromorbit.com>2014-08-03 23:28:20 -0400
commitb92cc59f69537f26d5a42e4171ccc864ae4d9383 (patch)
treedfa9616f94c4e6ed1f002275060fbf76c3f855f4 /fs
parentdd8c38bab0d88615e0bdf013e6de3d4345f8cda2 (diff)
xfs: kill xfs_vnode.h
Move the IO flag definitions to xfs_inode.h and kill the header file as it is now empty. Removing the xfs_vnode.h file showed up an implicit header include path: xfs_linux.h -> xfs_vnode.h -> xfs_fs.h And so every xfs header file has been inplicitly been including xfs_fs.h where it is needed or not. Hence the removal of xfs_vnode.h causes all sorts of build issues because BBTOB() and friends are no longer automatically included in the build. This also gets fixed. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_file.c10
-rw-r--r--fs/xfs/xfs_inode.h10
-rw-r--r--fs/xfs/xfs_ioctl.c6
-rw-r--r--fs/xfs/xfs_ioctl32.c3
-rw-r--r--fs/xfs/xfs_linux.h2
-rw-r--r--fs/xfs/xfs_vnode.h37
6 files changed, 20 insertions, 48 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 181605da08e4..5284a7e1630d 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -246,11 +246,11 @@ xfs_file_read_iter(
246 XFS_STATS_INC(xs_read_calls); 246 XFS_STATS_INC(xs_read_calls);
247 247
248 if (unlikely(file->f_flags & O_DIRECT)) 248 if (unlikely(file->f_flags & O_DIRECT))
249 ioflags |= IO_ISDIRECT; 249 ioflags |= XFS_IO_ISDIRECT;
250 if (file->f_mode & FMODE_NOCMTIME) 250 if (file->f_mode & FMODE_NOCMTIME)
251 ioflags |= IO_INVIS; 251 ioflags |= XFS_IO_INVIS;
252 252
253 if (unlikely(ioflags & IO_ISDIRECT)) { 253 if (unlikely(ioflags & XFS_IO_ISDIRECT)) {
254 xfs_buftarg_t *target = 254 xfs_buftarg_t *target =
255 XFS_IS_REALTIME_INODE(ip) ? 255 XFS_IS_REALTIME_INODE(ip) ?
256 mp->m_rtdev_targp : mp->m_ddev_targp; 256 mp->m_rtdev_targp : mp->m_ddev_targp;
@@ -283,7 +283,7 @@ xfs_file_read_iter(
283 * proceeed concurrently without serialisation. 283 * proceeed concurrently without serialisation.
284 */ 284 */
285 xfs_rw_ilock(ip, XFS_IOLOCK_SHARED); 285 xfs_rw_ilock(ip, XFS_IOLOCK_SHARED);
286 if ((ioflags & IO_ISDIRECT) && inode->i_mapping->nrpages) { 286 if ((ioflags & XFS_IO_ISDIRECT) && inode->i_mapping->nrpages) {
287 xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED); 287 xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED);
288 xfs_rw_ilock(ip, XFS_IOLOCK_EXCL); 288 xfs_rw_ilock(ip, XFS_IOLOCK_EXCL);
289 289
@@ -325,7 +325,7 @@ xfs_file_splice_read(
325 XFS_STATS_INC(xs_read_calls); 325 XFS_STATS_INC(xs_read_calls);
326 326
327 if (infilp->f_mode & FMODE_NOCMTIME) 327 if (infilp->f_mode & FMODE_NOCMTIME)
328 ioflags |= IO_INVIS; 328 ioflags |= XFS_IO_INVIS;
329 329
330 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) 330 if (XFS_FORCED_SHUTDOWN(ip->i_mount))
331 return -EIO; 331 return -EIO;
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index f72bffa67266..c10e3fadd9af 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -398,4 +398,14 @@ do { \
398 398
399extern struct kmem_zone *xfs_inode_zone; 399extern struct kmem_zone *xfs_inode_zone;
400 400
401/*
402 * Flags for read/write calls
403 */
404#define XFS_IO_ISDIRECT 0x00001 /* bypass page cache */
405#define XFS_IO_INVIS 0x00002 /* don't update inode timestamps */
406
407#define XFS_IO_FLAGS \
408 { XFS_IO_ISDIRECT, "DIRECT" }, \
409 { XFS_IO_INVIS, "INVIS"}
410
401#endif /* __XFS_INODE_H__ */ 411#endif /* __XFS_INODE_H__ */
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 30983b8ceaa1..12ef44e3f707 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -736,7 +736,7 @@ xfs_ioc_space(
736 xfs_ilock(ip, XFS_ILOCK_EXCL); 736 xfs_ilock(ip, XFS_ILOCK_EXCL);
737 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL); 737 xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
738 738
739 if (!(ioflags & IO_INVIS)) { 739 if (!(ioflags & XFS_IO_INVIS)) {
740 ip->i_d.di_mode &= ~S_ISUID; 740 ip->i_d.di_mode &= ~S_ISUID;
741 if (ip->i_d.di_mode & S_IXGRP) 741 if (ip->i_d.di_mode & S_IXGRP)
742 ip->i_d.di_mode &= ~S_ISGID; 742 ip->i_d.di_mode &= ~S_ISGID;
@@ -1376,7 +1376,7 @@ xfs_ioc_getbmap(
1376 return -EINVAL; 1376 return -EINVAL;
1377 1377
1378 bmx.bmv_iflags = (cmd == XFS_IOC_GETBMAPA ? BMV_IF_ATTRFORK : 0); 1378 bmx.bmv_iflags = (cmd == XFS_IOC_GETBMAPA ? BMV_IF_ATTRFORK : 0);
1379 if (ioflags & IO_INVIS) 1379 if (ioflags & XFS_IO_INVIS)
1380 bmx.bmv_iflags |= BMV_IF_NO_DMAPI_READ; 1380 bmx.bmv_iflags |= BMV_IF_NO_DMAPI_READ;
1381 1381
1382 error = xfs_getbmap(ip, &bmx, xfs_getbmap_format, 1382 error = xfs_getbmap(ip, &bmx, xfs_getbmap_format,
@@ -1520,7 +1520,7 @@ xfs_file_ioctl(
1520 int error; 1520 int error;
1521 1521
1522 if (filp->f_mode & FMODE_NOCMTIME) 1522 if (filp->f_mode & FMODE_NOCMTIME)
1523 ioflags |= IO_INVIS; 1523 ioflags |= XFS_IO_INVIS;
1524 1524
1525 trace_xfs_file_ioctl(ip); 1525 trace_xfs_file_ioctl(ip);
1526 1526
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index e65ea67e3ae3..04ffc1bc4e37 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -28,7 +28,6 @@
28#include "xfs_sb.h" 28#include "xfs_sb.h"
29#include "xfs_ag.h" 29#include "xfs_ag.h"
30#include "xfs_mount.h" 30#include "xfs_mount.h"
31#include "xfs_vnode.h"
32#include "xfs_inode.h" 31#include "xfs_inode.h"
33#include "xfs_itable.h" 32#include "xfs_itable.h"
34#include "xfs_error.h" 33#include "xfs_error.h"
@@ -537,7 +536,7 @@ xfs_file_compat_ioctl(
537 int error; 536 int error;
538 537
539 if (filp->f_mode & FMODE_NOCMTIME) 538 if (filp->f_mode & FMODE_NOCMTIME)
540 ioflags |= IO_INVIS; 539 ioflags |= XFS_IO_INVIS;
541 540
542 trace_xfs_file_compat_ioctl(ip); 541 trace_xfs_file_compat_ioctl(ip);
543 542
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index f59b966bf903..f76e44ee5db9 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -113,7 +113,7 @@ typedef __uint64_t __psunsigned_t;
113#include <asm/byteorder.h> 113#include <asm/byteorder.h>
114#include <asm/unaligned.h> 114#include <asm/unaligned.h>
115 115
116#include "xfs_vnode.h" 116#include "xfs_fs.h"
117#include "xfs_stats.h" 117#include "xfs_stats.h"
118#include "xfs_sysctl.h" 118#include "xfs_sysctl.h"
119#include "xfs_iops.h" 119#include "xfs_iops.h"
diff --git a/fs/xfs/xfs_vnode.h b/fs/xfs/xfs_vnode.h
deleted file mode 100644
index 300725dc3626..000000000000
--- a/fs/xfs/xfs_vnode.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#ifndef __XFS_VNODE_H__
19#define __XFS_VNODE_H__
20
21#include "xfs_fs.h"
22
23struct file;
24struct xfs_inode;
25struct attrlist_cursor_kern;
26
27/*
28 * Flags for read/write calls - same values as IRIX
29 */
30#define IO_ISDIRECT 0x00004 /* bypass page cache */
31#define IO_INVIS 0x00020 /* don't update inode timestamps */
32
33#define XFS_IO_FLAGS \
34 { IO_ISDIRECT, "DIRECT" }, \
35 { IO_INVIS, "INVIS"}
36
37#endif /* __XFS_VNODE_H__ */