1. 27 Apr, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      nfs42: fix NFSERR_BAD_STATEID for server side copy with locks · cd924aaa
      Tigran Mkrtchyan authored
      Motivation:
      As COPY operation can be called on files when locks are held, then
      instead of open state ids the COPY will be called with lock state ids.
      
      Modification:
      Update COPY operation to use open state ids when file open modes are
      checked.
      
      Result:
      passing NFS compatibility tests.
      
      Acked-by: Lea Morschel
      Target: master, 0.23
      cd924aaa
  2. 05 Apr, 2022 1 commit
  3. 31 Mar, 2022 2 commits
  4. 22 Mar, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      util: use StampetLock to improve cache efficiency · f6706b5f
      Tigran Mkrtchyan authored
      Motivation:
      The cache class uses a regular lock object to guard the access to
      cache's internal storage. The same lock is used for read and writes.
      As cache's access pattern typically read dominated, the concurrent reads
      are appreciated. However, the Cache#get might remove expired entries, thus
      a shared read lock should be promoted into a write lock.
      
      As Cache class is used as NFS client session holder, any nfs4.x accesses
      (mostly) read or write into it, thus cache throughput has a direct influence
      on the NFS server performace in concurrent environments.
      
      Modification:
      Use StampedLock to guard the access to Cache's internal storage. Promote
      read lock to a write lock if needed or re-lock with a read lock before
      modifying.
      
      Result:
      Better cache throughput in read dominated concurrent environment.
      
      ReentrantLock
        Benchmark                          Mode  Cnt        Score        Error  Units
        CacheBenchmark.cacheGetBenchmark  thrpt   25  3362040,369 ± 166081,245  ops/s
      
      StampetLock
        Benchmark                          Mode  Cnt        Score        Error  Units
        CacheBenchmark.cacheGetBenchmark  thrpt   25  5280790,414 ± 162177,161  ops/s
      
      Target: master
      Acked-by: Lea Morschel
      f6706b5f
  5. 21 Mar, 2022 1 commit
  6. 24 Jan, 2022 1 commit
  7. 18 Jan, 2022 3 commits
  8. 17 Jan, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      nfsv42: update OperationCOPY to support async copy · 55410441
      Tigran Mkrtchyan authored
      Motivation:
      For a big files client might request an async copy. Moreover, the server
      itself might decide to switch to async mode if requests takes too long.
      Thus the server should be ready to notify the client when copy is complete.
      
      Modification:
      Update OperationCOPY to (a) use async copy if requests or switch to
      async mode if copyFileRange syscall takes too long.
      
      Result:
      async behavior for server-side-copy
      
      Acked-by: Paul Millar
      Target: master
      55410441
  9. 13 Jan, 2022 4 commits
    • Tigran Mkrtchyan's avatar
      tests: fix spelling of methods in StatTest · 20968d28
      Tigran Mkrtchyan authored
      Acked-by: Lea Morschel
      Target: master
      20968d28
    • Tigran Mkrtchyan's avatar
      vfs: drop Stat#get/setFileId methods · 67da9322
      Tigran Mkrtchyan authored
      Motivation:
      A typical (POSIX) filesystem has only one unique identifier for a file,
      so called inode number. However, dCache as inumber and a corresponding
      pnfsid. As being originally developed as a part of dcache, nfs4j have
      inherited that and exposes as Stat#ino and Stat#fileid. After some
      iterations, only `fileid` is used, and `ino` kept as 32 bit version of
      it.
      
      Modification:
      drop Stat#get/setFileId methods in favor of Stat#get/setIno (for better
      compliance with POSIX). Update `ino` to 64 bit long. Update codebase to
      use `ino`.
      
      Result:
      less confusions with a price of small incompatibility with earlier
      versions.
      
      Acked-by: Lea Morschel
      Acked-by: Paul Millar
      Target: master
      67da9322
    • Tigran Mkrtchyan's avatar
      vfs: add javadoc to org.dcache.nfs.vfs.Stat · b12dbeb8
      Tigran Mkrtchyan authored
      Acked-by: Lea Morschel
      Target: master
      b12dbeb8
    • Tigran Mkrtchyan's avatar
      tests: add Stat#set/getBtime test · b23268d4
      Tigran Mkrtchyan authored
      Acked-by: Lea Morschel
      Target: master
      b23268d4
  10. 12 Jan, 2022 2 commits
    • Tigran Mkrtchyan's avatar
      vfs: fix commit 7d670d7e · 55c7b2db
      Tigran Mkrtchyan authored
      Target: master
      55c7b2db
    • Tigran Mkrtchyan's avatar
      vfs: expose files creation (birth) time · 7d670d7e
      Tigran Mkrtchyan authored
      Motivation:
      the new developments on the client side start to proper
      handle files creation time, thus this is a good time for
      nfs4j to support it as well.
      
      Modification:
      Introduce Stat#set/getBTime. Update NFS code to use btime if provided.
      
      Result:
      first steps to support of file creation time.
      
      Acked-by: Paul Millar
      Target: master
      7d670d7e
  11. 11 Jan, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      libs use oncrpc-3.2.0 · 1e0a4bd6
      Tigran Mkrtchyan authored
      Feature release with highlights:
      
          added possibility to control memory pool used by underlying grizzly NIO framework
          improvements in RPC-over-TLS
          support builds with java17
          up-to-date dependencies
      
      Changelog for oncrpc4j-3.2.0...oncrpc4j-3.1.0
      * [ada2353] [maven-release-plugin] prepare for next development iteration
      * [b42847a] [maven-release-plugin] prepare release oncrpc4j-3.1.0
      * [7b531eb] readme: add latest release badge
      * [6cd0cab] pom: add profile to sign artifacts
      * [1e91d7a] test: improve test coverage of XdrLong
      * [9328681] rpc: remove complete timeout task after request is complete
      * [c66adbf] rpc: change ABI to have more predictable client behaviour
      * [22fdabb] portmap: don't use Boolean object when primitive is required
      * [cef527b] portmap: don't create an array when calling vararg method
      * [5b97286] Use HTTPS instead of HTTP to resolve dependencies
      * [a96f091] readme: describe how to use RPC-over-TLS
      * [3c627fa] test: add TLS-over-UDP (DTLS) test
      * [d433442] build(deps): bump guava from 24.1-jre to 24.1.1-jre
      * [2085136] build(deps): bump junit from 4.12 to 4.13.1
      * [3e86824] rpc: fix typo in error message
      * [b60d201] pom: require java11
      * [b95b59a] portmap: fix unnecessary array creation for logging
      * [d4ffc78] Log the address we disconnected from in the exception
      * [54cf59c] xdr: remote redundant bracket
      * [c4b9961] oncrpc: add ability to control memory allocator
      * [95a99b4] gss: remove unused imports
      * [2d47552] rpcsvc: use try-with-resource when updating portmap
      * [656391d] rpc: fix typo in a comment
      * [cab1d81] rpc: move MemoryAllocator into org.dcache.oncrpc4j.rpc package
      * [f67311c] rpc: drop SimpleRpcClient and SimpleRpcServer
      * [d0f33a0] junit: simplify unit test assertions
      * [cf298a5] rpc: add RpcCall#startTLS to simplify the API
      * [5b1b405] build(deps-dev): bump bcprov-ext-jdk15on from 1.60 to 1.67
      * [50ad1f0] pom: use grizzly-3.0.0
      * [ec08f5d] rpc-over-tls: use per-connection STARTTLS attribute
      * [e04037d] pom: use java-17 capable jacoco-0.8.7
      * [9926a66] rpc: ensure that client on startTLS sends an empty verifier
      * [7ecf686] rpc: introduce RpcTransport#isTLS
      * [87985be] gss: don't use grizzly buffer without need
      * [801cce6] xdr: pass grizzly memory managet to Xdr
      * [afb7577] [maven-release-plugin] prepare branch 3.2
      * [65accd1] [maven-release-plugin] prepare release oncrpc4j-3.2.0
      
      Acked-by: Lea Morschel
      Target: master
      1e0a4bd6
  12. 14 Dec, 2021 2 commits
  13. 17 Nov, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      client: fix desired file attributes propagation on create · dfd3ec8b
      Tigran Mkrtchyan authored
      Motivation:
      The attribute bitmap+xdr should provide attributes that applied on
      file/directory creation. The current implementation in test client code
      is broken as bitmask calculation is wrong.
      
      Modification:
      Update client code to use bitmap4#of instead of custom implementation.
      add a possibility to specify different attributes for file and
      directories.
      
      Result:
      valid XDR on the wire.
      
      Fixes: #109
      Acked-by: Paul Millar
      Target: master
      dfd3ec8b
  14. 27 Sep, 2021 2 commits
    • Tigran Mkrtchyan's avatar
      nfs4: simplify aceflag4 acemask4 acetype4 classes · 0d9f5ff4
      Tigran Mkrtchyan authored
      Motivation:
      The values use by aceflag4, acemask4 and acetype4 are wrapped by uint32_t
      ints.
      
      Modification:
      Simplify aceflag4, acemask4 and acetype4 by dropping extra uint32 wrapper.
      
      Result:
      less work for GC.
      
      Acked-by: Paul Millar
      Acked-by: Lea Morschel
      Target: master
      0d9f5ff4
    • Tigran Mkrtchyan's avatar
      nfs4: include ACE flags in toString method · fde87013
      Tigran Mkrtchyan authored
      Motivation:
      The ACE flags are missing in the result of nfsace4#toString method and
      introduce a confusion during debugging.
      
      Modification:
      include ACE flags in toString method
      
      Result:
      consistent output in logs
      
      Acked-by: Paul Millar
      Acked-by: Lea Morschel
      Target: master
      fde87013
  15. 01 Sep, 2021 1 commit
  16. 31 Aug, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      nfsv42: initial support for intra-server copy · 91b31e05
      Tigran Mkrtchyan authored
      Motivation:
      the newer libc make use of copy_file_range function, that directly
      mapped to NFSv4.2 COPY request.
      
      Modification:
      Add initial implementation on OperationCOPY that synchronously copies
      the data between two open files.
      
      Result:
      initial step to support intra-server copy.
      
      Acked-by: Paul Millar
      Target: master
      91b31e05
  17. 05 May, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      src: don't use guava's Files#asCharSink · b1956bee
      Tigran Mkrtchyan authored
      Guava's implementation of Files#asCharSink s marked @Beta and can be replaced
      with java native Files#writeString.
      
      Result:
      less dependency on guava's non stable API.
      
      Acked-by: Paul Millar
      Acked-by: Lea Morschel
      Target: master
      b1956bee
  18. 04 May, 2021 1 commit
  19. 22 Apr, 2021 1 commit
  20. 26 Feb, 2021 3 commits
    • Tigran Mkrtchyan's avatar
      nfsv3: merge NameUtils and HimeraNfsUtils into single class · 1ec32c54
      Tigran Mkrtchyan authored
      Motivation:
      There are no reasons to have to utility classes in a single package
      (plus Himera vs Chimera)
      
      Modification:
      merge NameUtils and HimeraNfsUtils into single class Utils class,
      including corresponding tests.
      
      Result:
      same code, less classes
      
      Acked-by: Marina Sahakyan
      Target: master
      1ec32c54
    • Tigran Mkrtchyan's avatar
      nfsv3: simplify uid3, gid3 objects · 235e266d
      Tigran Mkrtchyan authored
      Motivation:
      uid3 and gid3 object are wraps around uint32, which is by itself wrap around
      int.
      
      Modification:
      simplify buid3 and gid3y wrapping directly int
      
      Result:
      less load on GC.
      
      Acked-by: Paul Millar
      Acked-by: Marina Sahakyan
      Target: master
      235e266d
    • Tigran Mkrtchyan's avatar
      nfsv3: simplify size3 object · 2056c670
      Tigran Mkrtchyan authored
      Motivation:
      size3 object is a wrap around uint64, which is by itself wrap around
      long.
      
      Modification:
      simplify size3 by wrapping directly long
      
      Result:
      less load on GC.
      
      Acked-by: Marina Sahakyan
      Acked-by: Paul Millar
      Target: master
      2056c670
  21. 22 Feb, 2021 3 commits
  22. 18 Feb, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      nfsv41: remove unused Layouts class · 521abf66
      Tigran Mkrtchyan authored
      Not used as the functionality is handles by implementations of
      LayoutDriver interface.
      
      Acked-by: Lea Morschel
      Acked-by: Paul Millar
      Acked-by: Albert Rossi
      Target: master
      521abf66
  23. 29 Jan, 2021 1 commit
  24. 07 Jan, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      nfs4: improve state handler concurrency · 44fa34cd
      Tigran Mkrtchyan authored
      Motivation:
      The state handler keeps track of NFSv4 clients. This duty is not
      symmetric - updates happen when a client is added or removed, but
      queried almost for any compound operation in a session. Thus on a
      busy system we can observe thread serialization.
      
      Modification:
      replace synchronized blocks with read/write locks.
      
      Result:
      a better concurrency in a multi-client environment.
      
      Acked-by: Paul Millar
      Acked-by: Albert Rossi
      Target: master
      44fa34cd
  25. 05 Jan, 2021 1 commit
    • Tigran Mkrtchyan's avatar
      nfs3: fix readdir entry size calculation · ea6f71a3
      Tigran Mkrtchyan authored
      Motivation:
      when estimating readdir reply size we should not forget about boolean
      flag that indicates the presence of a next entry.
      
      Modification:
      fix entry overhead size.
      
      Result:
      The returned xdr doesn't overflow expected reply size.
      
      Acked-by: Paul Millar
      Target: master, 0.22
      ea6f71a3
  26. 21 Dec, 2020 1 commit
  27. 13 Dec, 2020 1 commit