Displaying 4 results from an estimated 4 matches for "compare_inod".
Did you mean:
compare_inodes
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...EXT2_ROOT_INO, &files, &nr_files) == -1)
> + return -1;
> + }
> +
> + if (nr_files > 0) {
> + assert (files != NULL);
> +
> + /* Sort the files by device and inode number to identify hard links. */
> + qsort (files, nr_files, sizeof (struct file), compare_inodes);
> +
> + /* Second pass: Copy/create the files. */
> + last_file = NULL;
> + for (i = 0; i < nr_files; ++i) {
> + hardlinked = last_file && compare_inodes (last_file, &files[i]) == 0;
> +
> + if (!hardlinked) {
> + /* Normal case:...
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
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...st char *type; /* File type (used only for debugging). */
+};
+
+static int64_t estimate_size (void);
+static int mke2fs (const char *filename);
+static int visit (const char *dir, ext2_filsys fs, ext2_ino_t dir_ino,
+ struct file **files, size_t *nr_files);
+static int compare_inodes (const void *f1, const void *f2);
+static int e2mkdir (ext2_filsys fs, ext2_ino_t dir_ino, const char *name,
+ const struct stat *statbuf, ext2_ino_t *ino);
+static int e2emptyinode (ext2_filsys fs, ext2_ino_t dir_ino,
+ const char *name, const struct st...
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.
-