search for: ocfs2_file_read_iter

Displaying 13 results from an estimated 13 matches for "ocfs2_file_read_iter".

2013 Jul 25
0
[PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
...iter(iocb, iter, *ppos, + ppos, count, 0); current->backing_dev_info = NULL; } @@ -2520,7 +2514,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in, in->f_path.dentry->d_name.name, len); /* - * See the comment in ocfs2_file_aio_read() + * See the comment in ocfs2_file_read_iter() */ ret = ocfs2_inode_lock_atime(inode, in->f_path.mnt, &lock_level); if (ret < 0) { @@ -2535,19 +2529,18 @@ bail: return ret; } -static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, - const struct iovec *iov, - unsigned long nr_segs, - loff_t pos) +static...
2013 Jan 09
0
[PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec
...iter(iocb, iter, *ppos, + ppos, count, 0); current->backing_dev_info = NULL; } @@ -2524,7 +2518,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in, in->f_path.dentry->d_name.name, len); /* - * See the comment in ocfs2_file_aio_read() + * See the comment in ocfs2_file_read_iter() */ ret = ocfs2_inode_lock_atime(inode, in->f_vfsmnt, &lock_level); if (ret < 0) { @@ -2539,19 +2533,18 @@ bail: return ret; } -static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, - const struct iovec *iov, - unsigned long nr_segs, +static ssize_t ocfs2_file_re...
2023 Feb 27
2
report BUG: io_uring triggers umount error
...t; str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt)); >> //printf("%s\n", kstack); >> } >> } >> ``` >> > > I am not familiar with io_uring, and can't make sure my analysis is correct. > Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails > io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure > issue. > > io_issue_sqe > + io_assign_file //call fget(), but missing fput() > + def->issue() > | io_read > | + io_iter_do_read > | | ocfs2_...
2023 May 20
3
[PATCH v21 22/30] ocfs2: Provide a splice-read stub
...| 39 ++++++++++++++++++++++++++++++++++++++- fs/ocfs2/ocfs2_trace.h | 3 +++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..f7e00b5689d5 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2581,6 +2581,43 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb, return ret; } +static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos, + struct pipe_inode_info *pipe, + size_t len, unsigned int flags) +{ + struct inode *inode = file_inode(in); + ssize_t ret = 0; + int lock_level = 0; + + trace_ocfs2_file_s...
2023 Feb 26
1
report BUG: io_uring triggers umount error
...:%lld <%p> mnt:%p\n", > str($f->f_path.dentry->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt)); > //printf("%s\n", kstack); > } > } > ``` > I am not familiar with io_uring, and can't make sure my analysis is correct. Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure issue. io_issue_sqe + io_assign_file //call fget(), but missing fput() + def->issue() | io_read | + io_iter_do_read | | ocfs2_file_read_iter | | return: -EOPNOTSUPP /...
2023 Mar 01
1
report BUG: io_uring triggers umount error
...try->d_name.name), $cnt.counter, kptr($f), kptr($f->f_path.mnt)); >>> //printf("%s\n", kstack); >>> } >>> } >>> ``` >>> >> >> I am not familiar with io_uring, and can't make sure my analysis is correct. >> Because ocfs2_file_read_iter() returns -EOPNOTSUPP, then fails >> io_iter_do_read(), the io_issue_sqe missing fput() which causes umount failure >> issue. >> >> io_issue_sqe >> + io_assign_file //call fget(), but missing fput() >> + def->issue() >> | io_read >> | + io_i...
2023 May 19
0
[PATCH v20 19/32] ocfs2: Provide a splice-read stub
...42 +++++++++++++++++++++++++++++++++++++++++- fs/ocfs2/ocfs2_trace.h | 3 +++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..27c54a71ec57 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2581,6 +2581,46 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb, return ret; } +static ssize_t ocfs2_file_splice_read(struct file *in, loff_t *ppos, + struct pipe_inode_info *pipe, + size_t len, unsigned int flags) +{ + struct inode *inode = file_inode(in); + ssize_t ret = 0; + int lock_level = 0; + + trace_ocfs2_file_s...
2023 Apr 21
1
[PATCH] ocfs2: fix missing reset j_num_trans for sync
...rom dm-linear to dm-error. this case is hanging at line 65. In 266, md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. but there is only ->j_num_trans+1 in ocfs2_start_trans, the ocfs2_commit_trans doesn't do reduction operation. call flow: ``` [md5sum] vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //no modify j_num_trans _dmerror_load_error_table //all write will return error after this line _dmerror_unmount //found j_num...
2023 Apr 22
1
[PATCH] ocfs2: fix missing reset j_num_trans for sync
...ine 65. > > In 266, md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to > do journal job. but there is only ->j_num_trans+1 in ocfs2_start_trans, > the ocfs2_commit_trans doesn't do reduction operation. > > call flow: > ``` > [md5sum] > vfs_read > ocfs2_file_read_iter > ocfs2_inode_lock_atime > ocfs2_update_inode_atime > + ocfs2_start_trans //atomic_inc j_num_trans > + ... > + ocfs2_commit_trans//no modify j_num_trans > > sync //no modify j_num_trans > > _dmerror_load_error_table //all write will return err...
2023 Feb 26
1
report BUG: io_uring triggers umount error
On Fri, Feb 24, 2023 at 06:59:47PM +0800, Joseph Qi wrote: > > > On 2/24/23 4:03 PM, Heming Zhao wrote: > > On 2/24/23 3:52 PM, Joseph Qi wrote: > >> > >> > >> On 2/24/23 3:48 PM, Heming Zhao via Ocfs2-devel wrote: > >>> On 2/24/23 2:54 PM, Joseph Qi wrote: > >>>> I can reproduce this in my local VM. > >>>>
2023 May 28
1
[PATCH 1/2] ocfs2: correct return value of ocfs2_local_free_info()
Now in ocfs2_local_free_info(), it returns 0 even if it actually fails. Though it doesn't cause any real problem since the only caller dquot_disable() ignores the return value, we'd better return correct as it is. Signed-off-by: Joseph Qi <joseph.qi at linux.alibaba.com> --- fs/ocfs2/quota_local.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git
2023 Feb 28
1
[PATCH] io_uring: fix fget leak when fs don't support nowait buffered read
..., it blames mnt_get_count() not return as expected. Do a deep investigation for fget()/fput() on related code flow, I've finally found that fget() leaks since ocfs2 doesn't support nowait buffered read. io_issue_sqe |-io_assign_file // do fget() first |-io_read |-io_iter_do_read |-ocfs2_file_read_iter // return -EOPNOTSUPP |-kiocb_done |-io_rw_done |-__io_complete_rw_common // set REQ_F_REISSUE |-io_resubmit_prep |-io_req_prep_async // override req->file, leak happens This was introduced by commit a196c78b5443 in v5.18. Fix it by don't re-assign req->file if i...
2023 Apr 30
2
[PATCH 1/2] ocfs2: fix missing reset j_num_trans for sync
...tart|commit]_trans to do journal job. But there is only ->j_num_trans+1 in ocfs2_start_trans, the ocfs2_commit_trans doesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered. call flow: ``` [md5sum] //line 53 54 vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //line 57. no modify j_num_trans _dmerror_load_error_table //all write will return error after this line _dmerror_unmount //fo...