Displaying 6 results from an estimated 6 matches for "ext2fs_symlink".
2019 Nov 26
0
[PATCH supermin] ext2: Build symbolic links correctly (RHBZ#1770304).
We created symlinks in two steps, by creating the empty inode and then
calling ext2fs_symlink to populate it. This created broken symlinks
where the directory name contained a / character, eg:
lrwxrwxrwx 1 root root 7 Nov 26 08:43 /bin -> usr/bin
lrwxrwxrwx 1 root root 7 Nov 26 08:43 /lib -> usr/lib
lrwxrwxrwx 1 root root 9 Nov 26 08:43 /lib64 -> usr/lib64
lrwxrwxr...
2017 Jul 12
3
[PATCH supermin] ext2: Create symlinks properly (RHBZ#1470157).
...ytes. This didn't matter until recently, when a change went
upstream which assumes that symlinks shorter than 60 bytes are always
stored in the inode, thus breaking the filesystems that we created
before:
https://bugzilla.redhat.com/show_bug.cgi?id=1470157#c4
This changes the code to use the ext2fs_symlink function instead which
creates fast and slow symlinks properly.
This fix is required if you use supermin with any Linux kernel >= 4.13.
The actual fix is two lines replacing ext2_write_file with a simpler
call to ext2fs_symlink. The majority of this fix is removing the
ext2_write_file functio...
2017 Jul 13
3
[PATCH supermin v2] ext2: Create symlinks properly (RHBZ#1470157).
...39;t matter until recently, when a change went into
the upstream kernel which assumes that symlinks shorter than 60 bytes
are always stored in the inode, thus breaking the filesystems that we
created before:
https://bugzilla.redhat.com/show_bug.cgi?id=1470157#c4
This changes the code to use the ext2fs_symlink function instead which
creates fast and slow symlinks properly. It also removes use of
PATH_MAX so this should work with symbolic link targets of any length.
This fix is required if you use supermin with any Linux kernel >= 4.13.
Thanks: Eric Sandeen
---
src/ext2fs-c.c | 59 ++++++++++++-----...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...->pathname, buf, file->statbuf.st_size);
+ if (r == -1) {
+ nbdkit_error ("readlink: %s: %m", file->pathname);
+ free (buf);
+ return -1;
+ }
+ if (r > file->statbuf.st_size)
+ r = file->statbuf.st_size;
+ buf[r] = '\0';
+ err = ext2fs_symlink (fs, file->dir_ino, file->ino, NULL, buf);
+ free (buf);
+ if (err) {
+ nbdkit_error ("ext2fs_symlink: %s", error_message (err));
+ return -1;
+ }
+ }
+ /* Specials. */
+ else if (S_ISBLK (file->statbuf.st_mode)) {
+ file->ino_flags = EXT2_FT_BLKDEV;
+...
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.
-
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