Bug 1350406 - [storage/posix] - posix_do_futimes function not implemented
Summary: [storage/posix] - posix_do_futimes function not implemented
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karthik U S
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1499811 1499830
TreeView+ depends on / blocked
 
Reported: 2016-06-27 11:23 UTC by Karthik U S
Modified: 2017-12-08 17:31 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.13.0
Clone Of:
: 1499811 1499830 (view as bug list)
Environment:
Last Closed: 2017-12-08 17:31:43 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Karthik U S 2016-06-27 11:23:07 UTC
Description of problem:

While I was trying to handle the utimes using the fd, it was giving the error "Function not implemented (ENOSYS)" for the posix_do_futimes function. I am not sure why this function is not complete and please correct me if this function has left incomplete, because of some reasons. Otherwise this function needs to be implemented to handle the utime changes with fds.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Niels de Vos 2016-06-27 11:45:55 UTC
There is only one call to posix_do_futimes(), in posix_fsetattr(), the handler for the FSETATTR FOP:

        if (valid & (GF_SET_ATTR_ATIME | GF_SET_ATTR_MTIME)) {
                op_ret = posix_do_futimes (this, pfd->fd, stbuf);

I'm surprised that posix_do_futimes() is not implemented.

Have you tested this with a small test program that uses futimes()?

Comment 2 Karthik U S 2016-06-27 12:02:25 UTC
Yes I have tested it. I was trying to do the state transition of a file from normal state to WORM-Retained state with the WRITE fop. While doing this it was giving this error. The current implementation is as follows:

static int
posix_do_futimes (xlator_t *this,
                  int fd,
                  struct iatt *stbuf)
{
        gf_msg (this->name, GF_LOG_WARNING, ENOSYS, P_MSG_UNKNOWN_OP,
                "function not implemented fd(%d)", fd);

        errno = ENOSYS;
        return -1;
}

I have implemented the function by looking into the posix code. I will be pushing it for review in a while.

Comment 3 Vijay Bellur 2016-06-27 12:29:40 UTC
REVIEW: http://review.gluster.org/14815 (storage/posix: Adding implementation for posix_do_futimes) posted (#1) for review on master by Karthik U S (ksubrahm)

Comment 4 Vijay Bellur 2016-07-01 07:14:41 UTC
REVIEW: http://review.gluster.org/14815 (storage/posix: Adding implementation for posix_do_futimes) posted (#2) for review on master by Karthik U S (ksubrahm)

Comment 5 Worker Ant 2017-06-20 07:08:24 UTC
REVIEW: https://review.gluster.org/14815 (storage/posix: Adding implementation for posix_do_futimes) posted (#3) for review on master by Karthik U S (ksubrahm)

Comment 6 Worker Ant 2017-10-04 06:40:36 UTC
REVIEW: https://review.gluster.org/14815 (storage/posix: Adding implementation for posix_do_futimes) posted (#4) for review on master by Karthik U S (ksubrahm)

Comment 7 Worker Ant 2017-10-05 12:57:39 UTC
COMMIT: https://review.gluster.org/14815 committed in master by Jeff Darcy (jeff.us) 
------
commit 601b6547f2c53651b88a0560a41d702db06c0d1c
Author: karthik-us <ksubrahm>
Date:   Mon Jun 27 17:17:56 2016 +0530

    storage/posix: Adding implementation for posix_do_futimes
    
    Adding the implementation for the posix_do_futimes function which is
    not complete in the current implementation and giving the ENOSYS error.
    
    Change-Id: I9cfc95a7ea293b0a2df8efd4ac80d0120b3120e4
    BUG: 1350406
    Signed-off-by: karthik-us <ksubrahm>

Comment 8 Shyamsundar 2017-12-08 17:31:43 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.13.0, please open a new bug report.

glusterfs-3.13.0 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://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/


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