sebastiangraf / jSCSI

A Java iSCSI Framework
http://jscsi.org
BSD 3-Clause "New" or "Revised" License
60 stars 28 forks source link

I think I found a bug at JCloudStorageModule #25

Open felipegutierrez opened 9 years ago

felipegutierrez commented 9 years ago

Hi,

I was executing Virtual Machines at jscsi and I got some bug at the JCloudStorageModule. The method storeBucket has to verify if the bucketId has different byte array.

https://github.com/sebastiangraf/jSCSI/blob/master/bundles/target/src/main/java/org/jscsi/target/storage/JCloudsStorageModule.java#L261

I change the IF for this:

if ((lastIndexWritten != pBucketId && lastBlobWritten != null) || (lastIndexWritten == pBucketId && !Arrays.equals(lastBlobWritten, pData) && lastBlobWritten != null)) {

I don't know if you agree. Maybe I could commit this on your code if you agree.

Thanks, Felipe