Re: Is rename(2) atomic on FAT?

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

 



On Wed, Oct 23, 2019 at 7:16 PM Pali Rohár <pali.rohar@xxxxxxxxx> wrote:
> On Wednesday 23 October 2019 16:21:19 Chris Murphy wrote:
> > On Wed, Oct 23, 2019 at 1:50 PM Pali Rohár <pali.rohar@xxxxxxxxx> wrote:
> > > I do not think that kernel guarantee for any filesystem that rename
> > > operation would be atomic on underlying disk storage.
> > >
> > > But somebody else should confirm it.
> >
> > I don't know either or how to confirm it.
>
> Somebody who is watching linuxfs-devel and has deep knowledge in this
> area... could provide more information.

This is filesystem specific.
For example on UBIFS we make sure that the rename operation is atomic.
Changing multiple directory entries is one journal commit, so either it happened
completely or not at all.
On JFFS2, on the other hand, rename can degrade to a hard link.

I'd go so far and claim that any modern Linux filesystem guarantees
that rename is atomic.
But bugs still happen, crashmonkey found some interesting issues in
this area[0].

[0] http://www.cs.utexas.edu/~vijay/papers/osdi18-crashmonkey.pdf

-- 
Thanks,
//richard




[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