Dan Kenigsberg has submitted this change and it was merged.
Change subject: Have direct file not use the O_DIRECT flag on tmpfs and ramfs ......................................................................
Have direct file not use the O_DIRECT flag on tmpfs and ramfs
tmpfs and ramfs don't support the O_DIRECT flags. This is intentional as O_DIRECT tells the kernel to bypass the page-cache and those file systems live solely on the page cache. Since the effect desired by direct IO is accomplished on these file systems without the flag there is no reason for the use to test the FS every time before opening a file for direct access.
The reason we keep the same class instead of falling back to the regular file object is so we keep the semantics of the DirectFile() class and the user doesn't have to care that the underlying FS doesn't really support direct IO.
Change-Id: I7db4136c1a34d960b17312c2c785fc3234b24b92 Signed-off-by: Saggi Mizrahi smizrahi@redhat.com --- M vdsm/storage/fileUtils.py M vdsm/storage/mount.py 2 files changed, 33 insertions(+), 2 deletions(-)
Approvals: Shu Ming: Looks good to me, but someone else must approve Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/9595 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I7db4136c1a34d960b17312c2c785fc3234b24b92 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com