Size: 1340
Comment:
|
Size: 1428
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 12: | Line 12: |
2.6.23 adds a new system call fallocate() which allows | The new fallocate() system call allows |
Line 21: | Line 21: |
[http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97ac73506c0ba93f30239bb57b4cfc5d73e68a62 (commit)] | [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97ac73506c0ba93f30239bb57b4cfc5d73e68a62 (commit)]. |
Line 23: | Line 23: |
== Miscellaneous userland ABI changes == | == Miscellaneous kernel-userland changes == |
Line 25: | Line 25: |
2.6.23 adds a new O_CLOEXEC flag (http://lwn.net/Articles/236843/). This flag makes it possible to avoid race conditions in multithreaded applications that do the following | 2.6.23 adds a new O_CLOEXEC flag for open(2) (http://lwn.net/Articles/236843/) [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f23513e8d96cf5e6cf8d2ff0cb5dd6bbc33995e4 (commit)]. This flag makes it possible to avoid race conditions in multithreaded applications that do the following: |
Line 31: | Line 31: |
[http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f23513e8d96cf5e6cf8d2ff0cb5dd6bbc33995e4 (commit)] | (Instead, Thread A would drop the fcntl() call and just open the file with O_CLOEXEC.) |
Linux 2.6.23; not yet released
Short overview (for news sites, etc)
2.6.23 includes the fallocate() syscall
Important things (AKA: ''the cool stuff'')
fallocate()
The new fallocate() system call allows applications to preallocate space for a file (http://lwn.net/Articles/226710/). Each file system implementation that wants to use this feature will need to support an inode operation called fallocate.
Applications can use this feature to avoid fragmentation to certain level and thus get faster access speed. With preallocation, applications also get a guarantee of space for particular file(s) - even if later the system becomes full [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97ac73506c0ba93f30239bb57b4cfc5d73e68a62 (commit)].
Miscellaneous kernel-userland changes
open() O_CLOEXEC flag
2.6.23 adds a new O_CLOEXEC flag for open(2) (http://lwn.net/Articles/236843/) [http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f23513e8d96cf5e6cf8d2ff0cb5dd6bbc33995e4 (commit)]. This flag makes it possible to avoid race conditions in multithreaded applications that do the following:
- Thread A: fd=open()
- Thread B: fork + exec
- Thread A: fcntl(fd,F_SETFD,FD_CLOEXEC)
(Instead, Thread A would drop the fcntl() call and just open the file with O_CLOEXEC.)