logo       

Re: meaning of ISCSI_FLG_STATUS: msg#00214

Subject: Re: meaning of ISCSI_FLG_STATUS
Am Dienstag, den 19.07.2005, 08:18 -0400 schrieb Ming Zhang:
> yes. we need a flag to achieve that goal. but there are 2 flags.
> 
> [mingz@amd64 iscsitarget-0.4.11]$ grep -rn ISCSI_FLG_STATUS *
> kernel/iscsi_hdr.h:242:#define ISCSI_FLG_STATUS         0x01
> kernel/iscsi.c:271:                     rsp->flags = ISCSI_FLG_FINAL |
> ISCSI_FLG_STATUS;
> [mingz@amd64 iscsitarget-0.4.11]$ grep -rn ISCSI_FLG_FINAL *
> kernel/iscsi_hdr.h:351:#define ISCSI_FLG_FINAL                  0x80
> kernel/iscsi.c:271:                     rsp->flags = ISCSI_FLG_FINAL |
> ISCSI_FLG_STATUS;
> kernel/iscsi.c:310:     rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:349:     rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:767:             rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:1029:            if (scsi_cmnd->pdu.bhs.flags &
> ISCSI_FLG_FINAL) {
> kernel/iscsi.c:1070:            if (req->flags & ISCSI_FLG_FINAL) {
> kernel/iscsi.c:1077:            if (!(req->flags & ISCSI_FLG_FINAL) &&
> scsi_cmnd->r2t_length == 0)
> kernel/iscsi.c:1080:            if (!(req->flags & ISCSI_FLG_FINAL))
> kernel/iscsi.c:1173:    rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:1236:            rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:1267:    rsp_hdr->flags = ISCSI_FLG_FINAL;
> kernel/iscsi.c:1423:            cmnd_set_sn(cmnd, (rsp->flags &
> ISCSI_FLG_FINAL) ? 1 : 0);
> usr/iscsi_hdr.h:135:#define ISCSI_FLG_FINAL                     0x80
> usr/iscsid.c:605:       if (req->flags & ISCSI_FLG_FINAL)
> usr/iscsid.c:606:               rsp->flags = ISCSI_FLG_FINAL;
> usr/iscsid.c:620:       rsp->flags = ISCSI_FLG_FINAL;
> 
> see ISCSI_FLG_STATUS, only set while never be evaluated.
> see ISCSI_FLG_FINAL, set and evaluated here and there.

ISCSI_FLG_STATUS *is* evaluated - by the initiator. It's a special flag
only used in Data-In PDUs and not to be confused with the Final bit. 

Arne
-- 
Arne Redlich
Xiranet Communications GmbH



-------------------------------------------------------
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>