[LU-10923] cl_io_loop improperly assumes all ios are rw-type IOs Created: 18/Apr/18 Updated: 29/Jan/22 Resolved: 29/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
cl_io_loop has this code: pos = io->u.ci_rw.rw_range.cir_pos;
count = io->u.ci_rw.rw_range.cir_count;
if (io->ci_pio) {
/* submit this range for parallel execution */
pt = cl_io_submit_pt(io, pos, count);
if (IS_ERR(pt)) {
cl_io_iter_fini(env, io);
rc = PTR_ERR(pt);
break;
}
*tail = pt;
tail = &pt->cip_next;
} else {
size_t nob = io->ci_nob;
CDEBUG(D_VFSTRACE,
"execute type %u range: [%llu, %llu) nob: %zu %s\n",
io->ci_type, pos, pos + count, nob,
io->ci_continue ? "continue" : "stop");
Now the io->u.ci_rw. is only valid for accessing if the IO is of type CIT_READ/WRITE, otherwise the union is populated differently. And cl_io_loop IS called by other places, for example: if (cl_io_init(env, io, CIT_FSYNC, io->ci_obj) == 0)
result = cl_io_loop(env, io);
The problematic code was introduced by |
| Comments |
| Comment by Peter Jones [ 18/Apr/18 ] |
|
Dmitry Can you please advise? Thanks Peter |
| Comment by Dmitry Eremin (Inactive) [ 18/Apr/18 ] |
|
I agree this is not correct, but not valid values are used in debug message only. Therefore this is minor issue. I will provide a patch to make it valid. |
| Comment by Gerrit Updater [ 18/Apr/18 ] |
|
Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: https://review.whamcloud.com/32049 |
| Comment by Andreas Dilger [ 29/Jan/22 ] |
|
The pio feature was removed in patch https://review.whamcloud.com/33912 " |