diff options
Diffstat (limited to 'fs/xfs/xfs_iomap.h')
-rw-r--r-- | fs/xfs/xfs_iomap.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h index 31c91087cb33..4daaa5212102 100644 --- a/fs/xfs/xfs_iomap.h +++ b/fs/xfs/xfs_iomap.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2003,2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License as | 5 | * under the terms of version 2 of the GNU General Public License as |
@@ -29,9 +29,6 @@ | |||
29 | * | 29 | * |
30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | 30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ |
31 | */ | 31 | */ |
32 | |||
33 | |||
34 | |||
35 | #ifndef __XFS_IOMAP_H__ | 32 | #ifndef __XFS_IOMAP_H__ |
36 | #define __XFS_IOMAP_H__ | 33 | #define __XFS_IOMAP_H__ |
37 | 34 | ||
@@ -56,7 +53,7 @@ typedef enum { | |||
56 | BMAPI_UNWRITTEN = (1 << 3), /* unwritten extents to real extents */ | 53 | BMAPI_UNWRITTEN = (1 << 3), /* unwritten extents to real extents */ |
57 | /* modifiers */ | 54 | /* modifiers */ |
58 | BMAPI_IGNSTATE = (1 << 4), /* ignore unwritten state on read */ | 55 | BMAPI_IGNSTATE = (1 << 4), /* ignore unwritten state on read */ |
59 | BMAPI_DIRECT = (1 << 5), /* direct instead of buffered write */ | 56 | BMAPI_DIRECT = (1 << 5), /* direct instead of buffered write */ |
60 | BMAPI_MMAP = (1 << 6), /* allocate for mmap write */ | 57 | BMAPI_MMAP = (1 << 6), /* allocate for mmap write */ |
61 | BMAPI_SYNC = (1 << 7), /* sync write to flush delalloc space */ | 58 | BMAPI_SYNC = (1 << 7), /* sync write to flush delalloc space */ |
62 | BMAPI_TRYLOCK = (1 << 8), /* non-blocking request */ | 59 | BMAPI_TRYLOCK = (1 << 8), /* non-blocking request */ |
@@ -67,13 +64,13 @@ typedef enum { | |||
67 | /* | 64 | /* |
68 | * xfs_iomap_t: File system I/O map | 65 | * xfs_iomap_t: File system I/O map |
69 | * | 66 | * |
70 | * The iomap_bn field is expressed in 512-byte blocks, and is where the | 67 | * The iomap_bn field is expressed in 512-byte blocks, and is where the |
71 | * mapping starts on disk. | 68 | * mapping starts on disk. |
72 | * | 69 | * |
73 | * The iomap_offset, iomap_bsize and iomap_delta fields are in bytes. | 70 | * The iomap_offset, iomap_bsize and iomap_delta fields are in bytes. |
74 | * iomap_offset is the offset of the mapping in the file itself. | 71 | * iomap_offset is the offset of the mapping in the file itself. |
75 | * iomap_bsize is the size of the mapping, iomap_delta is the | 72 | * iomap_bsize is the size of the mapping, iomap_delta is the |
76 | * desired data's offset into the mapping, given the offset supplied | 73 | * desired data's offset into the mapping, given the offset supplied |
77 | * to the file I/O map routine. | 74 | * to the file I/O map routine. |
78 | * | 75 | * |
79 | * When a request is made to read beyond the logical end of the object, | 76 | * When a request is made to read beyond the logical end of the object, |
@@ -84,8 +81,8 @@ typedef enum { | |||
84 | typedef struct xfs_iomap { | 81 | typedef struct xfs_iomap { |
85 | xfs_daddr_t iomap_bn; /* first 512b blk of mapping */ | 82 | xfs_daddr_t iomap_bn; /* first 512b blk of mapping */ |
86 | xfs_buftarg_t *iomap_target; | 83 | xfs_buftarg_t *iomap_target; |
87 | loff_t iomap_offset; /* offset of mapping, bytes */ | 84 | xfs_off_t iomap_offset; /* offset of mapping, bytes */ |
88 | loff_t iomap_bsize; /* size of mapping, bytes */ | 85 | xfs_off_t iomap_bsize; /* size of mapping, bytes */ |
89 | size_t iomap_delta; /* offset into mapping, bytes */ | 86 | size_t iomap_delta; /* offset into mapping, bytes */ |
90 | iomap_flags_t iomap_flags; | 87 | iomap_flags_t iomap_flags; |
91 | } xfs_iomap_t; | 88 | } xfs_iomap_t; |
@@ -96,12 +93,12 @@ struct xfs_bmbt_irec; | |||
96 | 93 | ||
97 | extern int xfs_iomap(struct xfs_iocore *, xfs_off_t, ssize_t, int, | 94 | extern int xfs_iomap(struct xfs_iocore *, xfs_off_t, ssize_t, int, |
98 | struct xfs_iomap *, int *); | 95 | struct xfs_iomap *, int *); |
99 | extern int xfs_iomap_write_direct(struct xfs_inode *, loff_t, size_t, | 96 | extern int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t, |
100 | int, struct xfs_bmbt_irec *, int *, int); | 97 | int, struct xfs_bmbt_irec *, int *, int); |
101 | extern int xfs_iomap_write_delay(struct xfs_inode *, loff_t, size_t, int, | 98 | extern int xfs_iomap_write_delay(struct xfs_inode *, xfs_off_t, size_t, int, |
102 | struct xfs_bmbt_irec *, int *); | 99 | struct xfs_bmbt_irec *, int *); |
103 | extern int xfs_iomap_write_allocate(struct xfs_inode *, | 100 | extern int xfs_iomap_write_allocate(struct xfs_inode *, xfs_off_t, size_t, |
104 | struct xfs_bmbt_irec *, int *); | 101 | struct xfs_bmbt_irec *, int *); |
105 | extern int xfs_iomap_write_unwritten(struct xfs_inode *, loff_t, size_t); | 102 | extern int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, size_t); |
106 | 103 | ||
107 | #endif /* __XFS_IOMAP_H__*/ | 104 | #endif /* __XFS_IOMAP_H__*/ |