Thread (28 messages) 28 messages, 7 authors, 2011-01-26

Re: Atomic file data replace API

From: Olaf van der Spek <hidden>
Date: 2011-01-07 15:17:31

On Fri, Jan 7, 2011 at 4:13 PM, Chris Mason [off-list ref] wr=
ote:
quoted
That's not what I asked. ;)
I asked to wait until the first write (or close). That way, you don'=
t
quoted
get unintentional empty files.
One step further, you don't have to keep the data in memory, you're
free to write them to disk. You just wouldn't update the meta-data
(yet).
Sorry ;) Picture an application that truncates 1024 files without clo=
sing any
of them. =C2=A0Basically any operation that includes the kernel waiti=
ng for
applications because they promise to do something soon is a denial of
service attack, or a really easy way to run out of memory on the box.
I'm not sure why you would run out of memory in that case.

O_ATOMIC would be the solution for the rename workaround: write temp
file, rename
With advantages like a way simpler API, no issues with resetting
meta-data, no issues with temp file and maybe better performance.

Olaf
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help