Commit 199a31c6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Dave Chinner

fs: move struct iomap from exportfs.h to a separate header

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent 1a695a90
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Copyright (c) 2014-2016 Christoph Hellwig. * Copyright (c) 2014-2016 Christoph Hellwig.
*/ */
#include <linux/exportfs.h> #include <linux/exportfs.h>
#include <linux/iomap.h>
#include <linux/genhd.h> #include <linux/genhd.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pr.h> #include <linux/pr.h>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
*/ */
#include <linux/sunrpc/svc.h> #include <linux/sunrpc/svc.h>
#include <linux/exportfs.h> #include <linux/exportfs.h>
#include <linux/iomap.h>
#include <linux/nfs4.h> #include <linux/nfs4.h>
#include "nfsd.h" #include "nfsd.h"
......
/* /*
* Copyright (c) 2014 Christoph Hellwig. * Copyright (c) 2014 Christoph Hellwig.
*/ */
#include <linux/iomap.h>
#include "xfs.h" #include "xfs.h"
#include "xfs_format.h" #include "xfs_format.h"
#include "xfs_log_format.h" #include "xfs_log_format.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
struct dentry; struct dentry;
struct iattr; struct iattr;
struct inode; struct inode;
struct iomap;
struct super_block; struct super_block;
struct vfsmount; struct vfsmount;
...@@ -187,21 +188,6 @@ struct fid { ...@@ -187,21 +188,6 @@ struct fid {
* get_name is not (which is possibly inconsistent) * get_name is not (which is possibly inconsistent)
*/ */
/* types of block ranges for multipage write mappings. */
#define IOMAP_HOLE 0x01 /* no blocks allocated, need allocation */
#define IOMAP_DELALLOC 0x02 /* delayed allocation blocks */
#define IOMAP_MAPPED 0x03 /* blocks allocated @blkno */
#define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */
#define IOMAP_NULL_BLOCK -1LL /* blkno is not valid */
struct iomap {
sector_t blkno; /* first sector of mapping */
loff_t offset; /* file offset of mapping, bytes */
u64 length; /* length of mapping, bytes */
int type; /* type of mapping */
};
struct export_operations { struct export_operations {
int (*encode_fh)(struct inode *inode, __u32 *fh, int *max_len, int (*encode_fh)(struct inode *inode, __u32 *fh, int *max_len,
struct inode *parent); struct inode *parent);
......
#ifndef LINUX_IOMAP_H
#define LINUX_IOMAP_H 1
#include <linux/types.h>
/* types of block ranges for multipage write mappings. */
#define IOMAP_HOLE 0x01 /* no blocks allocated, need allocation */
#define IOMAP_DELALLOC 0x02 /* delayed allocation blocks */
#define IOMAP_MAPPED 0x03 /* blocks allocated @blkno */
#define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */
#define IOMAP_NULL_BLOCK -1LL /* blkno is not valid */
struct iomap {
sector_t blkno; /* first sector of mapping */
loff_t offset; /* file offset of mapping, bytes */
u64 length; /* length of mapping, bytes */
int type; /* type of mapping */
};
#endif /* LINUX_IOMAP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment