Dear friends, By running xfstest (generic/013) I have discovered client side misbehavior. Consider the following test code: ----- #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> int main(int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Usage: %s <path>\n", argv[0]); exit(1); } int rc = truncate(argv[1], 8192); if (rc < 0) { perror("Failed to truncate the file"); exit(4); } exit(0); } ---- The expectation is that client will send a valid open stateid with SETATTR (rfc7530#16.32.4). However, this is not the case - client just send's a SETATTR with size, but without any open. BTW, older clients (RHEL6) will fail with EIO, latest kernel, 4.13.0-rc1 goes into an infinite loop of SETATTR requests. On the other hand, ftruncate works as expected, e.q. following example: --- #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> int main(int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Usage: %s <path>\n", argv[0]); exit(1); } int fd = open(argv[1], O_RDWR, 0644); if (fd < 0) { perror("Failed to open file"); exit(2); } int rc = ftruncate(fd, 8192); if (rc < 0) { perror("Failed to truncate the file"); exit(4); } close(fd); exit(0); } ---- Will provide an open stateid with SETATTR requests as mandated by rfc. Tigran. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html