why Daisy Chain error?

11 views
Skip to first unread message

binlong

unread,
Sep 4, 2011, 4:25:17 AM9/4/11
to KFS User
Dear all,

I tried to encrypt the data stored by kfs.So I changed the code of
qcdio/qcdiskqueue.cpp.

in line 942 of the file qcdio/qcdiskqueue.cpp,
if (theReadFlag) {
const ssize_t theNRd = readv(theFd, inIoVecPtr,
theIoVecCnt);
unsigned char plaintext[4097];
for( int i = 0; i != theIoVecCnt; ++i){
int data_length = inIoVecPtr[i].iov_len;
unsigned char* Ptr = (unsigned
char*)inIoVecPtr[i].iov_base;
diskenc_encrypt_with_ctx(Ptr, data_length, plaintext,
ctx, tweak);
memcpy(Ptr, plaintext, data_length);
}

in line 964 of it,
// here I add some encrypt code
BuffersIterator encItr(*this, inReq, inReq.mBufferCount);
unsigned char ciphertext[4097];
for(int i=0;i<theIoVecCnt;i++){
unsigned char *Ptr =(unsigned char
*)inIoVecPtr[i].iov_base;
int data_length = inIoVecPtr[i].iov_len;
diskenc_encrypt_with_ctx(Ptr, data_length, ciphertext,
ctx, tweak);
memcpy(Ptr, ciphertext, data_length);
encItr.Put((char*)Ptr);
}
const ssize_t theNWr = writev(theFd, inIoVecPtr,
theIoVecCnt);

However, after my modification.
When there are only one metaserver(192.168.0.110) and one
chunkserver(192.168.0.111),the KFS can work well.The data in KFS
chunks can be encrypted and the data that I read from KFS are
correctly decrypted no matter how large the file size is.

However ,when I add more than one chunkservers,the KFS can only read/
write small files sucessfully.When I tried to write a file of 1MB
size,the system will show me the following errors:


09-04-2011 16:22:41.247 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:22:41.247 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 1, offset = 0, error = -22
09-04-2011 16:22:41.248 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:22:46.264 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=2
09-04-2011 16:22:46.454 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:22:46.454 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 2, offset = 0, error = -22
09-04-2011 16:22:46.454 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:22:51.463 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=3
09-04-2011 16:22:51.652 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:22:51.652 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 3, offset = 0, error = -22
09-04-2011 16:22:51.653 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:22:56.661 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=4
09-04-2011 16:22:56.851 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:22:56.851 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 4, offset = 0, error = -22
09-04-2011 16:22:56.851 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:01.860 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=5
09-04-2011 16:23:02.053 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:02.053 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 5, offset = 0, error = -22
09-04-2011 16:23:02.053 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:07.060 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=6
09-04-2011 16:23:07.251 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:07.251 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 6, offset = 0, error = -22
09-04-2011 16:23:07.251 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:07.251 INFO - (KfsWrite.cc:652) Retries failed: Write
on chunk 3 failed because of error: (code = -22 ) Invalid argument
09-04-2011 16:23:07.348 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 0 numBytes = 1048576
09-04-2011 16:23:07.348 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 6, offset = 0, error = -1001
09-04-2011 16:23:07.348 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -1001
09-04-2011 16:23:12.357 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=7
09-04-2011 16:23:12.546 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:12.546 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 7, offset = 0, error = -22
09-04-2011 16:23:12.546 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:17.564 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=8
09-04-2011 16:23:17.754 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:17.754 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 8, offset = 0, error = -22
09-04-2011 16:23:17.754 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:22.763 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=9
09-04-2011 16:23:22.953 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:22.953 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 9, offset = 0, error = -22
09-04-2011 16:23:22.953 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:27.962 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=10
09-04-2011 16:23:28.153 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:28.153 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 10, offset = 0, error = -22
09-04-2011 16:23:28.153 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:33.159 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=3, version=11
Totally, 1048576 bytes have been written!
Write file finished!
09-04-2011 16:23:33.349 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:23:33.349 INFO - (KfsWrite.cc:800) Write failed...chunk
= 3, version = 11, offset = 0, error = -22
09-04-2011 16:23:33.349 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.111 30000 192.168.0.112 30000 Will retry allocation/write on
chunk 3 due to error code: -22
09-04-2011 16:23:33.349 INFO - (KfsWrite.cc:652) Retries failed: Write
on chunk 3 failed because of error: (code = -22 ) Invalid argument

binlong

unread,
Sep 4, 2011, 4:33:26 AM9/4/11
to KFS User
while I try to write a 10MB file:

09-04-2011 16:30:57.861 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:30:57.861 INFO - (KfsWrite.cc:928) sync status: -22
offset = 1048576 numBytes = 1048576
09-04-2011 16:30:57.876 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:30:57.876 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 1, offset = 0, error = -22
09-04-2011 16:30:57.876 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:02.890 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=5, version=2
09-04-2011 16:31:03.196 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:31:03.196 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 1048576 numBytes = 1048576
09-04-2011 16:31:03.207 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:31:03.207 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 2, offset = 0, error = -22
09-04-2011 16:31:03.207 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:08.213 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=5, version=3
09-04-2011 16:31:08.533 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:31:08.533 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 1048576 numBytes = 1048576
09-04-2011 16:31:08.544 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:31:08.544 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 3, offset = 0, error = -22
09-04-2011 16:31:08.544 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:13.553 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=5, version=4
09-04-2011 16:31:13.874 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:31:13.874 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 1048576 numBytes = 1048576
09-04-2011 16:31:13.884 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:31:13.884 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 4, offset = 0, error = -22
09-04-2011 16:31:13.884 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:18.893 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=5, version=5
09-04-2011 16:31:19.212 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:31:19.212 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 1048576 numBytes = 1048576
09-04-2011 16:31:19.224 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:31:19.224 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 5, offset = 0, error = -22
09-04-2011 16:31:19.224 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:24.232 INFO - (KfsWrite.cc:705) Forced allocation:
chunk=5, version=6
Was able to write only: -22 instead of 10485760
Totally, -22 bytes have been written!
Write file finished!
09-04-2011 16:31:24.556 INFO - (KfsWrite.cc:928) sync status: -22
offset = 0 numBytes = 1048576
09-04-2011 16:31:24.556 INFO - (KfsWrite.cc:928) sync status: -1001
offset = 1048576 numBytes = 1048576
09-04-2011 16:31:24.563 INFO - (KfsWrite.cc:928) sync status: -22
offset = 2097152 numBytes = 1048576
09-04-2011 16:31:24.563 INFO - (KfsWrite.cc:800) Write failed...chunk
= 5, version = 6, offset = 0, error = -22
09-04-2011 16:31:24.563 INFO - (KfsWrite.cc:628) Daisy-chain:
192.168.0.112 30000 192.168.0.111 30000 Will retry allocation/write on
chunk 5 due to error code: -22
09-04-2011 16:31:24.564 INFO - (KfsWrite.cc:652) Retries failed: Write
on chunk 5 failed because of error: (code = -22 ) Invalid argument
09-04-2011 16:31:24.564 INFO - (KfsWrite.cc:359) Write failed lxh/foo.
2 @offset: 0: asked: 10485760, did: 0, errorcode = -22
Reply all
Reply to author
Forward
0 new messages