History log of /haiku/src/add-ons/kernel/file_systems/layers/write_overlay/write_overlay.cpp
Revision Date Author Comments
# 711e2dc0 01-Dec-2021 Augustin Cavalier <waddlesplash@gmail.com>

Adjust all struct dirent creations (again), this time to use offsetof().

The dirent struct is not packed, so offsetof(dirent, d_name) != sizeof(dirent).
Thus in order not to waste the alignment bytes (which are significant,
on x86_64 at least, sizeof(dirent)==32, but offsetof(...)=26.)

This is also the most portable way to handle things, and should
work just fine in cross-platform code that has a non-zero-sized d_name.


# 3966c601 20-May-2020 Jérôme Duval <jerome.duval@gmail.com>

write_overlay: readlink behavior change

Change-Id: I036f3e7f84e4a771846482fe81c2db4c4d718aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2754
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 39147a61 21-Dec-2019 Kyle Ambroff-Kao <kyle@ambroffkao.com>

write_overlay: Fix SMAP violation in OverlayInode::Read

Change-Id: I66d852008a4375bb9295bc0238ed6289fb8439d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2046
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 0bb9fd38 26-Feb-2018 Jérôme Duval <jerome.duval@gmail.com>

write_overlay: Read()/Write() with user_memcpy().


# 6f7fc220 07-Mar-2016 Axel Dörfler <axeld@pinc-software.de>

NodeMonitor: Added B_WATCH_CHILDREN flag.

* Added a directory argument for notify_{stat/attribute}_changed().
* This allows to watch only a directory, and get the notifications for
all of its files, not just add/remove entry notifications.


# 578558b4 07-May-2014 Pawel Dziepak <pdziepak@quarnos.org>

add-ons/kernel: add spaces between literals and identifiers

Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.

This patch makes the whole kernel build successfully with C++11.


# 778d2528 29-Apr-2013 Jérôme Duval <jerome.duval@gmail.com>

write_overlay: fixed three warnings, I hope correctly.

* warnings about comparison between signed and unsigned integer expressions.


# 7f7e76e4 20-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

64-bit compilation fixes for write_overlay and intel partitioning system modules.


# d63f4274 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d570af7 24-May-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40fa690b 19-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

The vnode->private_node holds our object, not vnode itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb4a951f 09-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Also return B_NOT_A_DIRECTORY in write_overlay when appropriate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ae89b83 04-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement attribute support in write_overlay. It mostly uses the same backends
as the other node operations.
* Differentiate between data and metadata modification, so that changes to
attributes or stat fields (other than size) dont't prevent direct IO relay.
* Suppress child finish notifications when sending subrequests to the
underlaying filesystem. Otherwise the request can be gone by the time we
try to complete it.
* Fix offsets used for IORequest::CopyData().
* Some refactoring.
* Added locking.

With that a write_overlay can be put on attribute enabled filesystems to either
make them writeable or snapshot them. This allows for example for a working
BFS based LiveCD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32937 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98f77afd 02-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

We need to notify the request also in the error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44fbca27 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Implement the rest of the IO hook. We now do directly satisfy write requests
by writing them into our buffers and directly satisfy read requests by copying
our buffers, filling any gaps by spawning off subrequests to the underlaying
filesystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 271b9ad4 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Enable the IO hook for both attribute and write overlay. Attribute overlay isn't
concerned by it as it does not do file data, it simply passes the hook through.
In the write_overlay case we check for write operations and for modified nodes.
In both cases we return B_NOT_SUPPORTED which will cause a fallback to
synchronous IO. The main problem with the fallback is not that it is synchronous
but that the physical buffers of the request will be mapped and filled page
wise, which makes it slow for various reasons. In any case with this setup all
reads to write_overlay that can go through unmodified now do. This should speed
up CD boot as there is no physical to virtual translation overhead and no limit
to page wise reads. In the best case it should now read 256 blocks at the time
instead of always falling back to 2. My tests show no side effects on creating,
writing or partially modifying nodes so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1043ac9 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

When we truncate or resize the file we need to trim the write_buffers. Otherwise
we waste space, but we also incorrectly fail to update the size for all writes
that do not go beyond the previous file size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fbaa0b51 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Take into account that we may look up "." or ".." and we must obviously not set
the parent directory in those cases. Also, when updating the parent directory
we need to update the ".." dirent if we already populated it with a different
value before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da249e74 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Implement TODO: Check for non-empty directories before removing an entry. This
fixes #4358, there changing the Tracker preferences causes some default
directories to be created, like "home" and "config", which were previously
simply killing off the real ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd80259a 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

If we create new nodes or modify existing ones, especially directories, we must
ensure that these nodes are never put. As they keep all changes in memory,
putting them and consequently freeing them destroys the modifications without
a way to get them back from the underlaying filesystem. In case a created node
was put but still had its entry in the parent directory this could also lead
to the situation where an invalid node was requested from the underlaying
filesystem, leading to #4347.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93aba444 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Removed just a bit too much in r30927.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c89b0ea4 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

We need to update the name and parent directory when renaming/moving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 331f147b 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

* When removing entries properly call remove_vnode().
* Move notifications around so they are sent at the right time.
* Use notify_entry_moved() instead of generating a removal and creation
notification.
* Allow replacing entries.
* Added a TODO regarding non-empty directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30929 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f06f5d70 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Make reading the write_overlay more efficient. Instead of always reading the
original file and then overwriting it with what we have in memory, just linearly
fill the buffer, closing gaps between our buffers with original file content as
needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ab2eaab 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Only use read_pages() when we need to. Otherwise we bypass the cache of the
upper layer, degrading performance qutie a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30925 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57a5e696 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement read/write_pages using Read()/Write(), io will follow later.
* Create a file cache for created overlay nodes. It is unused and disabled, but
causes a vnode cache to be created. This is required for mapping a file, which
in turn is required for executables to be loaded. With that copied or newly
created executables should work on top of write_overlay. Will think about and
implement a more direct way of getting that cache later today.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5740b42f 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Write can be called without cookie (in the CreateSymlink() case for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0807998b 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement O_APPEND.
* Also make set_flags available for setting it. O_NONBLOCK is ignored as in BFS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30903 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f447d9b 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Apply r30890, adding a missing put_vnode() on error, to write_overlay as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30899 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d94685b 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Move the B_UNSUPPORTED return into the macro. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 607254f5 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

We don't want to use the OVERLAY_CALL macro for can_page() as it returns a bool
and not a status_t. In case of virtual files it would have wrongly returned
B_UNSUPPORTED, resulting in true instead of false.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 588b9abc 27-May-2009 Michael Lotz <mmlr@mlotz.ch>

Fix leaking the old entry name when renaming actually succeeds.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf43c26 25-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29719 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e83cf52a 14-Mar-2009 Michael Lotz <mmlr@mlotz.ch>

Ensure that our stat buffer is available when opening. Otherwise reads could
fail and the O_TRUNC might be overwritten as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29520 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4041343 08-Mar-2009 Michael Lotz <mmlr@mlotz.ch>

* This should mostly complete the write_overlay.
* Fix memory leaks here and there.
* Virtualize the dirent list.
* Handle "." and ".." ourselfs as at least iso9660 cannot really know them in
the readdir call and therefore returns different values than on lookup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29458 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9e9051d 20-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Implemented create/create dir/create symlink and remove/remove dir in the
write_overlay and add the necessary infrastructure for it.
* Fix setting permissions through write stat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 66728ad8 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Implemented write stat.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29260 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ef49450 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Rename the trace output as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af4245f8 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Split overlay filesystem into attribute_overlay and write_overlay.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29255 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77fdecfe 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Preparing to split the overlay filesystem into an attribute_overlay and write_overlay module.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29253 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 578558b439867f563d44d168a29223f76d6bb23e 07-May-2014 Pawel Dziepak <pdziepak@quarnos.org>

add-ons/kernel: add spaces between literals and identifiers

Due to introduction of user-defined suffixes C++11 requires that there
is a space between literal and identifier to avoid ambiguity.

This patch makes the whole kernel build successfully with C++11.


# 778d2528d6e66a5455f51f20ce799d1e7704b1c0 29-Apr-2013 Jérôme Duval <jerome.duval@gmail.com>

write_overlay: fixed three warnings, I hope correctly.

* warnings about comparison between signed and unsigned integer expressions.


# 7f7e76e4615a652686e68102907732d114968b58 20-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

64-bit compilation fixes for write_overlay and intel partitioning system modules.


# d63f4274b665d32065f24a7a01a025578c8a43c9 18-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a file system call preallocate() as described in #6285, currently unused


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9d570af7c878ba30043b23e6dce5f3ae5578aa7c 24-May-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 40fa690b518b2a837dd3e5eb81d9142d33da2615 19-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

The vnode->private_node holds our object, not vnode itself.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb4a951f4ccf3a3cbe141fc51d916b70cdb8641a 09-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Also return B_NOT_A_DIRECTORY in write_overlay when appropriate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ae89b83735723c560a8ce5853f9db23bacb17cb 04-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement attribute support in write_overlay. It mostly uses the same backends
as the other node operations.
* Differentiate between data and metadata modification, so that changes to
attributes or stat fields (other than size) dont't prevent direct IO relay.
* Suppress child finish notifications when sending subrequests to the
underlaying filesystem. Otherwise the request can be gone by the time we
try to complete it.
* Fix offsets used for IORequest::CopyData().
* Some refactoring.
* Added locking.

With that a write_overlay can be put on attribute enabled filesystems to either
make them writeable or snapshot them. This allows for example for a working
BFS based LiveCD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32937 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98f77afdb7eb93e5a69a4795594bc5f8be31db28 02-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

We need to notify the request also in the error case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44fbca279072286b8de536fdb1c9e3dc50de9f73 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Implement the rest of the IO hook. We now do directly satisfy write requests
by writing them into our buffers and directly satisfy read requests by copying
our buffers, filling any gaps by spawning off subrequests to the underlaying
filesystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32900 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 271b9ad49ac034af9e979d020a048476a9fecbd4 01-Sep-2009 Michael Lotz <mmlr@mlotz.ch>

Enable the IO hook for both attribute and write overlay. Attribute overlay isn't
concerned by it as it does not do file data, it simply passes the hook through.
In the write_overlay case we check for write operations and for modified nodes.
In both cases we return B_NOT_SUPPORTED which will cause a fallback to
synchronous IO. The main problem with the fallback is not that it is synchronous
but that the physical buffers of the request will be mapped and filled page
wise, which makes it slow for various reasons. In any case with this setup all
reads to write_overlay that can go through unmodified now do. This should speed
up CD boot as there is no physical to virtual translation overhead and no limit
to page wise reads. In the best case it should now read 256 blocks at the time
instead of always falling back to 2. My tests show no side effects on creating,
writing or partially modifying nodes so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c1043ac95eab96576506494d87bcac22c5f22332 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

When we truncate or resize the file we need to trim the write_buffers. Otherwise
we waste space, but we also incorrectly fail to update the size for all writes
that do not go beyond the previous file size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fbaa0b510d01a631435d0a5dd4a9a7135eef06d8 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Take into account that we may look up "." or ".." and we must obviously not set
the parent directory in those cases. Also, when updating the parent directory
we need to update the ".." dirent if we already populated it with a different
value before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# da249e74e99cddfaa98832b577594031666f0129 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

Implement TODO: Check for non-empty directories before removing an entry. This
fixes #4358, there changing the Tracker preferences causes some default
directories to be created, like "home" and "config", which were previously
simply killing off the real ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32822 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd80259af568280944308025226dba5bad2e70f0 29-Aug-2009 Michael Lotz <mmlr@mlotz.ch>

If we create new nodes or modify existing ones, especially directories, we must
ensure that these nodes are never put. As they keep all changes in memory,
putting them and consequently freeing them destroys the modifications without
a way to get them back from the underlaying filesystem. In case a created node
was put but still had its entry in the parent directory this could also lead
to the situation where an invalid node was requested from the underlaying
filesystem, leading to #4347.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 93aba444aa93038279280cf977d698911631cc9c 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Removed just a bit too much in r30927.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c89b0ea4c21ce8515273715c9c274e577db2356c 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

We need to update the name and parent directory when renaming/moving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 331f147bae752ceaf57df51d5831ae4920f58ebe 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

* When removing entries properly call remove_vnode().
* Move notifications around so they are sent at the right time.
* Use notify_entry_moved() instead of generating a removal and creation
notification.
* Allow replacing entries.
* Added a TODO regarding non-empty directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30929 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f06f5d708c262f240bc23efe416340e3e1ef6280 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Make reading the write_overlay more efficient. Instead of always reading the
original file and then overwriting it with what we have in memory, just linearly
fill the buffer, closing gaps between our buffers with original file content as
needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ab2eaabaa36fd82db777fc6c6e6831dd82defba 30-May-2009 Michael Lotz <mmlr@mlotz.ch>

Only use read_pages() when we need to. Otherwise we bypass the cache of the
upper layer, degrading performance qutie a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30925 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57a5e69604a2a38e1b99989662c864120e363ca9 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement read/write_pages using Read()/Write(), io will follow later.
* Create a file cache for created overlay nodes. It is unused and disabled, but
causes a vnode cache to be created. This is required for mapping a file, which
in turn is required for executables to be loaded. With that copied or newly
created executables should work on top of write_overlay. Will think about and
implement a more direct way of getting that cache later today.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30910 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5740b42f365242b15b4034bbd022a4f6bc3b8435 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Write can be called without cookie (in the CreateSymlink() case for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0807998b5d8a99e73f3ec1401b471bc1b5a51cac 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Implement O_APPEND.
* Also make set_flags available for setting it. O_NONBLOCK is ignored as in BFS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30903 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f447d9b4cb2a6f985498b8ad39414263f11814e 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Apply r30890, adding a missing put_vnode() on error, to write_overlay as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30899 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3d94685b25f2a5c8c05fb82e1298e7115a4e2f16 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

Move the B_UNSUPPORTED return into the macro. No functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 607254f510abd4700520f9a523c114726aa5d2ca 28-May-2009 Michael Lotz <mmlr@mlotz.ch>

We don't want to use the OVERLAY_CALL macro for can_page() as it returns a bool
and not a status_t. In case of virtual files it would have wrongly returned
B_UNSUPPORTED, resulting in true instead of false.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 588b9abc1236d85e7ee248e3629ff6186e892690 27-May-2009 Michael Lotz <mmlr@mlotz.ch>

Fix leaking the old entry name when renaming actually succeeds.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3cf43c26516b695e35b7433196a530f7541c4ca8 25-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29719 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e83cf52aa7af025feb5c90d6b7f68fa68e9d7b42 14-Mar-2009 Michael Lotz <mmlr@mlotz.ch>

Ensure that our stat buffer is available when opening. Otherwise reads could
fail and the O_TRUNC might be overwritten as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29520 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4041343e6729cb16f7db3810412e44ddc98d2f3 08-Mar-2009 Michael Lotz <mmlr@mlotz.ch>

* This should mostly complete the write_overlay.
* Fix memory leaks here and there.
* Virtualize the dirent list.
* Handle "." and ".." ourselfs as at least iso9660 cannot really know them in
the readdir call and therefore returns different values than on lookup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29458 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9e9051d3e11e6d4fe4bdf582679c775d98bd731 20-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Implemented create/create dir/create symlink and remove/remove dir in the
write_overlay and add the necessary infrastructure for it.
* Fix setting permissions through write stat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29268 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 66728ad8b8b7d5117901ee3ba0da4dd2e52a065b 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Implemented write stat.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29260 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ef49450014054078584cd4d05f35316c3199efa 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Rename the trace output as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29256 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af4245f8a34f087dda1bec13a54846116f1f8250 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Split overlay filesystem into attribute_overlay and write_overlay.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29255 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 77fdecfec83f0d2878594fbdde5510405033fff0 19-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Preparing to split the overlay filesystem into an attribute_overlay and write_overlay module.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29253 a95241bf-73f2-0310-859d-f6bbb57e9c96