search for: ext2fs_open

Displaying 20 results from an estimated 22 matches for "ext2fs_open".

2005 Oct 21
1
problems with tools/pygrub/setup.py and xen/xm/main.py
When making the "unstable" version I got an in "tools". There was a complaint about "cc.has_function" in the following code area in tools/pygrub/setup.py if cc.has_function("ext2fs_open"): ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) else : sys.stderr.write ("Warning: older veriosn of e2fsprogs installed ...") sys.stderr.write (" .... " ) ext2 = ... As workaround I simply deleted the entire if - else construct....
2009 Jan 21
0
[PATCH] Progs: update convert for uninitialized block groups
...stable/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 free inode. this set up +...
2020 Feb 11
1
Re: nbdkit background threads
...y, as > part of my experimentation with implementing ext2 as a filter > instead of a plugin, where ext2 has the limitation that when writing > a custom io_manager, you only get ONE spot where you can pass in an > opaque pointer: our .prepare will have to pass a long-lived nxdata > to ext2fs_open(). Yes I can see this could be tricky, especially in the presence of multiple threads serving a single connection. The only alternative way I can think to do it would be to use a pointer in thread-local storage which would would update with next_ops / nxdata each time. Do you have a preliminary...
2020 Feb 10
3
nbdkit background threads
https://github.com/libguestfs/nbdkit/blob/ecef5b16359fb5af7e7abf4fd2fb3ad5438b16be/TODO#L76 Already existing filters (readahead, cache) could be improved if filters could open a background work thread or threads which connect independently to the plugin. A proposed new filter (scan) cannot really be written at all without this capability. First of all the reason this can't be done today is
2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...l1 (fsv); fsv = caml_alloc_custom (&ext2_custom_operations, - sizeof (ext2_filsys), 0, 1); - Ext2fs_val (fsv) = fs; + sizeof (struct ext2_data), 0, 1); + Ext2fs_val (fsv) = *data; CAMLreturn (fsv); } @@ -122,18 +127,18 @@ supermin_ext2fs_open (value filev) CAMLlocal1 (fsv); int fs_flags = EXT2_FLAG_RW; errcode_t err; - ext2_filsys fs; + struct ext2_data data; #ifdef EXT2_FLAG_64BITS fs_flags |= EXT2_FLAG_64BITS; #endif err = ext2fs_open (String_val (filev), fs_flags, 0, 0, - unix_io_manager, &a...
2020 Feb 12
4
[nbdkit PATCH 0/3] Make ext2 a filter
...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 * -ext2_open (int readonly) +ext2_open (nbdkit_next_open *next, void *nxdata, int readonly) { struct handle *h; + + /* Request write access to the underlying plugin, for journal replay. */ + if (next (nxdata, 0) == -1) + return...
2020 Feb 10
0
Re: nbdkit background threads
...patch for that shortly, as part of my experimentation with implementing ext2 as a filter instead of a plugin, where ext2 has the limitation that when writing a custom io_manager, you only get ONE spot where you can pass in an opaque pointer: our .prepare will have to pass a long-lived nxdata to ext2fs_open(). But that's only a partial solution towards the rest of your goal of having threading available. > > The seemingly obvious implementation - which is what I tried today - > would be to let filters create background threads in .config_complete. > We would provide a filter API so...
2019 Feb 19
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...n -1; > + } > + > + /* Create the filesystem. */ > + if (mke2fs (filename) == -1) { > + unlink (filename); > + free (filename); > + return -1; Another example of early exit leaving disk->fd open. > + } > + > + /* Open the filesystem. */ > + err = ext2fs_open (filename, EXT2_FLAG_RW|EXT2_FLAG_64BITS, 0, 0, > + unix_io_manager, &fs); > + unlink (filename); > + free (filename); > + if (err) { > + nbdkit_error ("ext2fs_open: %s", error_message (err)); > + return -1; > + } > + > + err =...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...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", - error_message(ret)); - got...
2020 Feb 12
0
[nbdkit PATCH 3/3] ext2: Add mode for letting client exportname choose file from image
...re (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, return -1; } + if (fname[0] != '/') { + if (asprintf (&absname, "/%s", fname) < 0) { + nbdkit_error ("asprintf: %m"); + return -1; + } + fname = absname; + } + err = ext2fs_open (name, fs_flags, 0, 0, nbdkit_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...
2020 Aug 27
0
[nbdkit PATCH 2/2] ext2: Supply .list_exports and .default_export
...e. */ + 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, + int readonly, int is_tls, struct nbdkit_exports *exports) +{ + /* If we are honoring export names, the default export "" won't + * work, and we must not le...
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
2020 Feb 11
1
[nbdkit PATCH] filters: Make nxdata persistent
Future patches want to allow a filter to pass a single opaque parameter into another framework (such as ext2fs_open) or even spawn a helper thread, which requires that nxdata be stable for the entire life of the connection between .open and .close. Our current approach of creating a stack-allocated nxdata for every call does not play nicely with that scheme, so rework things into using a malloc'd pointer....
2020 Aug 27
4
[nbdkit PATCH 0/2] ext2 export list tweaks
Applies on top of my pending series for the exportname filter, addressing one of the todo's in that cover letter. Eric Blake (2): filters: Add .export_description wrappers ext2: Supply .list_exports and .default_export filters/ext2/nbdkit-ext2-filter.pod | 3 +- tests/Makefile.am | 16 +++- filters/ext2/ext2.c | 125 +++++++++++++++++++---------
2020 Feb 22
1
Re: Plans for nbdkit 1.18 release?
On Sat, Feb 22, 2020 at 05:11:01AM -0600, Eric Blake wrote: > On 2/22/20 4:37 AM, Richard W.M. Jones wrote: > >Another thing I've been thinking about for some time is splitting > >.config_complete into .config_complete + .get_ready (new name TBD). > >At the moment .config_complete is both the place where we finish > >processing config, and also the last chance we get
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
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.
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...;fd, size) == -1) { + nbdkit_error ("ftruncate: %s: %m", filename); + free (filename); + return -1; + } + + /* Create the filesystem. */ + if (mke2fs (filename) == -1) { + unlink (filename); + free (filename); + return -1; + } + + /* Open the filesystem. */ + err = ext2fs_open (filename, EXT2_FLAG_RW|EXT2_FLAG_64BITS, 0, 0, + unix_io_manager, &fs); + unlink (filename); + free (filename); + if (err) { + nbdkit_error ("ext2fs_open: %s", error_message (err)); + return -1; + } + + err = ext2fs_read_bitmaps (fs); + if (err) { +...
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.
...or (EXIT_FAILURE, 0, "%s: failed", cmd); - free (cmd); - - if (verbose) - print_timestamped_message ("finished mke2fs"); - - /* Open the filesystem. */ - int fs_flags = EXT2_FLAG_RW; -#ifdef EXT2_FLAG_64BITS - fs_flags |= EXT2_FLAG_64BITS; -#endif - errcode_t err = - ext2fs_open (appliance, fs_flags, 0, 0, unix_io_manager, &fs); - if (err != 0) - error (EXIT_FAILURE, 0, "ext2fs_open: %s", error_message (err)); - - /* Bitmaps are not loaded by default, so load them. ext2fs_close will - * write out any changes. - */ - err = ext2fs_read_bitmaps (fs);...