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
VSH: implement sys_fs_mount() and sys_fs_unmount() #12880
Conversation
Is there actual proof of it being mounted at boot with VSH? maybe it calls a syscall to mount manually? |
Yes, from the log I can see the VSH attempted to mount dev_hdd1 in the same way as dev_hdd0 (by sys_fs_mount()):
But I don't think dev_hdd1 was even going to be mounted in RPCS3, since sys_fs_mount() does nothing other than just logging a todo, and dev_hdd1 would never be mounted by System.cpp (see line 281 in this PR; the value of the variable "hdd1" was never actually set somewhere else). |
Well, you can implement without checking of anything other than path. |
Sorry, but I didn't get your point. |
You can hook the syscall when it tries to mount hdd1 to vfs::mount, I suggest creating a directory in dev_hdd1/caches/ that will be unique to VSH and cleared every mount. |
Probably even without caring about mounting of other mount points for now. |
The code needed in the syscall is not so different from what you just wrote. It's a bad idea hacking it in Emulator::Init. |
Both sys_fs_mount() and sys_fs_unmount() are implemented now. |
I forgot, this is very important otherwise VSH would access HDD1 images of games and can erase or modify them. |
You see, rpcs3/dev_hdd1/ is not actually the PS3 directory but a parent of co-existing instances of it for different games or applications. The reasoning behind it is that intact HDD1 state results in better performance but its state is not compatible with different games. real PS3 simply clears it when switching application. |
You mean it should mount /dev_hdd1/caches/ instead? |
I wonder why RPCS3 doesn't do the same thing as the real PS3 does (clear dev_hdd1). |
Mount /dev_hdd1/caches/vsh. |
Done. |
Implemented sys_fs_mount() and sys_fs_unmount() for VSH.
Solve:
Also corrected some existing typos of
dev_flash
things in System.cpp by the way.