[Bugs] [Bug 1499830] New: [storage/posix] - posix_do_futimes function not implemented

bugzilla at redhat.com bugzilla at redhat.com
Mon Oct 9 12:58:01 UTC 2017


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

            Bug ID: 1499830
           Summary: [storage/posix] - posix_do_futimes function not
                    implemented
           Product: GlusterFS
           Version: 3.10
         Component: posix
          Keywords: Triaged
          Assignee: ksubrahm at redhat.com
          Reporter: ksubrahm at redhat.com
                CC: bugs at gluster.org, ksubrahm at redhat.com,
                    ndevos at redhat.com, rabhat at redhat.com,
                    rjoseph at redhat.com, rtalur at redhat.com
        Depends On: 1350406
            Blocks: 1499811



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

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:

--- Additional comment from Niels de Vos on 2016-06-27 07:45:55 EDT ---

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()?

--- Additional comment from Karthik U S on 2016-06-27 08:02:25 EDT ---

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.

--- Additional comment from Vijay Bellur on 2016-06-27 08:29:40 EDT ---

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 at redhat.com)

--- Additional comment from Vijay Bellur on 2016-07-01 03:14:41 EDT ---

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 at redhat.com)

--- Additional comment from Worker Ant on 2017-06-20 03:08:24 EDT ---

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 at redhat.com)

--- Additional comment from Worker Ant on 2017-10-04 02:40:36 EDT ---

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 at redhat.com)

--- Additional comment from Worker Ant on 2017-10-05 08:57:39 EDT ---

COMMIT: https://review.gluster.org/14815 committed in master by Jeff Darcy
(jeff at pl.atyp.us) 
------
commit 601b6547f2c53651b88a0560a41d702db06c0d1c
Author: karthik-us <ksubrahm at redhat.com>
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 at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1350406
[Bug 1350406] [storage/posix] - posix_do_futimes function not implemented
https://bugzilla.redhat.com/show_bug.cgi?id=1499811
[Bug 1499811] [storage/posix] - posix_do_futimes function not implemented
-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=ov16DM1SCq&a=cc_unsubscribe


More information about the Bugs mailing list