diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 13:43:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 13:43:44 -0400 |
commit | 105a048a4f35f7a74c7cc20b36dd83658b6ec232 (patch) | |
tree | 043b1110cda0042ba35d8aae59382bb094d0af3f /include/linux/fs.h | |
parent | 00b9b0af5887fed54e899e3b7f5c2ccf5e739def (diff) | |
parent | 9aeead73782c4b8e2a91def36dbf95db28605c95 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (27 commits)
Btrfs: add more error checking to btrfs_dirty_inode
Btrfs: allow unaligned DIO
Btrfs: drop verbose enospc printk
Btrfs: Fix block generation verification race
Btrfs: fix preallocation and nodatacow checks in O_DIRECT
Btrfs: avoid ENOSPC errors in btrfs_dirty_inode
Btrfs: move O_DIRECT space reservation to btrfs_direct_IO
Btrfs: rework O_DIRECT enospc handling
Btrfs: use async helpers for DIO write checksumming
Btrfs: don't walk around with task->state != TASK_RUNNING
Btrfs: do aio_write instead of write
Btrfs: add basic DIO read/write support
direct-io: do not merge logically non-contiguous requests
direct-io: add a hook for the fs to provide its own submit_bio function
fs: allow short direct-io reads to be completed via buffered IO
Btrfs: Metadata ENOSPC handling for balance
Btrfs: Pre-allocate space for data relocation
Btrfs: Metadata ENOSPC handling for tree log
Btrfs: Metadata reservation for orphan inodes
Btrfs: Introduce global metadata reservation
...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9682d52d1507..85e823adcd4a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2251,10 +2251,15 @@ static inline int xip_truncate_page(struct address_space *mapping, loff_t from) | |||
2251 | #endif | 2251 | #endif |
2252 | 2252 | ||
2253 | #ifdef CONFIG_BLOCK | 2253 | #ifdef CONFIG_BLOCK |
2254 | struct bio; | ||
2255 | typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | ||
2256 | loff_t file_offset); | ||
2257 | void dio_end_io(struct bio *bio, int error); | ||
2258 | |||
2254 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2259 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2255 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2260 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2256 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 2261 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
2257 | int lock_type); | 2262 | dio_submit_t submit_io, int lock_type); |
2258 | 2263 | ||
2259 | enum { | 2264 | enum { |
2260 | /* need locking between buffered and direct access */ | 2265 | /* need locking between buffered and direct access */ |
@@ -2270,7 +2275,7 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2270 | dio_iodone_t end_io) | 2275 | dio_iodone_t end_io) |
2271 | { | 2276 | { |
2272 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2277 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2273 | nr_segs, get_block, end_io, | 2278 | nr_segs, get_block, end_io, NULL, |
2274 | DIO_LOCKING | DIO_SKIP_HOLES); | 2279 | DIO_LOCKING | DIO_SKIP_HOLES); |
2275 | } | 2280 | } |
2276 | 2281 | ||
@@ -2280,7 +2285,7 @@ static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | |||
2280 | dio_iodone_t end_io) | 2285 | dio_iodone_t end_io) |
2281 | { | 2286 | { |
2282 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 2287 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
2283 | nr_segs, get_block, end_io, 0); | 2288 | nr_segs, get_block, end_io, NULL, 0); |
2284 | } | 2289 | } |
2285 | #endif | 2290 | #endif |
2286 | 2291 | ||