[Bugs] [Bug 1259726] New: sharding - Fix reads on zero-byte shards representing holes in the file

bugzilla at redhat.com bugzilla at redhat.com
Thu Sep 3 12:41:23 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1259726

            Bug ID: 1259726
           Summary: sharding - Fix reads on zero-byte shards representing
                    holes in the file
           Product: GlusterFS
           Version: 3.7.4
         Component: sharding
          Keywords: Triaged
          Severity: high
          Priority: high
          Assignee: bugs at gluster.org
          Reporter: kdhananj at redhat.com
        QA Contact: bugs at gluster.org
                CC: bugs at gluster.org
        Depends On: 1259651
            Blocks: 1258386 (Gluster-HC-1)



+++ This bug was initially created as a clone of Bug #1259651 +++

Description of problem:

Found a bug while reading code where if a readv() falls partly in a region of
the sharded file that contains holes which are represented by the existence of
zero-byte shards (for instance block-0 file is one example which will exist by
default since creation under its parent directory but _may_ not have any data
written into it and there could be other blocks that are written to by the
application). In this case, a read on such a shard would return 0 bytes,
although internally shard translator is supposed to interpret that as a hole
(filled with zeroes) and update op_ret (the final exit status of the read which
is the number of bytes read) based on the following logic:

  read size of ith shard = { shard_block_size if (last_shard_index > i),
                             (offset % shard_block_size)     otherwise 

Failing to do so could cause reads from the application to prematurely exit if
shard translator returns "zero bytes read" status,
or in some cases return fewer bytes read than are actually filled in the actual
buffer, which could mislead the translators above shard or even the
application.


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 2015-09-03 06:31:36 EDT ---

REVIEW: http://review.gluster.org/12099 (features/shard: Fix incorrect op_ret
in READV) posted (#1) for review on master by Krutika Dhananjay
(kdhananj at redhat.com)


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1258386
[Bug 1258386] [TRACKER] Gluster Hyperconvergence - Phase 1
https://bugzilla.redhat.com/show_bug.cgi?id=1259651
[Bug 1259651] sharding - Fix reads on zero-byte shards representing holes
in the file
-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list