Bug 1236271 - Introduce an ATOMIC_WRITE flag in posix writev
Summary: Introduce an ATOMIC_WRITE flag in posix writev
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: 3.7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1233617
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-27 05:48 UTC by Krutika Dhananjay
Modified: 2015-07-30 09:51 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.7.3
Doc Type: Bug Fix
Doc Text:
Clone Of: 1233617
Environment:
Last Closed: 2015-07-30 09:51:45 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2015-06-27 05:48:25 UTC
+++ This bug was initially created as a clone of Bug #1233617 +++

Description of problem:

posix_writev performs
a) stat (prestat) on the given fd
b) requested write, and
c) stat (poststat) on the given fd

in a lockless manner. When two or more io-threads try to write to the same file in parallel, chances are that the stats gathered per write are not truly reflective of the change (in the number of bytes and blocks) caused by the individual writes. Sometimes it is useful for translators above (like sharding) to know the exact change in the number of bytes per write.

The xlator interested in this behavior could pass a flag in xdata to posix, instructing it to give the precise delta bytes and block count. And posix could ensure this happens by first holding inode->lock, performing a), b) and c) and then unlocking the mutex.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-06-22 07:41:11 EDT ---

REVIEW: http://review.gluster.org/11345 (storage/posix: Introduce flag instructing posix to perform prestat, writev and poststat atomically) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Anand Avati on 2015-06-23 06:30:47 EDT ---

REVIEW: http://review.gluster.org/11345 (storage/posix: Introduce flag instructing posix to perform prestat, writev and poststat atomically) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Anand Avati on 2015-06-25 08:07:03 EDT ---

REVIEW: http://review.gluster.org/11345 (storage/posix: Introduce flag instructing posix to perform prestat, writev and poststat atomically) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 1 Anand Avati 2015-06-27 06:15:33 UTC
REVIEW: http://review.gluster.org/11439 (storage/posix: Introduce flag instructing posix to perform prestat, writev and poststat atomically) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 2 Anand Avati 2015-06-27 11:03:58 UTC
COMMIT: http://review.gluster.org/11439 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit ea1039c177ec781506fdae01132a7a876620693f
Author: Krutika Dhananjay <kdhananj>
Date:   Mon Jun 22 17:06:07 2015 +0530

    storage/posix: Introduce flag instructing posix to perform prestat, writev and poststat atomically
    
            Backport of: http://review.gluster.org/11345
    
    Change-Id: I0d7e3a851c744777083974ec4cdb01b08c23727b
    BUG: 1236271
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/11439
    Tested-by: NetBSD Build System <jenkins.org>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 3 Kaushal 2015-07-30 09:51:45 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.3, please open a new bug report.

glusterfs-3.7.3 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/12078
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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