You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mc -V
GNU Midnight Commander 4.8.33
Built with GLib 2.82.4
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.11.1
With builtin editor and aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalisation support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, shell
Data types:
char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;
Description
Using mc with kopia (fuse) mounted snapshots. Cli commands work fine, but mc sees an empty directory.
I found mc 4.8.25 did not show this problem, but mc 4.8.26 did. I used a git bisection to find the issue.
Kopia
Kopia is a backup program written in Go. It uses go-fuse for its fuse kernel module interface. Backups are accessed in directory hierarchies. Inserted into the hierarchy path string are machine names and date and time stamps.
/* ------------------- */staticvoid*local_opendir (constvfs_path_t*vpath)
{
DIR**local_info;
DIR*dir=NULL;
constchar*path;
path=vfs_path_get_last_path_str (vpath);
/* On Linux >= 5.1, MC sometimes shows empty directories on mounted CIFS shares. * Rereading directory restores the directory content. * * Reopen directory, if first readdir() returns NULL and errno == EINTR. */while (dir==NULL)
{
dir=opendir (path);
if (dir==NULL)
returnNULL;
if (readdir (dir) ==NULL&&errno==EINTR)
{
closedir (dir);
dir=NULL;
}
elserewinddir (dir);
}
local_info= (DIR**) g_new (DIR*, 1);
*local_info=dir;
returnlocal_info;
}
/* ------------------- */
Notes on Testing
In my bisection tests, I, at first, mounted the kopia mount, then tried the various bisection builds. Doing this seemed to allow all the failed builds to work.
For more consistent test results, the kopia mount was umounted then remounted between tests. Indeed, opening the any dir in the mounted tree with a faulty local_open_dir() would certainly create the correct test conditions. Only good builds would then open the directory.
I'd be happy to provide more granular steps to reproduce this problem using kopia commands.
Important
This issue was migrated from Trac:
rahrah(richard1hoyle@….com)OS: Slackware64-current
LIBC: glibc-2.40
Kernel: 6.12.10
ARCH: x86_64
Description
Using mc with kopia (fuse) mounted snapshots. Cli commands work fine, but mc sees an empty directory.
I found mc 4.8.25 did not show this problem, but mc 4.8.26 did. I used a git bisection to find the issue.
Kopia
Kopia is a backup program written in Go. It uses go-fuse for its fuse kernel module interface. Backups are accessed in directory hierarchies. Inserted into the hierarchy path string are machine names and date and time stamps.
Kopia can be found here:
https://kopia.io
and
https://github.com/kopia/kopia/
The
mount -l
gives this after a kopia mount operation on my Linux test machine:
Git Bisection
I did a git bisection to find the commit causing the problem. The commit introducing the bad behaviour was:
Experimental Fix
Reverting 27de037
by using the following function fixed the problem:
Original Code
Notes on Testing
In my bisection tests, I, at first, mounted the kopia mount, then tried the various bisection builds. Doing this seemed to allow all the failed builds to work.
For more consistent test results, the kopia mount was umounted then remounted between tests. Indeed, opening the any dir in the mounted tree with a faulty local_open_dir() would certainly create the correct test conditions. Only good builds would then open the directory.
I'd be happy to provide more granular steps to reproduce this problem using kopia commands.
Possible Similar Bug
littlefs-project/littlefs-fuse#43
Thank You
Thank you for all the time and effort you put into making Midnight Commander, and distributing it under the GPL.