Bug 1535401 - ioprocess writefile with direct=True does not perform direct I/O
Summary: ioprocess writefile with direct=True does not perform direct I/O
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-distribution
Classification: oVirt
Component: ioprocess
Version: 4.2.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Nir Soffer
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks: 1535370
TreeView+ depends on / blocked
 
Reported: 2018-01-17 10:11 UTC by Nir Soffer
Modified: 2018-06-29 14:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-06-10 15:26:51 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 86451 0 None None None 2018-01-17 12:47:28 UTC
oVirt gerrit 86619 0 None None None 2018-01-21 14:37:30 UTC
oVirt gerrit 86620 0 None None None 2018-01-21 14:41:28 UTC
oVirt gerrit 86621 0 None None None 2018-01-21 14:42:09 UTC

Description Nir Soffer 2018-01-17 10:11:32 UTC
Description of problem:

IOProcessClient.writefile() has a direct flag, set to False by default. When set
to True, the caller expects that ioprocess would use direct I/O (O_DIRECT), and
ioprocess has code to handle this flag, but it code is misplaced so the file is
opened without O_DIRECT, and the call is not doing buffered I/O.

We know about one user of this code - vdsm - and it does not use the direct flag,
but we want to change it to use this flag (see bug 1535370).

Version-Release number of selected component (if applicable):
Any

How reproducible:
Always

Steps to Reproduce:
1. Run ioprocess using strace -f
2. Call IProcessClient.writefile() with direct=True

Actual results:
In strace output we see that file was not opened with O_DIRECT

Expected results:
open file with O_DIRECT when direct is True.

Note: version is wrong, bugzilla does not provide all ioprocess versions.

Comment 1 Nir Soffer 2018-01-21 14:44:43 UTC
Tal, this bug blocks urgent vdsm bug targeted to 4.2.1. Suggesting 4.2.1.

I think both bugs can be deffered to 4.2.2 or later, since using direct I/O for
writing tiny files is not important.

Comment 2 Yaniv Kaul 2018-06-07 09:49:50 UTC
(In reply to Nir Soffer from comment #1)
> Tal, this bug blocks urgent vdsm bug targeted to 4.2.1. Suggesting 4.2.1.
> 
> I think both bugs can be deffered to 4.2.2 or later, since using direct I/O
> for
> writing tiny files is not important.

I think it may miss 4.2.4 as well. Shall we target it to 4.2.5?

Comment 3 Tal Nisan 2018-06-07 15:12:03 UTC
(In reply to Yaniv Kaul from comment #2)
> (In reply to Nir Soffer from comment #1)
> > Tal, this bug blocks urgent vdsm bug targeted to 4.2.1. Suggesting 4.2.1.
> > 
> > I think both bugs can be deffered to 4.2.2 or later, since using direct I/O
> > for
> > writing tiny files is not important.
> 
> I think it may miss 4.2.4 as well. Shall we target it to 4.2.5?

Yes, the patches don't seem like they are going to converge by then

Comment 4 Nir Soffer 2018-06-10 15:26:51 UTC
I'm closing this as there is no need to use direct I/O for writing small files,
and ioprocess should not be used to write files. There is no point in wasting 
time to improve ioprocess to do stuff it should not do.


Note You need to log in before you can comment on or make changes to this bug.