1. 06 Jan, 2023 1 commit
    • Tigran Mkrtchyan's avatar
      libs: use oncrpc4j-3.3.0 · cbe5d31c
      Tigran Mkrtchyan authored
      New major release with highlights:
      
      -  added possibility to add call interceptor
      -  update dependency to grizzly-4.0.0 and guava-31
      -  optimized encoding of grizzly Buffers and NIO ByteBuffers
      
      Changelog for oncrpc4j-3.2.0..oncrpc4j-3.3.0
      * [8b927c9] [maven-release-plugin] prepare for next development iteration
      * [9ca5fe1] rpc: introduce OncRpcSvcBuilder#withCallInterceptor
      * [6061c9f] rpc: add unit tests for RpcDispatcher
      * [438b3a3] libs: use up-to-date guava-31
      * [bc9e812] libs: use grizzly-4.0.0
      * [18c432c] benchmarks: simplify way to run benchmarks
      * [f7cf70a] rpc: drop RpcMessage class
      * [755944a] xdr: optimize encoding of ByteBuffer
      * [4e98f79] rpc: make empty Subject static final field
      * [d2f26e2] test: skip tests that can be made under java19
      * [506c949] rpc: move RPC record marking into GrizzlyRpcTransport
      * [032d7dc] xrd: add Xdr#xdrEncodeShallowByteBuffer(Buffer)
      * [7d6e0fb] test: fix hard coded port number
      * [cd19d6f] test: fix broken test
      * [9987da7] [maven-release-plugin] prepare branch 3.3
      * [f2a1df6] [maven-release-plugin] prepare release oncrpc4j-3.3.0
      
      Acked-by: Lea Morschel
      Acked-by: Paul Millar
      Target: master, 0.22
      cbe5d31c
  2. 27 Dec, 2022 2 commits
  3. 28 Oct, 2022 2 commits
  4. 27 Oct, 2022 3 commits
    • Tigran Mkrtchyan's avatar
      test: add test to check NFSClient lease expiration · 8668e280
      Tigran Mkrtchyan authored
      Acked-by: Lea Morschel
      Target: master
      8668e280
    • Tigran Mkrtchyan's avatar
      test: make ManualClock accessible to other time-based tests · 88ecc6db
      Tigran Mkrtchyan authored
      some time related tests may require manual time adjustments, thus will
      benefits from existing ManualClock implementation.
      
      Acked-by: Albert Rossi
      Target: master
      88ecc6db
    • Tigran Mkrtchyan's avatar
      nfs4: update state handler to use java.time.Clock · 874b8168
      Tigran Mkrtchyan authored
      Motivation:
      The use of System.currentMillis() make it hard to implement time based
      tests. Thus use of java.time.Clock provides a more flexible time source
      that can instrumented during testing, if needed.
      
      Modification:
      Update NFSv4StateHandler and NFS4Client to use java.time.Clock. Update
      Cache and CacheElement to use Duration.
      
      Result:
      non-functional API change that provide self documenting API with better
      testing capabilities.
      
      Acked-by: Lea Morschel
      Acked-by: Paul Millar
      Target: master
      874b8168
  5. 25 Oct, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      nfs: propagate NFS errors of server-side-copy to the client · 225dcf12
      Tigran Mkrtchyan authored
      Motivation:
      when server-side-copy with an NFS error, like NOT_SUPP, then we want
      this error to be propagated to the client.
      
      Modification:
      Update OperationCOPY to map only non NFS errors to EIO.
      
      Result:
      proper error handling.
      
      Acked-by: Albert Rossi
      Target: master
      225dcf12
  6. 24 Oct, 2022 1 commit
  7. 23 Oct, 2022 1 commit
    • Tigran Mkrtchyan's avatar
      nfs4: expose open files known to FileTracker · 91708e30
      Tigran Mkrtchyan authored
      Motivation:
      As being stateful NFSv4.0 keeps the track of currently open files. This
      information might be important to server implementations, for example to
      dCache:
      
      ```
      admin > show opens
      Open files:
      
      00004A19604BF9A140BEB7B19FEFAEB87C56 (/public/2GB):
        7156940215641243649 ([::1]:678)
      
      0000D57D61A4046F4CA19961196D9CBA1F90 (/public/10GB):
        7156940215641243649 ([::1]:678)
      ```
      
      Modification:
      add FileTracker#getOpenFiles, that returns maps of open files.
      
      Result:
      More information for server implementations.
      
      Acked-by: Albert Rossi
      Target: master
      91708e30
  8. 27 Sep, 2022 3 commits
  9. 16 Sep, 2022 2 commits
  10. 08 Jun, 2022 1 commit
  11. 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
  12. 05 Apr, 2022 1 commit
  13. 31 Mar, 2022 2 commits
  14. 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
  15. 21 Mar, 2022 1 commit
  16. 24 Jan, 2022 1 commit
  17. 18 Jan, 2022 3 commits
  18. 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
  19. 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
  20. 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
  21. 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
  22. 14 Dec, 2021 2 commits
  23. 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
  24. 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