Hi IacsaP, On 2023-11-17 14:20, lacsaP Patatetom wrote:
(13:45) giovanni @ ~ $ echo "Using udisks and ntfs3" > /run/media/giovanni/Data/mount_test.txt (13:45) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt try calling `sysctl` after `sync` here : (13:45) giovanni @ ~ $ sync; sudo sysctl vm.drop_caches=3 (13:45) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt
Here is the result: --- (17:17) giovanni @ ~ $ udisksctl mount -b /dev/nvme0n1p5 -t ntfs3 Mounted /dev/nvme0n1p5 at /run/media/giovanni/Data (17:17) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt Using udisks and ntfs3 (17:17) giovanni @ ~ $ echo "Using udisks and ntfs3" > /run/media/giovanni/Data/mount_test.txt (17:18) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt (17:18) giovanni @ ~ $ sync; sudo sysctl vm.drop_caches=3 vm.drop_caches = 3 (17:18) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt Using udisks and ntfs3 (17:18) giovanni @ ~ $ echo "Using udisks and ntfs3 again" > /run/media/giovanni/Data/mount_test.txt (17:18) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt (17:18) giovanni @ ~ $ sync (17:18) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt (17:18) giovanni @ ~ $ sync; sudo sysctl vm.drop_caches=3 vm.drop_caches = 3 (17:19) giovanni @ ~ $ cat /run/media/giovanni/Data/mount_test.txt Using udisks and ntfs3 again (17:19) giovanni @ ~ $ --- Having to always run the sysctl command in order to force the flush seems very bad to me... So, again, sync alone does not work. sysctl then sync does not. sync and then sysctl does... But the sysctl command needs to be executed every time. -- Giovanni Santini