Re: Symlink not persisted even after fsync

Vijay Chidambaram
2018-04-15T01:41:45Z

Hi Ted,

On Sat, Apr 14, 2018 at 8:30 PM, Theodore Y. Ts'o <tytso@mit.edu> wrote:
> When you open "foo", the restulting file descriptor is not associated
> with the symlink. The resulting file descriptor is the exact same
> thing you would get if you had instead called:
>
> fd = open("/tmp/bar/quux", O_CREAT|O_RDWR);
>
> Hence, when you call
>
> fsync(fd);
>
> What you are calling fsync on is not the _symlink_, but the inode
> which is named by /tmp/bar/quux.

Thank you! This was the crucial misunderstanding on our part. The
behavior makes a lot more sense now.