Displaying 2 results from an estimated 2 matches for "check_direct_io".
2011 Apr 08
0
[PATCH] Btrfs: check for duplicate iov_base's when doing dio reads
...: Josef Bacik <josef@redhat.com>
---
fs/btrfs/inode.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 032e8fb..c4b914e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6205,6 +6205,7 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io
unsigned long nr_segs)
{
int seg;
+ int i;
size_t size;
unsigned long addr;
unsigned blocksize_mask = root->sectorsize - 1;
@@ -6219,8 +6220,22 @@ static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *io
ad...
2013 Jan 31
4
[RFC][PATCH 2/2] Btrfs: implement unlocked dio write
...a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6589,31 +6589,33 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
int flags = 0;
- bool wakeup = false;
+ bool wakeup = true;
int ret;
if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iov,
offset, nr_segs))
return 0;
- if (rw == READ) {
- atomic_inc(&inode->i_dio_count);
- smp_mb__after_atomic_inc();
- if (unlikely(test_bit(BTRFS_INODE_READDIO_NEED_LOCK,
- &BTRFS_I(inode)->runtime_flags))) {
- inode_dio_...