I connected my raspberry pi 4 and laptop(Linux) and I transfer the data through USB cable I can modify the data in raspberry but after modification immediately it's not reflecting in raspberry pi 4 storage i have to unmount it and mount it again then only it is reflecting but I want to modify that data and immediately it should reflect with mounting and remounting the raspberry pi from laptop (like i copy the image from my laptop to rpi but i cant see the modification i have to unmount and mount the rpi then its is there but i have to see immediately when i change the data without unmount like computer and phone connected)(important: the connection between the rpi and laptop must through USB cable not through anyother network like ssh )
I've not used the MTP gadget but if it's anything like the mass storage one what you're seeing is exactly what I'd expect - the gadget driver doesn't tell the rest of Linux what the host has been up to and Linux caches disc data with cache taking precedence unless it is know to be out of date.
Unmount and remount purges the disc cache for that device.
More precise information on what you've done and what your configuration is might help us help you.
Statistics: Posted by thagrol — Tue Apr 16, 2024 1:43 pm