Skip to content

New fd assign method

GekkoFS client could use another method of fd assignations using kernel fds.

  • Idea:
  1. When a new fd is needed get from opening a real file (i.e., /dev/null)
  2. Remove the fd_protecting code
  • Details:
  1. It could be done with an environment variable, so we can select the implementation
  2. Test should be redo, as some of them expects 10000 fd result (we should avoid this check as it is implementation dependent)
  3. We should identify or create tests that doesn't work with one or the other method.

Some testing have been done in branch https://storage.bsc.es/gitlab/hpc/gekkofs/-/tree/rnou/fd_prop1

OpenFileMap::safe_generate_fd_idx_()

if (CTX->protect_fds()) {
    fd = generate_fd_idx();
    }
    else {
        fd = syscall_no_intercept(
                    SYS_open, "/dev/null",
                    O_RDWR, S_IRUSR | S_IWUSR);
    }