[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
use of renameat2
From: |
Eric Blake |
Subject: |
use of renameat2 |
Date: |
Wed, 18 Nov 2015 09:05:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Where could we use the new Linux renameat2() syscall within coreutils,
if it is available? Oftentimes, having a working client of a syscall
for a few filesystems is incentive for other filesystems to prioritize
implementing support for the syscall. I'm really impressed by
renameat2()'s ability to atomically swap two files, and moreso by its
ability to replace a symlink with a directory or vice-versa (without an
intermediate TOCTTOU race that we currently face via remove()/rename()
pairs).
http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=renameat2&sect=2
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- use of renameat2,
Eric Blake <=