search for: ki_pos

Displaying 20 results from an estimated 25 matches for "ki_pos".

2013 Jul 25
0
[PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
...truct iov_iter *iter, + loff_t pos) { int ret, direct_io, appending, rw_level, have_alloc_sem = 0; int can_do_direct, has_refcount = 0; ssize_t written = 0; - size_t ocount; /* original count */ size_t count; /* after file limit checks */ loff_t old_size, *ppos = &iocb->ki_pos; u32 old_clusters; @@ -2239,11 +2237,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, OCFS2_MOUNT_COHERENCY_BUFFERED); int unaligned_dio = 0; - trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry, + trace_ocfs2_file_write_iter(inode, file, file->f_path.de...
2013 Jan 09
0
[PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec
...truct iov_iter *iter, + loff_t pos) { int ret, direct_io, appending, rw_level, have_alloc_sem = 0; int can_do_direct, has_refcount = 0; ssize_t written = 0; - size_t ocount; /* original count */ size_t count; /* after file limit checks */ loff_t old_size, *ppos = &iocb->ki_pos; u32 old_clusters; @@ -2238,11 +2236,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, OCFS2_MOUNT_COHERENCY_BUFFERED); int unaligned_dio = 0; - trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry, + trace_ocfs2_file_write_iter(inode, file, file->f_path.de...
2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
...erofs/data.c @@ -376,7 +376,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) if (bdev) blksize_mask = bdev_logical_block_size(bdev) - 1; else - blksize_mask = (1 << inode->i_blkbits) - 1; + blksize_mask = i_blockmask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask) -- 2.25.1
2023 Mar 10
1
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...file_read_iter(struct kiocb *iocb, struct iov_iter *to) >> if (bdev) >> blksize_mask = bdev_logical_block_size(bdev) - 1; >> else >> - blksize_mask = i_blocksize(inode) - 1; >> + blksize_mask = i_blockmask(inode); >> >> if ((iocb->ki_pos | iov_iter_count(to) | >> iov_iter_alignment(to)) & blksize_mask) >> -- >> 2.25.1 >>
2023 Mar 10
3
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) > if (bdev) > blksize_mask = bdev_logical_block_size(bdev) - 1; > else > - blksize_mask = i_blocksize(inode) - 1; > + blksize_mask = i_blockmask(inode); > > if ((iocb->ki_pos | iov_iter_count(to) | > iov_iter_alignment(to)) & blksize_mask) > -- > 2.25.1 >
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
...da..829ac9c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1263,7 +1263,7 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, { struct file *filp = iocb->ki_filp; ssize_t retval; - unsigned long seg; + unsigned long seg = 0; size_t count; loff_t *ppos = &iocb->ki_pos; @@ -1290,21 +1290,47 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, retval = mapping->a_ops->direct_IO(READ, iocb, iov, pos, nr_segs); } - if (retval > 0) + if (retval > 0) { *ppos = pos + retval; - if (retval) { + count -= retval...
2023 Mar 09
8
[PATCH v3 1/6] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v3: -none v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b
2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
...ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) > if (bdev) > blksize_mask = bdev_logical_block_size(bdev) - 1; > else > - blksize_mask = (1 << inode->i_blkbits) - 1; > + blksize_mask = i_blockmask(inode); > > if ((iocb->ki_pos | iov_iter_count(to) | > iov_iter_alignment(to)) & blksize_mask)
2012 Jan 28
0
Re: [PATCH 3/3] filemap: don't call generic_write_sync for -EIOCBQUEUED
...ff --git a/mm/filemap.c b/mm/filemap.c > index c4ee2e9..004442f 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -2634,7 +2634,7 @@ ssize_t generic_file_aio_write(struct kiocb > *iocb, const struct iovec *iov, ret = __generic_file_aio_write(iocb, > iov, nr_segs, &iocb->ki_pos); mutex_unlock(&inode->i_mutex); > > - if (ret > 0 || ret == -EIOCBQUEUED) { > + if (ret > 0) { > ssize_t err; > > err = generic_write_sync(file, pos, ret); -- Martin ''Helios'' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710...
2010 May 12
0
[PATCH 1/4] fs: allow short direct-io reads to be completed via buffered IO V2
...da..829ac9c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1263,7 +1263,7 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, { struct file *filp = iocb->ki_filp; ssize_t retval; - unsigned long seg; + unsigned long seg = 0; size_t count; loff_t *ppos = &iocb->ki_pos; @@ -1290,21 +1290,47 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, retval = mapping->a_ops->direct_IO(READ, iocb, iov, pos, nr_segs); } - if (retval > 0) + if (retval > 0) { *ppos = pos + retval; - if (retval) { + count -= retval...
2010 May 06
1
[PATCH 1/3] fs: allow short direct-io reads to be completed via buffered IO V2
...da..829ac9c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1263,7 +1263,7 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, { struct file *filp = iocb->ki_filp; ssize_t retval; - unsigned long seg; + unsigned long seg = 0; size_t count; loff_t *ppos = &iocb->ki_pos; @@ -1290,21 +1290,47 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, retval = mapping->a_ops->direct_IO(READ, iocb, iov, pos, nr_segs); } - if (retval > 0) + if (retval > 0) { *ppos = pos + retval; - if (retval) { + count -= retval...
2023 Mar 09
5
[PATCH v2 1/5] fs: add i_blockmask()
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. ---------------------------------------------------------------------- Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()").
2023 Mar 10
5
[PATCH v4 1/5] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h
2018 Nov 03
0
[PATCH 1/1] Add vhost_blk driver
...quot;READ", req->hdr.sector, len); 156 157 req->len = len; 158 rem_len = len; 159 iov_iter_init(&req->i, (write ? WRITE : READ), 160 write ? &req->out_iov[0] : &req->in_iov[0], 161 nr_seg, len); 162 163 req->iocb.ki_pos = sector << 9; 164 req->iocb.ki_filp = blk->backend; 165 req->iocb.ki_complete = vhost_blk_iocb_complete; 166 req->iocb.ki_flags = IOCB_DIRECT; 167 168 if (write) 169 ret = call_write_iter(blk->backend, &req->iocb, 170 &req...
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all: This series tries to implement rx batching for vhost-net. This is done by batching the dequeuing from skb_array which was exported by underlayer socket and pass the sbk back through msg_control to finish userspace copying. Tests shows at most 19% improvment on rx pps. Please review. Thanks Jason Wang (8): ptr_ring: introduce batch dequeuing skb_array: introduce batch dequeuing
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all: This series tries to implement rx batching for vhost-net. This is done by batching the dequeuing from skb_array which was exported by underlayer socket and pass the sbk back through msg_control to finish userspace copying. Tests shows at most 19% improvment on rx pps. Please review. Thanks Jason Wang (8): ptr_ring: introduce batch dequeuing skb_array: introduce batch dequeuing
2018 Nov 02
0
[PATCH 1/1] Add vhost_blk driver
...uot; : "READ", req->hdr.sector, len); > + > + req->len = len; > + rem_len = len; > + iov_iter_init(&req->i, (write ? WRITE : READ), > + write ? &req->out_iov[0] : &req->in_iov[0], > + nr_seg, len); > + > + req->iocb.ki_pos = sector << 9; > + req->iocb.ki_filp = blk->backend; > + req->iocb.ki_complete = vhost_blk_iocb_complete; > + req->iocb.ki_flags = IOCB_DIRECT; > + > + if (write) > + ret = call_write_iter(blk->backend, &req->iocb, > + &req->i)...
2007 Jan 02
0
[PATCH 1/4] add scsi-target and IO_CMD_EPOLL_WAIT patches
...+ iocb->private = NULL; ++ /* drop the i/o reference */ ++ aio_put_req(iocb); ++ } else ++ ret = -EAGAIN; ++ ++ event->res = event->res2 = 0; ++ /* drop the cancel reference */ ++ aio_put_req(iocb); ++ ++ return ret; ++} ++ ++/* ++ * iocb->ki_nbytes -- number of events ++ * iocb->ki_pos -- relative timeout in milliseconds ++ * iocb->private -- NULL first go; after that, it''s set to the the ++ * absolute timeout in jiffies. ++ */ ++ssize_t eventpoll_aio_wait(struct kiocb *iocb) ++{ ++ struct file *file = iocb->ki_filp; ++ ssize_t ret = -EINVA...
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-
2012 Jul 12
2
[PATCH 3/5] vhost: Make vhost a separate module
Currently, vhost-net is the only consumer of vhost infrastructure. So vhost infrastructure and vhost-net driver are in a single module. Separating this as a vhost.ko module and a vhost-net.ko module makes it is easier to share code with other vhost drivers, e.g. vhost-blk.ko, tcm-vhost.ko. Signed-off-by: Asias He <asias at redhat.com> --- drivers/vhost/Kconfig | 10 +++++++++-