RE: [PATCH 3/6] mgmt and concat_buf: using concat_buf in mgmt.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Jan 2012 09:15:43 +0000
Alexander Nezhinsky <alexandern@xxxxxxxxxxxx> wrote:

> > From: FUJITA Tomonori [fujita.tomonori@xxxxxxxxxxxxx]
> > Sent: Thursday, January 12, 2012 2:04 AM
> > +     {
> > +             concat_buf_init(&b, &mtask->rsp_buf, &mtask->rsp_bsize);
> 
> > Can we kill rsp_buf? That is, we can simply write the response to
> > *FILE?
> 
> What do you mean? To redirect the FILE* directly to the socket, somehow?
> 
> My implementation separated concat_buf and its use, so that it 
> is employed for response in tgtd and for request in tgtadm. 
> It leaves the resulting string in the user-supplied buffer pointer, 
> and the buffer can be handled and used as required by a specific
> user context. Do you see anything wrong with this approach?

I thought about more cleanup like adding something like FILE *rsp_fp.
Then "show" functions like tgt_target_show_all just call
fprintf. tgtd reads fp and write the data to ipc socket. I don't think
"show" functions need to handle buffers directly.


--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux