Bug 1342903 - O_DIRECT support for sharding
Summary: O_DIRECT support for sharding
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: sharding
Version: 3.7.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On: 1342171 1347553
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-06 05:08 UTC by Krutika Dhananjay
Modified: 2016-06-28 12:19 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.7.12
Clone Of: 1342171
Environment:
Last Closed: 2016-06-28 12:19:23 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2016-06-06 05:08:36 UTC
+++ This bug was initially created as a clone of Bug #1342171 +++

Description of problem:

This bug is to track work towards making odirect writes and reads work at the level of individual shards.

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 Vijay Bellur on 2016-06-02 11:30:01 EDT ---

REVIEW: http://review.gluster.org/14191 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#7) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-03 05:32:56 EDT ---

REVIEW: http://review.gluster.org/14191 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#8) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-03 05:32:59 EDT ---

REVIEW: http://review.gluster.org/14639 (posix, shard: Use page-aligned buffer for o-direct reads) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-03 06:11:08 EDT ---

REVIEW: http://review.gluster.org/14191 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#9) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-03 06:11:11 EDT ---

REVIEW: http://review.gluster.org/14639 (posix, shard: Use page-aligned buffer for o-direct reads) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

--- Additional comment from Vijay Bellur on 2016-06-03 21:58:14 EDT ---

COMMIT: http://review.gluster.org/14639 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 9e0cdf1d2393d7bdb0eac019e70dce7c5f4f59c9
Author: Krutika Dhananjay <kdhananj>
Date:   Thu Jun 2 19:45:03 2016 +0530

    posix, shard: Use page-aligned buffer for o-direct reads
    
    and also make shard_readv_do() pass the correct flags when
    the original fd is opened with O_DIRECT.
    
    Change-Id: Ic2f8ad900743ed3f7cab56948bcf1358d247a311
    BUG: 1342171
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14639
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.com>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 1 Vijay Bellur 2016-06-06 05:52:26 UTC
REVIEW: http://review.gluster.org/14650 (posix, shard: Use page-aligned buffer for o-direct reads) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 2 Vijay Bellur 2016-06-07 06:28:58 UTC
REVIEW: http://review.gluster.org/14650 (posix, shard: Use page-aligned buffer for o-direct reads) posted (#2) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 3 Vijay Bellur 2016-06-07 07:28:19 UTC
REVIEW: http://review.gluster.org/14658 (features/shard: Don't modify readv size) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 4 Vijay Bellur 2016-06-07 09:02:28 UTC
REVIEW: http://review.gluster.org/14662 (libglusterfs: Even anonymous fds must have fd->flags set) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 5 Vijay Bellur 2016-06-07 09:02:31 UTC
REVIEW: http://review.gluster.org/14663 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 6 Vijay Bellur 2016-06-08 09:44:13 UTC
COMMIT: http://review.gluster.org/14662 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit 3a82ea38fd5b150796e1f436097ad45a629835e7
Author: Raghavendra Talur <rtalur>
Date:   Mon Apr 13 17:05:44 2015 +0530

    libglusterfs: Even anonymous fds must have fd->flags set
    
            Backport of: http://review.gluster.org/10219
    
    We do not set the same flags to anonymous fd that posix uses to open
    an anonymous fd in the backend. If there are any xlators which rely on
    these flags for their operation they may not work well.
    
    Add proper flags to anonymous fds at the time of their creation and
    refer to them for subsequent operations.
    
    Change-Id: I60d5b04ab851c31fbe4e5e74bee1af1b14daa52e
    BUG: 1342903
    Signed-off-by: Raghavendra Talur <rtalur>
    Reviewed-on: http://review.gluster.org/14662
    Tested-by: Krutika Dhananjay <kdhananj>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.com>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 7 Vijay Bellur 2016-06-09 09:35:48 UTC
REVIEW: http://review.gluster.org/14650 (posix, shard: Use page-aligned buffer for o-direct reads) posted (#3) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 8 Vijay Bellur 2016-06-09 09:41:37 UTC
REVIEW: http://review.gluster.org/14658 (features/shard: Don't modify readv size) posted (#2) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 9 Vijay Bellur 2016-06-10 08:54:58 UTC
REVIEW: http://review.gluster.org/14663 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#2) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 10 Vijay Bellur 2016-06-13 05:39:19 UTC
REVIEW: http://review.gluster.org/14663 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#3) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 11 Vijay Bellur 2016-06-15 10:02:52 UTC
REVIEW: http://review.gluster.org/14663 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#4) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 12 Vijay Bellur 2016-06-15 10:02:55 UTC
REVIEW: http://review.gluster.org/14735 (libglusterfs: Negate all but O_DIRECT flag if present on anon fds) posted (#1) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 13 Vijay Bellur 2016-06-15 11:16:02 UTC
COMMIT: http://review.gluster.org/14650 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit c1dfc0ca9d06ef9560950c6d374f8e9ed0a53fcd
Author: Krutika Dhananjay <kdhananj>
Date:   Thu Jun 2 19:45:03 2016 +0530

    posix, shard: Use page-aligned buffer for o-direct reads
    
            Backport of: http://review.gluster.org/#/c/14639/
    
    and also make shard_readv_do() pass the correct flags when
    the original fd is opened with O_DIRECT.
    
    Change-Id: I253f74459656b047de652b6aace487c0e2ac71f6
    BUG: 1342903
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14650
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 14 Vijay Bellur 2016-06-15 11:16:22 UTC
COMMIT: http://review.gluster.org/14658 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit dca4de364cd948ec7dade4416425ea1353911066
Author: Pranith Kumar K <pkarampu>
Date:   Fri Jun 3 04:22:27 2016 +0530

    features/shard: Don't modify readv size
    
            Backport of: http://review.gluster.org/14623
    
    For o-direct reads application sends aligned size which needs to be
    sent as is, otherwise o-direct writes where the file-size is not
    aligned fails.
    
    Change-Id: I66afcba41f3484da11e9a12fe2671d2051fafc8a
    BUG: 1342903
    Signed-off-by: Pranith Kumar K <pkarampu>
    Reviewed-on: http://review.gluster.org/14658
    Tested-by: Krutika Dhananjay <kdhananj>
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Krutika Dhananjay <kdhananj>
    NetBSD-regression: NetBSD Build System <jenkins.org>

Comment 15 Vijay Bellur 2016-06-16 09:04:33 UTC
REVIEW: http://review.gluster.org/14663 (core, shard: Make shards inherit main file's O_DIRECT flag if present) posted (#5) for review on release-3.7 by Krutika Dhananjay (kdhananj)

Comment 16 Vijay Bellur 2016-06-16 16:04:15 UTC
COMMIT: http://review.gluster.org/14663 committed in release-3.7 by Jeff Darcy (jdarcy) 
------
commit 9af36b95976d4e54859c9b60bd2e711518b3be6e
Author: Krutika Dhananjay <kdhananj>
Date:   Mon May 2 16:51:10 2016 +0530

    core, shard: Make shards inherit main file's O_DIRECT flag if present
    
            Backport of: http://review.gluster.org/14191
    
    If the application opens a file with O_DIRECT, the shards'
    anon fds would also need to inherit the flag. Towards this,
    shard xl would be passing the odirect flag in the @flags parameter
    to the WRITEV fop. This will be used in anon fd resolution
    and subsequent opening by posix xl.
    
    Change-Id: I3a0593fa46cc25e390a5762a0354b469c2a1532d
    BUG: 1342903
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14663
    Smoke: Gluster Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 17 Vijay Bellur 2016-06-17 00:21:24 UTC
COMMIT: http://review.gluster.org/14735 committed in release-3.7 by Pranith Kumar Karampuri (pkarampu) 
------
commit 0fea541b0b217fc3c76e6a36577b99be71e32d56
Author: Krutika Dhananjay <kdhananj>
Date:   Tue Jun 7 17:15:56 2016 +0530

    libglusterfs: Negate all but O_DIRECT flag if present on anon fds
    
            Backport of: http://review.gluster.org/14665
    
    This is to prevent any unforeseen problems that might arise due to
    writevs and readvs being wound with @flag parameter containing
    O_TRUNC or O_APPEND especially wrt translators like sharding and ec
    where O_TRUNC write or O_APPEND write on individual shards/fragments
    is not the same as O_TRUNC write or O_APPEND write as expected by the
    application.
    
    Change-Id: Ib0110731d6099bc888b7ada552a2abbea8e76051
    BUG: 1342903
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/14735
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 18 Kaushal 2016-06-28 12:19:23 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.12, please open a new bug report.

glusterfs-3.7.12 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] https://www.gluster.org/pipermail/gluster-devel/2016-June/049918.html
[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.