NvmfStorageEndpoint: Number of logical blocks fix type

jNVMf API has been changed to take int instead of long, fix code
accordingly.

Signed-off-by: Jonas Pfefferle <peppe...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-crail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crail/commit/4a303c82
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crail/tree/4a303c82
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crail/diff/4a303c82

Branch: refs/heads/master
Commit: 4a303c827a6fb68781bf2380b85a1ffa9cdfc8c3
Parents: 176bc39
Author: Jonas Pfefferle <peppe...@apache.org>
Authored: Tue Apr 10 11:03:24 2018 +0200
Committer: Jonas Pfefferle <peppe...@apache.org>
Committed: Tue Apr 10 13:19:03 2018 +0200

----------------------------------------------------------------------
 .../org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/4a303c82/storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java
----------------------------------------------------------------------
diff --git 
a/storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java
 
b/storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java
index 655a304..58c7543 100644
--- 
a/storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java
+++ 
b/storage-nvmf/src/main/java/org/apache/crail/storage/nvmf/client/NvmfStorageEndpoint.java
@@ -204,7 +204,7 @@ public class NvmfStorageEndpoint implements StorageEndpoint 
{
                long startingLBA = startingAddress / getLBADataSize();
                sqe.setStartingLba(startingLBA);
                /* TODO: on read this potentially overwrites data beyond the 
set limit */
-               short numLogicalBlocks = (short)getNumLogicalBlocks(buffer);
+               int numLogicalBlocks = getNumLogicalBlocks(buffer);
                buffer.limit(buffer.position() + numLogicalBlocks * 
getLBADataSize());
                sqe.setNumberOfLogicalBlocks(numLogicalBlocks);
                int remoteKey = registeredBufferCache.getRemoteKey(buffer);

Reply via email to