Re: RFC: O_PONIES semantics (well O_REWRITE)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> How is this any different than just having your application use
> mkostemp() to create a temporary dot file, then renaming it when done
> writing?
Creating a temporary file and renaming is what applications do now, but it has problems that Rik already mentioned:

- Apps forget to fsync() before rename()
- Apps forget to copy permissions over
- Apps forget to copy acls, selinux labels, and other xattrs over
- Apps create the temporary file in /tmp and then the rename() fails on systems where /tmp is a separate mount

It's not that it's not possible to do, it's that it's hard to do right.  There are a huge number of hoops to jump through to just to properly save a file.
And apps get it wrong.  Most apps get it wrong in some way or another.

Also if it's in the kernel then filesystems could potentially hook into the process and prevent the early sync.

--Ray
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux