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

Setting file modification times does not work #226

Closed
EchterAgo opened this issue Jun 8, 2023 · 9 comments
Closed

Setting file modification times does not work #226

EchterAgo opened this issue Jun 8, 2023 · 9 comments

Comments

@EchterAgo
Copy link

EchterAgo commented Jun 8, 2023

When transferring files to ZFS using rclone sync I noticed that it keeps rechecking files and tries updating the modification time every time you start the sync again. Investigating this I found that the modification time is not actually updated. I managed to also reproduce this using the touch command in an MSYS2 shell.

When diagnosing this with Process Monitor I saw this:

image

This seems to point to set_file_basic_information returning 0x84 (EOVERFLOW), which seems to come from the TIMESPEC_OVERFLOW check in zfs_setattr.

I found openzfsonosx/openzfs#104 (comment) which indicates that the check is a "relic" but it still exists in the current release.

Any ideas, am I doing something wrong? The pool was created using zpool create -o ashift=12 -O atime=off -O compression=lz4 -O recordsize=1MB -O casesensitivity=insensitive Data raidz1 PHYSICALDRIVE5 PHYSICALDRIVE6 PHYSICALDRIVE7 PHYSICALDRIVE8 cache PHYSICALDRIVE1 PHYSICALDRIVE3 (also tried with atime=on)

I'll try removing the checks and compiling the module, but I need to get the development environment set up first, but I hope to have more info soon.

@EchterAgo
Copy link
Author

I compiled the driver without the overflow checks and now rclone sync seems to be happy and I can change file timestamps using touch in MSYS2.

@EchterAgo
Copy link
Author

Something is still weird, somehow I see the right data in Process Monitor now, but Windows Explorer does not show the right timestamps in file properties anymore, it does show the right timestamp in the "Date modified" column though

@EchterAgo
Copy link
Author

What I can see in the event viewer is mostly good, however the file is being reported as a directory now.

image

This seems to be happen only with my binaries though, whether I remove the overflow check or not. As soon as I use the binaries from the download it works again.

I installed the official binaries and then installed my own OpenZFS.sys using the zfsinstaller.exe, is there any problem with mixing the binaries like that? AFAICT I'm compiling from the same sources.

@EchterAgo
Copy link
Author

Ok, I used RC1 as a base instead of RC3, everything seems to be working now.

@lundman
Copy link

lundman commented Jun 8, 2023

Oh heh, I was just taking a look at it. Nice that it is working.

@EchterAgo
Copy link
Author

EchterAgo commented Jun 9, 2023

It only works if I patch out the overflow checks from the driver, I don't seem to have any timestamp issues now anymore. I do however have some issue where rclone thinks files are transferred, but when I let it recheck with --checksum it actually finds differences. I'm still trying to diagnose this and will open another issue if I find something. Edit: See #227

@lundman
Copy link

lundman commented Jun 14, 2023

The NFS overflow was fixed in 94bfb92 as I was fixing something else, so I think that should take care of this issue?
Thanks for reporting it.

@EchterAgo
Copy link
Author

Yes, looks like I haven't checked the development branch. I was testing using the zfs-Windows-2.1.7-release branch. I'll retest this and also the other rclone issue using development and close tickets if successful.

@EchterAgo
Copy link
Author

This is fixed in the development branch.

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

No branches or pull requests

2 participants