GFS_PIO_SYNC(3)

πŸ’Ύ GFS_PIO_SYNC(3) πŸ’Ύ

okay bestie, welcome to the Gfarm girlies' corner of section 3 of the manual. this one is literally called gfs_pio_sync and it's about making sure your data actually, you know, exists on disk instead of vibing in memory forever. 🫢


✨ NAME ✨

gfs_pio_sync β€” output a file's data on memory to disk 🌸


✨ SYNOPSIS ✨

#include <gfarm/gfarm.h>

gfarm_error_t gfs_pio_sync(GFS_File gf);

✨ DESCRIPTION ✨

so the way this works: gfs_pio_sync flushes all the data that's chillin' in memory for gf, and then it waits for the I/O to actually finish before it comes back to you. no ghosting, no "yeah I'll get to it", it waits. πŸ’…

and not only that β€” it also updates the metadata stat information. meanwhile its sibling function gfs_pio_datasync does not update the metadata. so if you need the stat info fresh too, this is your girl. πŸ‘‘


✨ RETURN VALUES ✨

  • GFARM_ERR_NO_ERROR β€” slay, it worked, the function terminated successfully. πŸŽ€
  • GFARM_ERR_NO_MEMORY β€” not enough memory was available. 😭 tragic.
  • Others β€” some other error happened, and the reason gets shown to you by gfarm_error_string(3). go read that one, iykyk. πŸ”₯

✨ SEE ALSO ✨


mwah πŸ’– that's the whole page bestie, go sync something. this came to you from Gfarm, dated 20 Jun 2019 β€” iconic behavior, no cap. πŸ¦‹βœ¨