From: Bob Peterson <rpeterso@redhat.com>
To: <linux-fsdevel@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>, Al Viro <viro@ZenIV.linux.org.uk>,
Dave Chinner <david@fromorbit.com>,
Christoph Hellwig <hch@infradead.org>
Subject: [vfs PATCH v3 1/4] VFS: move iomap from exportfs.h to iomap.h
Date: Fri, 4 Mar 2016 15:11:37 -0500 [thread overview]
Message-ID: <1457122300-28514-2-git-send-email-rpeterso@redhat.com> (raw)
In-Reply-To: <1457122300-28514-1-git-send-email-rpeterso@redhat.com>
This patch moves the iomap declares from its current location in
exportfs.h to a new iomap.h. This will facilitate future improvements
such as a more efficient fiemap for holey files. Hopefully it will
one day be used for multipage writes as well.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
include/linux/exportfs.h | 16 +---------------
include/linux/iomap.h | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 15 deletions(-)
create mode 100644 include/linux/iomap.h
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index fa05e04..bb564c1 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -2,6 +2,7 @@
#define LINUX_EXPORTFS_H 1
#include <linux/types.h>
+#include <linux/iomap.h>
struct dentry;
struct iattr;
@@ -181,21 +182,6 @@ struct fid {
* 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 {
int (*encode_fh)(struct inode *inode, __u32 *fh, int *max_len,
struct inode *parent);
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
new file mode 100644
index 0000000..161c1c9
--- /dev/null
+++ b/include/linux/iomap.h
@@ -0,0 +1,20 @@
+#ifndef _IOMAP_H
+#define _IOMAP_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 */
+ ssize_t length; /* length of mapping, bytes */
+ int type; /* type of mapping */
+ void *priv; /* fs private data associated with map */
+};
+
+#endif /* _IOMAP_H */
--
2.5.0
next prev parent reply other threads:[~2016-03-04 20:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 20:11 [vfs PATCH v3 0/4] vfs: Expand iomap interface to fiemap Bob Peterson
2016-03-04 20:11 ` Bob Peterson [this message]
2016-03-15 7:29 ` [vfs PATCH v3 1/4] VFS: move iomap from exportfs.h to iomap.h Christoph Hellwig
2016-03-28 19:53 ` Bob Peterson
2016-03-29 7:40 ` Christoph Hellwig
2016-03-29 22:20 ` Dave Chinner
2016-03-30 6:47 ` Christoph Hellwig
2016-04-07 19:58 ` Bob Peterson
2016-04-07 20:42 ` Christoph Hellwig
2016-04-10 17:15 ` Christoph Hellwig
2016-04-11 6:17 ` Dave Chinner
2016-04-12 18:29 ` Christoph Hellwig
2016-04-13 0:22 ` Dave Chinner
2016-03-04 20:11 ` [vfs PATCH v3 2/4] VFS: Add new __generic_iomap_fiemap interface Bob Peterson
2016-03-07 10:18 ` Jan Kara
2016-03-15 7:33 ` Christoph Hellwig
2016-03-04 20:11 ` [vfs PATCH v3 3/4] GFS2: Add function gfs2_get_iomap Bob Peterson
2016-03-04 20:11 ` [vfs PATCH v3 4/4] GFS2: Use new iomap interface for fiemap Bob Peterson
2016-03-15 7:33 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457122300-28514-2-git-send-email-rpeterso@redhat.com \
--to=rpeterso@redhat.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.