Package: fuse2fs
Version: 1.47.2-3+b12
Severity: important
Tags: fixed-upstream

Dear Maintainer,

On trixie, fuse2fs reports a different st_ino for each name of a hard
link, although both names point to the same on-disk inode. Software that
compares inode numbers across hard links breaks on such mounts. For
example, GlusterFS creates a hard link for every new file under its brick
(the gfid handle under .glusterfs/) and checks that both names have the
same inode; on a fuse2fs-mounted brick every file creation fails:

  W [posix-handle.c:778:posix_handle_hard] 0-data-posix: mismatching ino/dev
    between file /mnt/glusterfs/f.txt (364/77) and handle <gfid> (366/77)
  E [posix-entry-ops.c:2485:posix_create] 0-data-posix: setting gfid on
    /mnt/glusterfs/f.txt failed [No such file or directory]

Steps to reproduce (no root needed):

  mkfs.ext4 -q -F vol.img 16M
  mkdir mnt
  fuse2fs -o fakeroot vol.img mnt
  echo hi > mnt/a
  ln mnt/a mnt/b
  stat -c '%n st_ino=%i nlink=%h' mnt/a mnt/b
  fusermount3 -u mnt
  debugfs -R 'ls -l /' vol.img

Result with fuse2fs 1.47.2-3+b12 / libfuse3-4 3.17.2-3:

  mnt/a st_ino=4 nlink=2
  mnt/b st_ino=5 nlink=2

while debugfs shows both a and b as inode 15.

Expected: both names report the same st_ino (15).

This is a regression from bookworm. fuse2fs gained libfuse3 support in
1.47.1 (upstream commit 448a3f8b487b "add libfuse3 support to fuse2fs").
With libfuse2, fuse2fs passed the "use_ino" mount option; with libfuse3
that option no longer exists and fuse2fs did not set the equivalent
fuse_config field, so libfuse invents inode numbers per path. Bookworm's
1.47.0 is built against libfuse2 and is not affected.

Fixed upstream in 1.47.3 by:

  e135cae7d121f051e047c1e78a9aaacc6733603c
  fuse2fs: report real inode numbers

https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=e135cae7d121f051e047c1e78a9aaacc6733603c

which sets cfg->use_ino = 1 in op_init(). 1.47.4-1 in testing/unstable
is not affected.

Would you consider this fix for a trixie point release, or a
trixie-backports upload of 1.47.4 as was done for bookworm
(1.47.2-3~bpo12+1)?

-- System Information:
Debian Release: 13 (trixie)
Architecture: amd64
Kernel: Linux 6.12.118+deb13-amd64

Versions of packages fuse2fs depends on:
ii  libfuse3-4     3.17.2-3
ii  libext2fs2t64  1.47.2-3+b12


=====================================================================
BUG 2 of 2
=====================================================================

To: [email protected]
Subject: fuse2fs: O_TRUNC is ignored on open (fixed in 1.47.3)

Package: fuse2fs
Version: 1.47.2-3+b12
Severity: important
Tags: fixed-upstream

Dear Maintainer,

On trixie, fuse2fs ignores O_TRUNC when an existing file is opened for
writing. A shell redirection into an existing file therefore does not
truncate it: ": > file" leaves the old content, and a shorter write keeps
a stale tail of the previous content, silently corrupting the file.

Steps to reproduce (no root needed):

  mkfs.ext4 -q -F vol.img 16M
  mkdir mnt
  fuse2fs -o fakeroot vol.img mnt
  echo hello > mnt/f
  : > mnt/f
  stat -c %s mnt/f
  printf 'abcdefgh\n' > mnt/g
  printf 'xy\n' > mnt/g
  od -c mnt/g
  fusermount3 -u mnt

Result with fuse2fs 1.47.2-3+b12 / libfuse3-4 3.17.2-3:

  6                                  (expected 0)
  x  y \n  d  e  f  g  h \n          (expected: x  y \n)

Fixed upstream in 1.47.3 by:

  b022aca269a5552395393989a4be530cbf7b5e70
  fuse2fs: implement O_TRUNC correctly

https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=b022aca269a5552395393989a4be530cbf7b5e70

1.47.4-1 in testing/unstable is not affected.

As with the hard link inode bug filed together with this one, would you
consider the fix for a trixie point release, or a trixie-backports upload
of 1.47.4?

-- System Information:
Debian Release: 13 (trixie)
Architecture: amd64
Kernel: Linux 6.12.118+deb13-amd64

Versions of packages fuse2fs depends on:
ii  libfuse3-4     3.17.2-3
ii  libext2fs2t64  1.47.2-3+b12

Reply via email to