search for: ext2_root_ino

Displaying 15 results from an estimated 15 matches for "ext2_root_ino".

2015 Dec 02
4
[PATCH 0/3] supermin: add --include-packagelist
Hi, to ease debugging issues with appliances (e.g. when used in libguestfs), using --include-packagelist will add a file containing the list of all the packages used. Thanks, Pino Toscano (3): ext2: add ext2fs_chmod and ext2fs_chown chroot: factor out file copy code Add --include-packagelist src/build.ml | 42 +++++++++++++++++++++++++------ src/chroot.ml | 29
2020 Feb 12
0
[nbdkit PATCH 3/3] ext2: Add mode for letting client exportname choose file from image
...dkit_io_manager, &h->fs); if (err != 0) { nbdkit_error ("open: %s", error_message (err)); goto err0; } - if (strcmp (file, "/") == 0) + if (strcmp (fname, "/") == 0) /* probably gonna fail, but we'll catch it later */ h->ino = EXT2_ROOT_INO; else { err = ext2fs_namei (h->fs, EXT2_ROOT_INO, EXT2_ROOT_INO, - &file[1], &h->ino); + &fname[1], &h->ino); if (err != 0) { - nbdkit_error ("%s: namei: %s", file, error_message (err)); + nbdkit...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...caml_copy_string (fs->device_name)); + caml_copy_string (data->fs->device_name)); } #if 0 @@ -638,7 +643,7 @@ ext2_copy_file (ext2_filsys fs, const char *src, const char *dest) cont: /* Look up the parent directory. */ - err = ext2fs_namei (fs, EXT2_ROOT_INO, EXT2_ROOT_INO, dirname, &dir_ino); + err = ext2fs_namei (data->fs, EXT2_ROOT_INO, EXT2_ROOT_INO, dirname, &dir_ino); if (err != 0) { /* This is the most popular supermin "WTF" error, so make * sure we capture as much information as possible. @@ -654,7 +6...
2020 Feb 12
4
[nbdkit PATCH 0/3] Make ext2 a filter
..., 0, 0, nbdkit_io_manager, &h->fs); if (err != 0) { - nbdkit_error ("%s: open: %s", disk, error_message (err)); + nbdkit_error ("open: %s", error_message (err)); goto err0; } @@ -158,7 +181,7 @@ ext2_open (int readonly) err = ext2fs_namei (h->fs, EXT2_ROOT_INO, EXT2_ROOT_INO, &file[1], &h->ino); if (err != 0) { - nbdkit_error ("%s: %s: namei: %s", disk, file, error_message (err)); + nbdkit_error ("%s: namei: %s", file, error_message (err)); goto err1; } } @@ -168,12 +19...
2018 Jun 07
4
[PATCH nbdkit 0/4] plugins: Add new "ext2" plugin, for accessing ext2, ext3 or ext4 filesystems.
There is a small test provided. I tested this a lot more locally and it seems pretty robust. Rich.
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...ache_free_extents)(struct convert_fs *fs, - struct extent_io_tree *tree); - /* Copy everything over */ - int (*copy_inodes)(struct convert_fs *fs, struct btrfs_root *root, - int datacsum, int packing, int noxattr); - - void *privdata; -}; - -#define INO_OFFSET (BTRFS_FIRST_FREE_OBJECTID - EXT2_ROOT_INO) #define STRIPE_LEN (64 * 1024) #define ORIG_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID -/* - * Open Ext2fs in readonly mode, read block allocation bitmap and - * inode bitmap into memory. - */ -static int open_ext2fs(const char *name, ext2_filsys *ret_fs) -{ - errcode_t ret; - ext2_filsys...
2014 Jul 29
4
[PATCH 0/2] supermin: improve handling of memory
Hi, the two patches improve the way memory is handled in supermin, by cleanly exiting on memory allocation failures, and free'ing memory when not needed (to keep working and not run out of memory). Pino Toscano (2): Check for failures in memory allocations Free memory buffers when not used src/ext2fs-c.c | 13 +++++++++++-- src/init.c | 13 +++++++++++++ 2 files changed, 24
2013 Mar 02
0
[GIT-PULL] ext4 inline data support
...%s: Unable to find inode from ino %lu.\n", __func__, + PVT(inode)->i_ino); + return 0; + } + + memcpy(buf, &e2_inode->i_block, inode->size); + + return inode->size; +} + static struct inode *ext2_iget_root(struct fs_info *fs) { return ext2_iget_by_inr(fs, EXT2_ROOT_INO); @@ -187,7 +209,7 @@ static struct inode *ext2_iget(const char *dname, struct inode *parent) de = ext2_find_entry(fs, parent, dname); if (!de) return NULL; - + return ext2_iget_by_inr(fs, de->d_inode); } @@ -217,7 +239,7 @@ static int cache_get_file(struct inode *inode,...
2014 Dec 24
14
[PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
Hello syslinux, Merry Christmas! These patches will make extlinux work with umounted ext2/3/4 filesystem, for example: $ extlinux -i /dev/sdXN or $ extlinux -i file_block Also it can work with something like: $ extlinux /dev/sdXN --reset-adv or $ extlinux file_block --reset-adv We don't use a new option (I planed to use "-d" but it is already in use), it will check whether the
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...> + ext2fs_close (fs); > + return -1; > + } > + > + /* First pass: This creates subdirectories in the filesystem and > + * also builds a list of files so we can identify hard links. > + */ > + for (i = 0; i < nr_dirs; ++i) { > + if (visit (dirs[i], fs, 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...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...read_bitmaps: %s", error_message (err)); + ext2fs_close (fs); + return -1; + } + + /* First pass: This creates subdirectories in the filesystem and + * also builds a list of files so we can identify hard links. + */ + for (i = 0; i < nr_dirs; ++i) { + if (visit (dirs[i], fs, 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 th...
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
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...mode_t mode, uid_t uid, gid_t gid, - time_t ctime, time_t atime, time_t mtime) -{ - errcode_t err; - - mode = LINUX_S_IFDIR | (mode & 03777); - - /* Does the directory exist? This is legitimate: we just skip - * this case. - */ - ext2_ino_t ino; - err = ext2fs_namei (fs, EXT2_ROOT_INO, dir_ino, basename, &ino); - if (err == 0) - return; /* skip */ - - /* Otherwise, create it. */ - err = ext2fs_new_inode (fs, dir_ino, mode, 0, &ino); - if (err != 0) - error (EXIT_FAILURE, 0, "ext2fs_new_inode: %s", error_message (err)); - - try_again: - err = ext2fs_m...
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. -
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will