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

2014-01-20 Thread KY Srinivasan
ject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Mon, Jan 20, KY Srinivasan wrote: > > > I am cleaning up the code based on your feedback. By the time I am > > done with my cleanup, I doubt if this patch would apply. Do you mind > > if I

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

2014-01-20 Thread Olaf Hering
On Mon, Jan 20, KY Srinivasan wrote: > I am cleaning up the code based on your feedback. By the time I am > done with my cleanup, I doubt if this patch would apply. Do you mind > if I were to include your changes here as part of my cleanup? Yes, thats fine. Olaf -- To unsubscribe from this list

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

2014-01-20 Thread KY Srinivasan
fle.de] > Sent: Thursday, January 16, 2014 2:49 AM > To: KY Srinivasan > Cc: gre...@linuxfoundation.org; linux-kernel@vger.kernel.org; > de...@linuxdriverproject.org; a...@canonical.com; jasow...@redhat.com > Subject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service >

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

2014-01-16 Thread Dan Carpenter
On Thu, Jan 16, 2014 at 10:42:01AM +0100, Olaf Hering wrote: > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > +enum hv_fcopy_op { > > + START_FILE_COPY = 0, > > + WRITE_TO_FILE, > > + COMPLETE_FCOPY, > > + CANCEL_FCOPY, > > +}; > > + > > +struct hv_fcopy_hdr { > > + enum hv_fcopy_op opera

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

2014-01-16 Thread KY Srinivasan
ubject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > This function should return valid numbers: > > > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > > + size

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

2014-01-16 Thread KY Srinivasan
ubject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > Implement the file copy service for Linux guests on Hyper-V. This permits > > the > > host to copy a file (over VMBUS) into the guest. This fac

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

2014-01-16 Thread KY Srinivasan
ubject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > +++ b/include/linux/hyperv.h > > @@ -26,6 +26,8 @@ > > #define _HYPERV_H > > > > #include > > +#include > > +#inc

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

2014-01-16 Thread KY Srinivasan
ubject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > +enum hv_fcopy_op { > > + START_FILE_COPY = 0, > > + WRITE_TO_FILE, > > + COMPLETE_FCOPY, > > + CANCEL_FCOPY, > > +}; &

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

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: This function should return valid numbers: > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > + size_t count, loff_t *ppos) > +{ > + int error = 0; > + > + if (count != sizeof(int)) > + return

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

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > Implement the file copy service for Linux guests on Hyper-V. This permits the > host to copy a file (over VMBUS) into the guest. This facility is part of > "guest integration services" supported on the Windows platform. > Here is a link that provides addit

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

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +++ b/include/linux/hyperv.h > @@ -26,6 +26,8 @@ > #define _HYPERV_H > > #include > +#include > +#include limits.h is not required. Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

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

2014-01-16 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +enum hv_fcopy_op { > + START_FILE_COPY = 0, > + WRITE_TO_FILE, > + COMPLETE_FCOPY, > + CANCEL_FCOPY, > +}; > + > +struct hv_fcopy_hdr { > + enum hv_fcopy_op operation; > + uuid_le service_id0; /* currently unused */ > + uuid_le

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

2014-01-15 Thread KY Srinivasan
; Subject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > +static int hv_start_fcopy(struct hv_start_fcopy *smsg) > > > + if (access((char *)smsg->path_name, F_OK)) { > > + if (smsg-&

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

2014-01-15 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +static int hv_start_fcopy(struct hv_start_fcopy *smsg) > + if (access((char *)smsg->path_name, F_OK)) { > + if (smsg->copy_flags & CREATE_PATH) { > + if (mkdir((char *)smsg->path_name, 0755)) { KY, I guess this needs

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

2014-01-14 Thread KY Srinivasan
ubject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service > > On Tue, Jan 14, K. Y. Srinivasan wrote: > > > > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > > + size_t count, loff_t *ppos) > > +{ > >

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

2014-01-14 Thread Olaf Hering
On Tue, Jan 14, K. Y. Srinivasan wrote: > +static ssize_t fcopy_write(struct file *file, const char __user *buf, > + size_t count, loff_t *ppos) > +{ > + int error = 0; > + > + if (count != sizeof(int)) > + return 0; > + > + if (copy_from_user(&error, b

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

2014-01-14 Thread K. Y. Srinivasan
Implement the file copy service for Linux guests on Hyper-V. This permits the host to copy a file (over VMBUS) into the guest. This facility is part of "guest integration services" supported on the Windows platform. Here is a link that provides additional details on this functionality: http://tech