Drivers: hv: Implement the file copy service
PATCH 1/1 Drivers: hv: Implement the file copy service
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://technet.microsoft.com/en-us/library/dn464282.aspx
In this version of the patch I have addressed comments from Olaf Hering <[email protected]> and Dan Carpenter <[email protected]>
Signed-off-by K. Y. Srinivasan <[email protected]>
--- drivers/hv/Makefile | 2 +- drivers/hv/hv_fcopy.c | 422 ++++++++++++++++++++++++++++++++++++++++++++ drivers/hv/hv_util.c | 10 + include/linux/hyperv.h | 60 +++++++ tools/hv/hv_fcopy_daemon.c | 173 ++++++++++++++++++ 5 files changed, 666 insertions(+), 1 deletions(-) create mode 100644 drivers/hv/hv_fcopy.c create mode 100644 tools/hv/hv_fcopy_daemon.c
drivers/hv/Makefile +1 -1
@@ -5,4 +5,4 @@ obj-$(CONFIG_HYPERV_BALLOON) += hv_balloon.o hv_vmbus-y := vmbus_drv.o \ hv.o connection.o channel.o \ channel_mgmt.o ring_buffer.o -hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o +hv_utils-y := hv_util.o hv_kvp.o hv_snapshot.o hv_fcopy.o
drivers/hv/hv_fcopy.c new file +422 -0
422 lines not on this page · raw message
drivers/hv/hv_util.c +10 -0
@@ -82,6 +82,12 @@ static struct hv_util_service util_vss = { .util_deinit = hv_vss_deinit, }; +static struct hv_util_service util_fcopy = { + .util_cb = hv_fcopy_onchannelcallback, + .util_init = hv_fcopy_init, + .util_deinit = hv_fcopy_deinit, +}; +static void perform_shutdown (struct work_struct *dummy) {orderly_poweroff (true);
@@ -401,6 +407,10 @@ static const struct hv_vmbus_device_id id_table[] = { { HV_VSS_GUID, .driver_data = (unsigned long )&util_vss }, + /* File copy GUID */ + { HV_FCOPY_GUID, + .driver_data = (unsigned long )&util_fcopy + }, { }, };
include/linux/hyperv.h +60 -0
84 lines not on this page · raw message
tools/hv/hv_fcopy_daemon.c new file +173 -0
173 lines not on this page · raw message
Signature · 1 line
1.7.4.1