Bug 1700295 - The data couldn't be flushed immediately even with O_SYNC in glfs_create or with glfs_fsync/glfs_fdatasync after glfs_write.
Summary: The data couldn't be flushed immediately even with O_SYNC in glfs_create or w...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 6
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
Assignee: Xiubo Li
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-16 09:26 UTC by Xiubo Li
Modified: 2020-03-17 04:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-17 04:09:19 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Xiubo Li 2019-04-16 09:26:32 UTC
Description of problem:

In gluster-block project we had hit a case where we will sometimes get old block metadata with blockGetMetaInfo(), which will glfs_read from the block file, after updating the block metadata with GB_METAUPDATE_OR_GOTO(), which will glfs_write the block file.

In GB_METAUPDATE_OR_GOTO, it basically open the metafile with the O_SYNC, write the new details and close it in-place, which should flush the data to metafile. But looks like in glusterfs-api-devel-6.0-0.4.rc1.fc29.x86_64 it will not be flushed in time.

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




How reproducible:
In RHEL 7 by using the gluster-blocl/tests/basic.t script with glusterfs-api-devel-6.0-0.4.rc1.fc29.x86_64 it is very easy to reproduce, in my setups almost 40%.

Steps to Reproduce:
1. git clone https://github.com/gluster/gluster-block.git
2. build it from source and install it
3. install the tcmu-runner package or use the upstream code
4. $ ./tests/basic.t



Actual results:
Delete will fail sometimes

Expected results:
Delete should be success

Additional info:

More detail please see
https://github.com/gluster/gluster-block/issues/204
https://github.com/gluster/gluster-block/pull/209


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