search for: virtual_disk

Displaying 9 results from an estimated 9 matches for "virtual_disk".

2019 Feb 22
0
[PATCH nbdkit v3 4/4] Add linuxdisk plugin.
...errno.h> + +#include <nbdkit-plugin.h> + +#include "minmax.h" +#include "rounding.h" +#include "utils.h" + +#include "virtual-disk.h" + +static int64_t estimate_size (void); +static int mke2fs (const char *filename); + +int +create_filesystem (struct virtual_disk *disk) +{ + const char *tmpdir; + char *filename = NULL; + int fd = -1; + + /* Estimate the filesystem size and compute the final virtual size + * of the disk. We only need to do this if the user didn't specify + * the exact size on the command line. + */ + if (size == 0 || size_add...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...file); +static int e2link (ext2_filsys fs, ext2_ino_t dir_ino, const char *name, + ext2_ino_t ino, int flags); +static int e2copyfiledata (ext2_filsys fs, struct file *file); + +void +load_filesystem (void) +{ + initialize_ext2_error_table (); +} + +int +create_filesystem (struct virtual_disk *disk) +{ + const char *tmpdir; + char *filename; + errcode_t err; + ext2_filsys fs; + size_t i; + struct file *files = NULL; + size_t nr_files = 0; + struct file *last_file; + bool hardlinked; + + /* Estimate the filesystem size and compute the final virtual size + * of the disk. We o...
2019 Feb 22
5
[PATCH nbdkit v3 0/4] Add linuxdisk plugin.
For v3 I reimplemented this using mke2fs -d. This obviously makes the implementation a whole lot simpler, but cannot support multiple directory merging. Patches 1-3 are the same as before. I've also reproduced the notes from v2 below. v2: - Fix inconsistent tab/space. - All 3 plugins now contain a block of text pointing to the other 2 plugins. - TMDIR -> TMPDIR - Unlink the
2019 Feb 19
6
[PATCH nbdkit v2 0/5] Add linuxdisk plugin.
Another interesting thing you can do with this plugin: https://rwmj.wordpress.com/2019/02/19/nbdkit-linuxdisk-plugin/ v2: - Fix inconsistent tab/space. - All 3 plugins now contain a block of text pointing to the other 2 plugins. - TMDIR -> TMPDIR - Unlink the temporary file and other cleanups along error paths. - fclose -> pclose, and check the return value for errors. -
2019 Feb 19
7
[PATCH nbdkit 0/4] New plugin: Add linuxdisk plugin.
Turns out Japanese trains are good for coding! In supermin we have a bunch of code to create the libguestfs appliance. It creates it directly using libext2fs (part of e2fsprogs). We can use the same technique to create ext2 virtual disks in nbdkit, which is what this new plugin does. Why a new plugin instead of modifying the floppy plugin? See the 4/4 commit message for an explanation. The
2012 May 01
6
Upgrade XEN to 4.0.1: AMD-Vi: IOMMU not found! - I/O virtualisation disabled (PCI-Passthrought didn't work again)
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...a FAT-formatted virtual floppy disk instead of a CD, see > +L<nbdkit-floppy-plugin(1)>. To create a Linux compatible virtual > +disk, see L<nbdkit-linuxdisk-plugin(1)>. ...as what you did here? > +++ b/plugins/linuxdisk/filesystem.c > +int > +create_filesystem (struct virtual_disk *disk) > +{ > + /* Add 20% to the estimate to account for the overhead of > + * filesystem metadata. Also set a minimum size. Note we are > + * only wasting virtual space (since this will be stored sparsely > + * under $TMDIR) so we can be generous here. TMPDIR &...
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...t called after files array has been populated. */ diff --git a/plugins/linuxdisk/partition-gpt.c b/plugins/linuxdisk/partition-gpt.c index 81a530d6..6380dc8f 100644 --- a/plugins/linuxdisk/partition-gpt.c +++ b/plugins/linuxdisk/partition-gpt.c @@ -197,7 +197,7 @@ create_gpt_partition_table (struct virtual_disk *disk, unsigned char *out) size_t j; for (j = 0; j < nr_regions (&disk->regions); ++j) { - const struct region *region = get_region (&disk->regions, j); + const struct region *region = &disk->regions.ptr[j]; /* Find the (only) partition region, which has...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.