Displaying 5 results from an estimated 5 matches for "generic_segment_check".
Did you mean:
generic_segment_checks
2010 Apr 15
1
[PATCH] ocfs2: avoid direct write if we fall back to buffered v2
...nsertions(+), 11 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index de059f4..0240de7 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1973,18 +1973,18 @@ relock:
/* communicate with ocfs2_dio_end_io */
ocfs2_iocb_set_rw_locked(iocb, rw_level);
- if (direct_io) {
- ret = generic_segment_checks(iov, &nr_segs, &ocount,
- VERIFY_READ);
- if (ret)
- goto out_dio;
+ ret = generic_segment_checks(iov, &nr_segs, &ocount,
+ VERIFY_READ);
+ if (ret)
+ goto out_dio;
- count = ocount;
- ret = generic_write_checks(file, ppos, &count,
- S_ISBLK(inod...
2013 Jul 25
0
[PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
..._path.dentry->d_name.len,
file->f_path.dentry->d_name.name,
- (unsigned int)nr_segs);
+ (unsigned long long)pos);
if (iocb->ki_left == 0)
return 0;
@@ -2343,28 +2341,24 @@ relock:
/* communicate with ocfs2_dio_end_io */
ocfs2_iocb_set_rw_locked(iocb, rw_level);
- ret = generic_segment_checks(iov, &nr_segs, &ocount,
- VERIFY_READ);
- if (ret)
- goto out_dio;
- count = ocount;
+ count = iov_iter_count(iter);
ret = generic_write_checks(file, ppos, &count,
S_ISBLK(inode->i_mode));
if (ret)
goto out_dio;
if (direct_io) {
- written = generic_fil...
2013 Jan 09
0
[PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec
..._path.dentry->d_name.len,
file->f_path.dentry->d_name.name,
- (unsigned int)nr_segs);
+ (unsigned long long)pos);
if (iocb->ki_left == 0)
return 0;
@@ -2344,28 +2342,24 @@ relock:
/* communicate with ocfs2_dio_end_io */
ocfs2_iocb_set_rw_locked(iocb, rw_level);
- ret = generic_segment_checks(iov, &nr_segs, &ocount,
- VERIFY_READ);
- if (ret)
- goto out_dio;
- count = ocount;
+ count = iov_iter_count(iter);
ret = generic_write_checks(file, ppos, &count,
S_ISBLK(inode->i_mode));
if (ret)
goto out_dio;
if (direct_io) {
- written = generic_fil...
2011 Jan 19
0
Bug#603727: xen-hypervisor-4.0-amd64: i386 Dom0 crashes after doing some I/O on local storage (software Raid1 on SAS-drives with mpt2sas driver)
...3440.615656] [<ffffffff8110985c>] ? writeback_inodes_wb+0x424/0x4ff
[163440.615662] [<ffffffff810bc18f>] ?
balance_dirty_pages_ratelimited_nr+0x192/0x332
[163440.615669] [<ffffffff810b5bf5>] ? generic_file_buffered_write+0x1f5/0x278
[163440.615676] [<ffffffff810b4329>] ? generic_segment_checks+0x50/0x76
[163440.615682] [<ffffffff810b6029>] ? __generic_file_aio_write+0x25f/0x293
[163440.615688] [<ffffffff810b60b6>] ? generic_file_aio_write+0x59/0x9f
[163440.615694] [<ffffffff810ef716>] ? do_sync_write+0xce/0x113
[163440.615699] [<ffffffff8101079c>] ? __switch_...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
just in case it was actually a short read and we need to just return.
This is similar to what already happens in the write case. If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO. BTRFS needs this because if we encounter a
compressed or