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

[Libguestfs] [PATCH 0/2] Add pwrite-device API call



These two very simple patches add a pwrite-device API call.  I have
been conservative and not yet added the equivalent pread-device call,
although that could be added in future.

The motivation for this is in virt-resize: We need a way to zap the
partition table cleanly[1], and obviously parted isn't working out for
us[2].  Using this call we can zap MBR and GPT partition tables by
overwriting them with zeroes (or zeroes + signature), and I have shown
that this works at least for MBR.

Although the semantics of pwrite and pwrite-device are not guaranteed
full write, they almost certainly do this now and we could add this
extra constraint in future.

Rich.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=633766
[2] http://lists.alioth.debian.org/pipermail/parted-devel/2010-September/003748.html

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/


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