Skip to content

Commit

Permalink
xfs: kill xfs_vnode.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Chinner authored and Dave Chinner committed Aug 4, 2014
1 parent dd8c38b commit b92cc59
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 48 deletions.
10 changes: 5 additions & 5 deletions fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ xfs_file_read_iter(
XFS_STATS_INC(xs_read_calls);

if (unlikely(file->f_flags & O_DIRECT))
ioflags |= IO_ISDIRECT;
ioflags |= XFS_IO_ISDIRECT;
if (file->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;
ioflags |= XFS_IO_INVIS;

if (unlikely(ioflags & IO_ISDIRECT)) {
if (unlikely(ioflags & XFS_IO_ISDIRECT)) {
xfs_buftarg_t *target =
XFS_IS_REALTIME_INODE(ip) ?
mp->m_rtdev_targp : mp->m_ddev_targp;
Expand Down Expand Up @@ -283,7 +283,7 @@ xfs_file_read_iter(
* proceeed concurrently without serialisation.
*/
xfs_rw_ilock(ip, XFS_IOLOCK_SHARED);
if ((ioflags & IO_ISDIRECT) && inode->i_mapping->nrpages) {
if ((ioflags & XFS_IO_ISDIRECT) && inode->i_mapping->nrpages) {
xfs_rw_iunlock(ip, XFS_IOLOCK_SHARED);
xfs_rw_ilock(ip, XFS_IOLOCK_EXCL);

Expand Down Expand Up @@ -325,7 +325,7 @@ xfs_file_splice_read(
XFS_STATS_INC(xs_read_calls);

if (infilp->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;
ioflags |= XFS_IO_INVIS;

if (XFS_FORCED_SHUTDOWN(ip->i_mount))
return -EIO;
Expand Down
10 changes: 10 additions & 0 deletions fs/xfs/xfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,4 +398,14 @@ do { \

extern struct kmem_zone *xfs_inode_zone;

/*
* Flags for read/write calls
*/
#define XFS_IO_ISDIRECT 0x00001 /* bypass page cache */
#define XFS_IO_INVIS 0x00002 /* don't update inode timestamps */

#define XFS_IO_FLAGS \
{ XFS_IO_ISDIRECT, "DIRECT" }, \
{ XFS_IO_INVIS, "INVIS"}

#endif /* __XFS_INODE_H__ */
6 changes: 3 additions & 3 deletions fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ xfs_ioc_space(
xfs_ilock(ip, XFS_ILOCK_EXCL);
xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);

if (!(ioflags & IO_INVIS)) {
if (!(ioflags & XFS_IO_INVIS)) {
ip->i_d.di_mode &= ~S_ISUID;
if (ip->i_d.di_mode & S_IXGRP)
ip->i_d.di_mode &= ~S_ISGID;
Expand Down Expand Up @@ -1376,7 +1376,7 @@ xfs_ioc_getbmap(
return -EINVAL;

bmx.bmv_iflags = (cmd == XFS_IOC_GETBMAPA ? BMV_IF_ATTRFORK : 0);
if (ioflags & IO_INVIS)
if (ioflags & XFS_IO_INVIS)
bmx.bmv_iflags |= BMV_IF_NO_DMAPI_READ;

error = xfs_getbmap(ip, &bmx, xfs_getbmap_format,
Expand Down Expand Up @@ -1520,7 +1520,7 @@ xfs_file_ioctl(
int error;

if (filp->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;
ioflags |= XFS_IO_INVIS;

trace_xfs_file_ioctl(ip);

Expand Down
3 changes: 1 addition & 2 deletions fs/xfs/xfs_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "xfs_sb.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_vnode.h"
#include "xfs_inode.h"
#include "xfs_itable.h"
#include "xfs_error.h"
Expand Down Expand Up @@ -537,7 +536,7 @@ xfs_file_compat_ioctl(
int error;

if (filp->f_mode & FMODE_NOCMTIME)
ioflags |= IO_INVIS;
ioflags |= XFS_IO_INVIS;

trace_xfs_file_compat_ioctl(ip);

Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ typedef __uint64_t __psunsigned_t;
#include <asm/byteorder.h>
#include <asm/unaligned.h>

#include "xfs_vnode.h"
#include "xfs_fs.h"
#include "xfs_stats.h"
#include "xfs_sysctl.h"
#include "xfs_iops.h"
Expand Down
37 changes: 0 additions & 37 deletions fs/xfs/xfs_vnode.h

This file was deleted.

0 comments on commit b92cc59

Please sign in to comment.