swift/test
Prashanth Pai 773edb4a5d Make object creation more atomic in Linux
Linux 3.11 introduced O_TMPFILE as a flag to open() sys call. This would
enable users to get a fd to an unnamed temporary file. As it's unnamed,
it does not require the caller to devise unique names. It is also not
accessible through any path. Hence, file creation is race-free.

This file is initially unreachable. It is then populated with data(write),
metadata(fsetxattr) and fsync'd before being atomically linked into the
filesystem in a fully formed state using linkat() sys call. Only after a
successful linkat() will the object file will be available for reference.

Caveats
* Unlike os.rename(), linkat() cannot overwrite destination path if it
  already exists. If path exists, we unlink and try again.
* XFS support for O_TMPFILE was only added in Linux 3.15.
* If client disconnects during object upload, although there is no
  incomplete/stale file on disk, the object directory would persist
  and is not cleaned up immediately.

Change-Id: I8402439fab3aba5d7af449b5e465f89332f606ec
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2016-08-24 14:56:00 +05:30
..
functional Add test for POST to DLO manifest file 2016-08-18 09:31:57 -05:00
probe Merge "Follow up delayed reap probe test" 2016-08-23 07:26:05 +00:00
unit Make object creation more atomic in Linux 2016-08-24 14:56:00 +05:30
__init__.py test/(functional/probe):Replace python print operator with print function (pep H233, py33) 2015-08-20 11:42:58 +09:00
sample.conf Merge "Add a note for functional tests with Keystone." 2016-03-18 05:08:10 +00:00