On Thu, May 19, 2022 at 10:52 PM Eric Sandeen <sandeen(a)redhat.com> wrote:
On 5/19/22 9:39 AM, Tao Liu wrote:
>> I'm not aware of any "fsync" shell command, unfortunately.
It'd be nice.
>>
> Since we are programming in pure shell script, it would be strange if
> we insert a c program which call fsync on vmcore specifically for the
> purpose, is there any best practice on how to achieve this?
Yes...
> Thanks,
> Tao Liu
>
>> sync -f syncs the filesystem of the target file, not just the file itself -
>> but that's fine. [1]
^^^^ this.
Right, I get the point. Thank you all for the good suggestions and
discussion! I will have a try and test on it, thank you very much!
Thanks,
Tao Liu
-Eric
>> so sync -f vmcore should be fine, will sync only the filesystem hosting vmcore,
>> and should return an error if it fails. [2]
>>
>> -Eric