-
Notifications
You must be signed in to change notification settings - Fork 0
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
'Invalid cross-device link' when renaming directories on an aufs volume #35
Comments
In a way I'm surprised this isn't already happening because EXDEV is already handled in a special way because it was sometimes occuring when not expected (stat's st_dev is not always accurate), so it uses move-as-copy as a fallback... Those functions in the vfs are recursive so you'll want to only grab the uppermost function of the initial rename attempt (which is already done?) If you need to get into the recursion (EXDEV on the children) it could get a bit messier, but it seems like it wouldn't be trying to rename children anyway, since only topmost is renamed, else it's a copy-as-move. So that's a mystery why it's not already handling this. |
Thanks, I havent quite got to the point where I was going to ask, but the key is that the error happens on ptk-file-misc.c:3166 which does a raw rename with the error condition resulting in the dialog I see - I'm planning to use vfs_file_task_move there after one failure to see if it fixes stuff (yeah I noticed the vfs code was already well aware of EXDEV). |
oic - from that dialog it's different. You can see the move task right above it in the if-block. It actually runs mv there rather than using a vfs task (for assorted reasons). So you can just use a goto. ;) I recommend just using the EXDEV to trigger a move task fallback rather than trying to anticipate it based on fs, etc. |
Are you sure I shouldn't just spin the code out to another function and call it twice rather than use a goto?... |
Did it with goto as suggested. I can rename my directory now!! |
Merged. Closing issue. |
I think the goto is a clear enough patch there - it's a very linear function. As for named constants, I'm deeply offended. ;) Actually that original EXDEV change goes way back, maybe to PCManFM-Mod. |
This error happens when the directory to rename has children on multiple branches merged in the aufs volume, and essentially sounds to be a temporary failure state that the file manager needs to specially deal with (source) - mv already copes.
I'll see how to fix this now.
The text was updated successfully, but these errors were encountered: