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:
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()?
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.
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)
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)
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)
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)
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>
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/