search for: dir_ino

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

2014 Jul 30
2
[PATCH 1/3] ext2: create a struct for the OCaml 't' type
...+ 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, 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 atime, time...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...al-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;...
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 atime, time...
2019 Nov 26
0
[PATCH supermin] ext2: Build symbolic links correctly (RHBZ#1770304).
...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 = malloc (statbuf.st_size+1); if (buf == NULL)...
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 atime, time...
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
2
Re: [PATCH nbdkit 4/4] Add linuxdisk plugin.
...mp;files[i]) == -1) > + return -1; > + > + if (linuxdisk_debug_filesystem) > + nbdkit_debug ("%s: <%" PRIu32 ">/%s -> <%" PRIu32 ">", > + files[i].type, > + files[i].dir_ino, files[i].name, files[i].ino); > + } > + else { > + /* Creating a hard link to an existing inode. */ > + if (e2hardlink (fs, last_file, &files[i]) == -1) > + return -1; More early exits; this time, skipping... > + > + if (linuxdisk_...
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. -
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...ty_item_for_inode(trans, root, inode, path, + &ins, sizeof(*fi)); if (ret) goto out; leaf = path->nodes[0]; @@ -2780,8 +2781,8 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, } path->leave_spinning = 1; - di = btrfs_lookup_dir_item(trans, root, path, dir_ino, - name, name_len, -1); + di = btrfs_lookup_dir_item(trans, root, dir, path, dir_ino, + name, name_len, -1); if (IS_ERR(di)) { ret = PTR_ERR(di); goto err; @@ -2797,7 +2798,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, goto err; btrfs_release_path(...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...ut 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 - * this case...
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
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...) trans = btrfs_start_transaction(root, 0); if (IS_ERR(trans)) { ret = PTR_ERR(trans); + btrfs_abort_transaction(root, ret); goto out; } btrfs_orphan_del(trans, inode); @@ -2848,6 +2849,8 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir, u64 dir_ino = btrfs_ino(dir); trans = btrfs_start_transaction(root, 10); + if (IS_ERR(trans)) + btrfs_abort_transaction(root, PTR_ERR(trans)); if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC) return trans; @@ -2874,6 +2877,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *di...
2013 Apr 25
0
[PATCH] Btrfs: remove almost all of the BUG()'s from tree-log.c
..._dir_entries_in_log(struct btrfs_trans_handle *trans, if (di) { ret = btrfs_delete_one_dir_name(trans, log, path, di); bytes_del += name_len; - BUG_ON(ret); + if (ret) { + err = ret; + goto fail; + } } btrfs_release_path(path); di = btrfs_lookup_dir_index_item(trans, log, path, dir_ino, @@ -2637,7 +2675,10 @@ int btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans, if (di) { ret = btrfs_delete_one_dir_name(trans, log, path, di); bytes_del += name_len; - BUG_ON(ret); + if (ret) { + err = ret; + goto fail; + } } /* update the directory size in the log...
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