logo       

Re: file data corruption?: msg#00223

Subject: Re: file data corruption?
Wang, Zhenyu wrote:
On 2005.07.19 16:34:04 +0000, Wang, Zhenyu wrote:

sorry I've not follow up the whole thread, but it breaks my data digest patch.
Which I have to fix it by this one,

--- kernel/iscsi_tcp.c.1        2005-07-19 11:43:53.000000000 +0800
+++ kernel/iscsi_tcp.c  2005-07-19 15:38:37.000000000 +0800
@@ -802,6 +805,11 @@ iscsi_ctask_copy(struct iscsi_conn *conn
                return -EAGAIN;
        }

+       /* XXX: update ctask's data offset, otherwise we get
+        * negtive offset on received sg*/
+       if (ctask->data_offset)
+               ctask->data_offset += buf_size;
+
        /* done with this buffer or with both - PDU and buffer */
        conn->data_copied = 0;
        return 0;

Not sure about if this is right..

-zhen


misunderstood the meanings... this's wrong, sorry. I'll send my updated data digest patch later, after resolving the unalign issue.


zhen - I forgot to mention for your data digest patch, keep in mind that someone can be writing to the data's memory while you are calculating the digest or while you are sending it :( (look over the discussion on linux-scsi from when sfnet was being reviwed long long ago). To not have to fail the IO when this happens you will want to try and use DID_IMM_RETRY. For tape you may not want to retry the IO though. To complicate matters you also may not want to use DID_IMM_RETRY if the casue of digest mismatch is due to a transport problem. We had cases where something went bad on the target and we kept gettting back bad digests but we kept retrying the the IO on the same path (DID_IMM_RETRY does not take FAILFAST into account).


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>