RE: [PATCH 1/1] Drivers: hv: Implement the file copy service

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

 




> -----Original Message-----
> From: Olaf Hering [mailto:olaf@xxxxxxxxx]
> Sent: Thursday, January 09, 2014 4:04 AM
> To: KY Srinivasan
> Cc: gregkh@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> devel@xxxxxxxxxxxxxxxxxxxxxx; apw@xxxxxxxxxxxxx; jasowang@xxxxxxxxxx
> Subject: Re: [PATCH 1/1] Drivers: hv: Implement the file copy service
> 
> On Wed, Jan 08, K. Y. Srinivasan wrote:
> 
> > +++ b/tools/hv/hv_fcopy_daemon.c
> 
> > +		len = pread(fcopy_fd, buffer, (4096 * 2), 0);
> > +
> > +		if (len <= 0) {
> > +			syslog(LOG_ERR, "Read error: %s\n", strerror(errno));
> > +			continue;
> 
> This could flood syslog. I think the error should be logged just once.
> Maybe like this:
> 
>         if (len <=0) {
>                 if (!error) {
>                         syslog(...);
>                         error = HV_ERROR_NOT_SUPPORTED;
>                 }
>                 continue;
>         }
> 
> > +		}
> > +		in_msg = (struct hv_fcopy_hdr *)buffer;
> > +
> > +		switch (in_msg->operation) {
> > +		case START_FILE_COPY:
> > +			error = hv_start_fcopy((struct hv_start_fcopy *)in_msg);

Will do. 

K. Y
> 
> Olaf
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux