[Bugs] [Bug 1534453] New: Reading over than the file size on dispersed volume

bugzilla at redhat.com bugzilla at redhat.com
Mon Jan 15 09:55:50 UTC 2018


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

            Bug ID: 1534453
           Summary: Reading over than the file size on dispersed volume
           Product: GlusterFS
           Version: 3.12
         Component: libgfapi
          Severity: urgent
          Assignee: bugs at gluster.org
          Reporter: ibestpro at gmail.com
        QA Contact: bugs at gluster.org
                CC: bugs at gluster.org



Description of problem:
Reading over than the file size on dispersed volume

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

How reproducible:

------------------------------------------------------
Volume Name: TEST_VOL
Type: Disperse
Volume ID: be52b68d-ae83-46e3-9527-0e536b867bcc
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x (6 + 3) = 9
Transport-type: tcp
Bricks:
Brick1: server1:/data/brick1
Brick2: server2:/data/brick1
Brick3: server3:/data/brick1
Brick4: server1:/data/brick2
Brick5: server2:/data/brick2
Brick6: server3:/data/brick2
Brick7: server1:/data/brick3
Brick8: server2:/data/brick3
Brick9: server3:/data/brick3
Options Reconfigured:
network.ping-timeout: 10
performance.write-behind: on
features.quota-deem-statfs: on
features.inode-quota: on
features.quota: on
transport.address-family: inet
nfs.disable: on
------------------------------------------------------

Steps to Reproduce:
1. generating the temporary files like below command.
fallocate -l 130394  test1 
fallocate -l 667417658  test2
fallocate -l 2493251482 test3 

2. reading the files to EOF like below sources
--------------------------------------------------------------
 glfs_fd_t* fd = glfs_open (gluster_fs, "/test1", O_RDWR);

    size_t retr = 0;
    off_t offset = 0;
    unsigned char buf[128*1024] = {0,};

    while ((retr = glfs_pread(fd, buf, sizeof(buf), offset, 0)) > 0) {
        printf("retr : %ld, offset : %ld(%d) \n", retr, offset, errno);
        offset += retr;
    }

    printf("offset : %d\n", offset);
-----------------------------------------------------------------------------------------------------------------

Actual results:
print debug 

retr : 130394, offset : 42(0)
retr : 1024, offset : 130436(0)
retr : 636, offset : 131460(0)
offset : 132096(0)

Expected results:
The reading size (total offset) has to be the same with original file size
offset : 130394

Additional info:

Why the glfs_pread(or glfs_read) function reads until over than the file size ?

This is fine on dispersed (4+2) and (8+1) volume but it is occurred on (6+3) or
(6+4) or (7+2) disperse volume.
I want to know exact cause.
Thank you.

-- 
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