[Bugs] [Bug 1306264] New: glfs_lseek returns incorrect offset for SEEK_SET and SEEK_CUR flags

bugzilla at redhat.com bugzilla at redhat.com
Wed Feb 10 12:40:07 UTC 2016


            Bug ID: 1306264
           Summary: glfs_lseek returns incorrect offset for SEEK_SET and
                    SEEK_CUR flags
           Product: GlusterFS
           Version: mainline
         Component: libgfapi
          Severity: high
          Assignee: bugs at gluster.org
          Reporter: anoopcs at redhat.com
        QA Contact: sdharane at redhat.com
                CC: bugs at gluster.org

Created attachment 1122783
  --> https://bugzilla.redhat.com/attachment.cgi?id=1122783&action=edit
Test program

Description of problem:

When glfs_lseek() API is used with SEEK_SET and SEEK_CUR to reposition the open
file associated with a fd to the specified offset, even though the operation is
success it is not returning the resulting offset location and instead -1 is

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

How reproducible:

Steps to Reproduce:
1. Compile and build glusterfs under /usr/local/.
2. Create and start a simple distribute volume.
3. Download the attached test program and compile it.
# gcc gfapi-test-lseek.c -lgfapi -I /usr/local/include/glusterfs/ -L
# export LD_LIBRARY_PATH=/usr/local/lib
5. Run a.out
# ./a.out <volume-name> <server ip/hostname>

Actual results:
Program produced the following error message:
glfs_lseek with SEEK_SET returned -1, but expected 5
glfs_lseek with SEEK_CUR returned -1, but expected 10

Expected results:
Program should run successfully with out displaying any error message.

You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

More information about the Bugs mailing list