search for: ext2_filsys

Displaying 20 results from an estimated 24 matches for "ext2_filsys".

2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
Use an helper struct for holding the ext2_filsys variable, so that can be used to add more data. --- src/ext2fs-c.c | 77 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c index 70755c9..8eab24c 100644 --- a/src/ext2fs-c.c +++ b/src/ext2fs-c....
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 ct...
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 ct...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...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 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) { - f...
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 ct...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...quot; +#include "crc32c.h" #include "utils.h" #include "ext2fs/ext2_fs.h" #include "ext2fs/ext2fs.h" @@ -43,7 +44,7 @@ * Open Ext2fs in readonly mode, read block allocation bitmap and * inode bitmap into memory. */ -static int open_ext2fs(char *name, ext2_filsys *ret_fs) +static int open_ext2fs(const char *name, ext2_filsys *ret_fs) { int mnt_flags; errcode_t ret; @@ -88,9 +89,6 @@ static int close_ext2fs(ext2_filsys fs) return 0; } -/* - * Stupid algorithm, search forward starting from the first free block. - */ static int ext2_alloc_block(ext2_...
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
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
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...*/ + ext2_ino_t ino; /* Inode. */ + int ino_flags; /* Inode flags. */ + const 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 e...
2016 Jan 22
1
[supermin] [PATCH] ext2: check for needed block size
.../src/ext2fs-c.c +++ b/src/ext2fs-c.c @@ -52,6 +52,9 @@ /* fts.h in glibc is broken, forcing us to use the GNUlib alternative. */ #include "fts_.h" +/* How many blocks of size S are needed for storing N bytes. */ +#define ROUND_UP(N, S) (((N) + (S) - 1) / (S)) + struct ext2_data { ext2_filsys fs; @@ -629,6 +632,7 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char *dest) errcode_t err; struct stat statbuf; struct statvfs statvfsbuf; + size_t blocks; if (data->debug >= 3) printf ("supermin: ext2: copy_file %s -> %s\n", src, dest);...
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
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. -
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...
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...ven a possible result 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 G...
2009 Jan 21
0
[PATCH] Progs: update convert for uninitialized block groups
...an@oracle.com> --- 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 e...
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
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...lude <unistd.h> -#include <errno.h> -#include <limits.h> -#include <sys/stat.h> -#include <assert.h> - -#include "error.h" -#include "fts_.h" -#include "xvasprintf.h" - -#include "helper.h" -#include "ext2internal.h" - -ext2_filsys fs; - -/* The ext2 image that we build always has a fixed size, and we 'hope' - * that the files fit in (otherwise we'll get an error). Note that - * the file is sparsely allocated. - * - * The downside of allocating a very large initial disk is that the - * fixed overhead of ext2 is l...
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.
2020 Aug 27
0
[nbdkit PATCH 2/2] ext2: Supply .list_exports and .default_export
...lute path"); return -1; @@ -112,13 +102,54 @@ ext2_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...
2020 Feb 12
4
[nbdkit PATCH 0/3] Make ext2 a filter
...ILENAME> (required) Raw ext2, ext3 or ext4 filesystem.\n" \ - "file=<FILENAME> (required) File to serve inside the disk image." + "ext2file=<FILENAME> (required) File to serve inside the disk image." /* The per-connection handle. */ struct handle { 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. */ }; /* Create the per-connection handle. */ static void * -e...