Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect file sizes... #421

Open
docbill opened this issue Sep 23, 2016 · 3 comments
Open

Incorrect file sizes... #421

docbill opened this issue Sep 23, 2016 · 3 comments
Labels

Comments

@docbill
Copy link

docbill commented Sep 23, 2016

This is interesting:

$ ls -la ~/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,
-rwxrwxr-x 1 briemers briemers 3204427784 Sep 23 03:44 /home/remote/briemers/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,

$ ls -s ~/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,
0 /home/remote/briemers/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,
$ du -sk ~/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,
0 /home/remote/briemers/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,

So depending on the commandline parameters are used, a different file size is returned... This could be one of the things that causes rsync to sometimes freeze-up, depending on what commandline options are used...

@yadayada yadayada added the FUSE label Sep 23, 2016
@docbill
Copy link
Author

docbill commented Sep 23, 2016

Here is another one:

[briemers@media1 ~]$ du -sb ~/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,
3204427784 /home/remote/briemers/acd/encfs/0XATOdlxBZ09mineTkP,pG1N/0DNCSQ4sBvfuz9YYru2pnJFI/TXJeuVb3y6nPDiGa1O-G,izhVVGB3sAtL5WE8mgUD2jU7,

Looks like the pattern is if one asks for the number of bytes the correct results are returned. But number of kilobytes is always 0. This likely means the fstat always returns the 0 for the number of blocks...

@docbill
Copy link
Author

docbill commented Sep 23, 2016

Yes. it is the getattr call in acd_fuse.py:

    elif node.is_file:
        return dict(st_mode=stat.S_IFREG | 0o0666,
                    st_nlink=self.cache.num_parents(node.id) if self.nlinks else 1,
                    st_size=node.size,

**times)

This is not returning values for most of the stat structure...

       struct stat {
           dev_t     st_dev;         /* ID of device containing file */
           ino_t     st_ino;         /* inode number */
           mode_t    st_mode;        /* file type and mode */
           nlink_t   st_nlink;       /* number of hard links */
           uid_t     st_uid;         /* user ID of owner */
           gid_t     st_gid;         /* group ID of owner */
           dev_t     st_rdev;        /* device ID (if special file) */
           off_t     st_size;        /* total size, in bytes */
           blksize_t st_blksize;     /* blocksize for filesystem I/O */
           blkcnt_t  st_blocks;      /* number of 512B blocks allocated */

If it at least return st_blksize and st_blocks then at least commands like du, and ls would report these values correctly.

@docbill
Copy link
Author

docbill commented Sep 24, 2016

I submitted a pull request for both the master and the dev branch. I only have the master branch installed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants