search for: ext2_ino_t

Displaying 20 results from an estimated 25 matches for "ext2_ino_t".

2016 Jul 06
0
[PATCH] ext2: Don't load whole files into memory when copying to the appliance (RHBZ#1113065).
...++++++---------------------- 1 file changed, 78 insertions(+), 49 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index cb9282b..96a3de0 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -185,6 +185,7 @@ supermin_ext2fs_read_bitmaps (value fsv) static void ext2_mkdir (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t atime, time_t mtime); static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t ati...
2017 Jul 13
3
[PATCH supermin v2] ext2: Create symlinks properly (RHBZ#1470157).
...-------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index 2743da7..e8ab972 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -191,7 +191,6 @@ supermin_ext2fs_read_bitmaps (value fsv) static void ext2_mkdir (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t atime, time_t mtime); static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t ati...
2017 Jul 12
3
[PATCH supermin] ext2: Create symlinks properly (RHBZ#1470157).
...--------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index 2743da7..0b3b29e 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -191,7 +191,6 @@ supermin_ext2fs_read_bitmaps (value fsv) static void ext2_mkdir (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t atime, time_t mtime); static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *dirname, const char *basename, mode_t mode, uid_t uid, gid_t gid, time_t ctime, time_t ati...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...TRIPE_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 ext2_fs; - ext2_ino_t ino; - ret = ext2fs_open(name, 0, 0, 0, unix_io_manager, &ext2_fs); - if (ret) { - fprintf(stderr, "ext2fs_open: %s\n", error_message(ret)); - goto fail; - } - ret = ext2fs_read_inode_bitmap(ext2_fs); - if (ret) { - fprintf(stderr, "ext2fs_read_inode_bitmap: %s\n", - er...
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...val (fsv); + if (data.fs == NULL) ext2_handle_closed (); - err = ext2fs_read_bitmaps (fs); + err = ext2fs_read_bitmaps (data.fs); if (err != 0) ext2_error_to_exception ("ext2fs_read_bitmaps", err, NULL); @@ -173,7 +178,7 @@ static void ext2_empty_inode (ext2_filsys fs, ext2_ino_t dir_ino, const char *di static void ext2_write_file (ext2_filsys fs, ext2_ino_t ino, const char *buf, size_t size, const char *filename); static void ext2_link (ext2_filsys fs, ext2_ino_t dir_ino, const char *basename, ext2_ino_t ino, int dir_ft); static void ext2_clean_path (ext2_filsys fs, ext...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
..."virtual-disk.h" + +int linuxdisk_debug_filesystem; /* -D linuxdisk.filesystem=1 */ + +/* Per-file information collected in the first pass. */ +struct file { + char *pathname; /* Full host path to the file. */ + char *name; /* Base name of the file. */ + ext2_ino_t dir_ino; /* Containing directory inode in target fs. */ + struct stat statbuf; /* File information. */ + + /* These fields are only populated once the file has been created + * in the target filesystem. + */ + ext2_ino_t ino; /* Inode. */ + int ino_flags;...
2009 Jan 21
0
[PATCH] Progs: update convert for uninitialized block groups
...diff -urp btrfs-progs-unstable/convert.c btrfs-progs/convert.c --- btrfs-progs-unstable/convert.c 2009-01-13 18:55:53.214449273 +0800 +++ btrfs-progs/convert.c 2009-01-21 16:54:37.000000000 +0800 @@ -54,6 +54,7 @@ static int open_ext2fs(const char *name, { errcode_t ret; ext2_filsys ext2_fs; + ext2_ino_t ino; ret = ext2fs_open(name, 0, 0, 0, unix_io_manager, &ext2_fs); if (ret) { fprintf(stderr, "ext2fs_open: %s\n", error_message(ret)); @@ -71,6 +72,17 @@ static int open_ext2fs(const char *name, error_message(ret)); goto fail; } + /* + * search each block group for a...
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
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
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...struct btrfs_root *root, u64 objectid, @@ -446,8 +450,7 @@ static int create_file_extents(struct bt static int create_file_extents(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 objectid, struct btrfs_inode_item *btrfs_inode, - ext2_filsys ext2_fs, ext2_ino_t ext2_ino, - struct ext2_inode *ext2_inode) + ext2_filsys ext2_fs, ext2_ino_t ext2_ino) { int ret; char *buffer = NULL; @@ -455,6 +458,7 @@ static int create_file_extents(struct bt u32 last_block; u32 sectorsize = root->sectorsize; u64 inode_size = btrfs_stack_inode_s...
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
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...esult of system()? 'man waitpid' says this status is only possible for a call made with WUNTRACED, which seems contradictory to system() running the command to completion without tracing. > + > + return 0; > +} > + > +static int > +visit (const char *dir, ext2_filsys fs, ext2_ino_t dir_ino, > + struct file **files, size_t *nr_files) > +{ > + error2: > + closedir (DIR); > + error1: > + err = errno; > +#pragma GCC diagnostic push > +#pragma GCC diagnostic ignored "-Wunused-result" > + chdir (origdir); > +#pragma GCC diagnostic p...
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
2012 Jan 10
2
plug leaks in febootstrap
...n-helper reimplementation in C. - * Copyright (C) 2009-2010 Red Hat Inc. + * Copyright (C) 2009-2010, 2012 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -348,6 +348,8 @@ add_link (ext2_ino_t real_ino) p->minor = dev_minor; p->major = dev_major; p->real_ino = real_ino; + p->next = links_head; + links_head = p; } static void -- 1.7.9.rc0.13.gbee72
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
.../* Write out changes and close. */ - errcode_t err; -#ifdef HAVE_EXT2FS_CLOSE2 - err = ext2fs_close2 (fs, EXT2_FLAG_FLUSH_NO_SYNC); -#else - err = ext2fs_close (fs); -#endif - if (err != 0) - error (EXIT_FAILURE, 0, "ext2fs_close: %s", error_message (err)); -} - -void -ext2_mkdir (ext2_ino_t dir_ino, const char *dirname, const char *basename, - 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 - * t...
2019 Nov 26
0
[PATCH supermin] ext2: Build symbolic links correctly (RHBZ#1770304).
...ions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index e8ab972..8903f74 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -782,12 +782,6 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) } /* Create a symlink. */ else if (S_ISLNK (statbuf.st_mode)) { - ext2_ino_t ino; - ext2_empty_inode (data->fs, dir_ino, dirname, basename, - statbuf.st_mode, statbuf.st_uid, statbuf.st_gid, - statbuf.st_ctime, statbuf.st_atime, statbuf.st_mtime, - 0, 0, EXT2_FT_SYMLINK, &ino); - char *buf = mallo...
2006 Jun 12
0
Some questions about function usage
Hello, Recently, I am coding a program about read and write control. And there are some questions confusing me. 1. In info libext2fs: Function: errcode_t ext2fs_get_blocks (ext2_filsys FS, ext2_ino_t INO, blk_t *BLOCKS) Returns an array of blocks corresponding to the direct, indirect, doubly indirect, and triply indirect blocks as stored in the inode structure. So I wrote some codes like following: blk_t target_blks[EXT_N_BLOCKS]; retval = ext2fs_get_blocks(fs, ino, target_blks); printf(&quot...
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
2020 Aug 27
0
[nbdkit PATCH 2/2] ext2: Supply .list_exports and .default_export
...t2_config_complete (nbdkit_next_config_complete *next, void *nxdata) /* The per-connection handle. */ struct handle { - char *exportname; /* Client export name. */ + const char *exportname; /* Client export name. */ ext2_filsys fs; /* Filesystem handle. */ ext2_ino_t ino; /* Inode of open file. */ ext2_file_t file; /* File handle. */ struct nbdkit_next next; /* "name" parameter to ext2fs_open. */ }; +/* Export list. */ +static int +ext2_list_exports (nbdkit_next_list_exports *next, void *nxdata, +...