History log of /haiku/src/add-ons/kernel/file_systems/bfs/Inode.h
Revision Date Author Comments
# 93845aec 11-Jun-2020 Axel Dörfler <axeld@pinc-software.de>

block_cache: Change signature of *_etc() functions

* This allows file systems to retrieve the actual error code on a
failure, and report it to the user.
* All affected file systems have been adjusted to the API change.
This is a binary incompatible change.

Change-Id: Id73392aaf9c6cb7d643ff9adcb8bf80f3037874c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2913
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 91cdfd96 19-Jan-2017 Axel Dörfler <axeld@pinc-software.de>

bfs: Never publish the index root node.

* This caused the volume to be un-unmountable when you created an index
on a non-indexed volume.


# 39f437f7 04-Jan-2017 Axel Dörfler <axeld@pinc-software.de>

bfs: Always check if NodeGetter succeeded.

* There were quite a few cases that just assumed that the disk access
would succeed.
* This also fixes bug #12962.


# 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.


# fd91cf4d 16-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Replaced the specialized inode in transaction mechanism with a generic one.
That costs 12 more bytes per inode on 32 bit platforms, though.


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


# c709a396 24-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a method NeedsFileCache() that determines whether or not a file cache
should be allocated.
* Inode::InitCheck() now fails if a file cache couldn't be allocated.


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


# 27bb89ca 18-Jan-2010 Rene Gollent <anevilyak@gmail.com>

BFS needs to also allocate a file cache when dealing with a long symlink inode. Fixes ticket #5282.

Axel and/or Ingo, please review.



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


# 3818aa7d 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

On 64 bit machines the bfs_inode::pad field is too small for a
DoublyLinkedListLink. That actually seems to get the bfs_shell working
properly.


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


# 1b944eec 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Improved the status_change time check to actually filter out invalid times,
before, st_ctim was never updated; since you cannot change st_ctim via an API,
'0' cannot ever be set, either.
* Inode::WriteAttribute(), and Attribute::Write() now return whether they
created an attribute or not, and thus B_ATTR_CREATED is now correctly set.
* Moved status_change update from bfs_write_attr() into Inode::WriteAttribute()
where it can be handled more efficiently.
* Likewise, Inode::RemoveAttribute() now updates the status_change time as well,
I simply forgot this before.
* Minor cleanup.


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


# 3637e0e0 19-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed double indirect ranges again: I've messed them up when I tried to make
them more BeOS compatible while still keeping them somewhat flexible.
* _GrowStream() did actually not check if the double indirect region was already
filled up - this caused it to overwrite innocent memory. This fixes the bug
Rudolf showed me on this laptop that happened while copying a large file.
* Loosened file size restriction on a heavy fragmented disk: the indirect block
does not require a minimum array size anymore; before, you just couldn't let
a stream grow into the indirect range if it couldn't allocate NUM_ARRAY_BLOCKS
(4) blocks in a row. This considerably reduced the maximum file size in this
case.
* Removed no longer valid TODO.


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


# 16a821d9 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Inode::FindBlockRun() now checks the block run size of double indirect runs,
and stops processing if it finds something wrong.
* The default indirect/double array size differs from BeOS' BFS. I've changed
the size for double indirect arrays only, since the other size should work
either way (not tested yet, this change has a negative effect on the maximum
file size, but improves BeOS compatibility).
* The read/write path of BFS is now double indirect block size agnostic, and
should work with what it finds.
* Merged all double indirect size computation into some utility inline
functions.


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


# 1a60fd72 06-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Replaced the Inode::GetTree() method with a simple getter - the tree is
always created for directories since quite some time now.


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


# 134e1b04 06-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Somehow I forgot to update the parent directory's time stamps on file
creation, removal, and name changes...


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


# 0bad8397 28-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* When aborting a transaction, we also need to revert any changes made to the
cached bfs_inode of all changes inodes.


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


# e66295e5 26-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The inode may actually not be known when calling _RemoveInvalidNode(), this
could cause a KDL.
* Added a "force" argument to Inode::Remove() which should make it remove inodes
more reliably for checkfs.


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


# b49a46a7 29-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Inode::_AddSmallData() now supports writing at an arbitrary position.
However, Inode::WriteAttribute() still has a number of problems when this is
actually used; contents could get lost when an attribute is moved from the
small data section to an attribute file, and the index might not be updated
correctly when you write within the first 256 bytes, but not at position 0.
Since these problems aren't exposed with how we're using BFS right now, it's
not that bad, though (Inode::WriteAttribute() supports everything correctly
that it had to under BeOS).
* Added test application for certain fs_attr functions.


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


# 24b822d8 17-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* No longer hold the write lock when calling Inode::FillGapWithZeros(), as this
potentially deadlocks as described in bug #3768. The system is still
completely unresponsive, but gets back to a working state after some time now.
* Since the rw_lock is public, Transaction and InodeReadLocker no longer need to
be friends with Inode.


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


# 992fba36 16-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* There is now a list of removed vnodes in Volume - while asking the VFS for
this seemed to be a good idea, there is one race condition that cannot be
solved otherwise (the vnode must be added/removed to that list while holding
the transaction lock, and we cannot guarantee that in the VFS).
* We are using an unused area of the in-memory bfs_inode to store the list
links (bfs_inode::pad - this will also work on 64 bit platforms).
* Inode no longer adds a singly linked list link - the transaction list now
shares the doubly linked list with the removed vnodes list.
* Added an in-memory flag INODE_IN_TRANSACTION to avoid searching an inode
to be added in the list.
* Removing an attribute directory did not hold its write lock.
* If removing an attribute failed for some reason, the INODE_DELETED flag
was not removed (the transaction would not have failed because of that).


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


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

Remove the additional fs_vnode_ops arugment from get_vnode() again as it's not
needed at all when used as intended. Thanks Ingo for the explanation on how this
is intended to work. Adjusted the overlay fs accordingly and updated/reverted
the changes to the other filesystems.


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


# 00405f22 09-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Add an additional argument to get_vnode() that gets the fs_vnode_ops of the
node. That is needed for a layered filesystem to be able to construct a full
fs_vnode out of a volume/inode pair.
* Adapt places where get_vnode is used. Sadly this is a C API and we can't just
use a default NULL for that argument.
* Introduce a flag B_VNODE_WANTS_OVERLAY_SUB_NODE that can be returned in the
flags field of a fs get_vnode call. A filesystem can use this flag to indicate
that it doesn't support the full set of fs features (attributes, write support)
and it'd like to have unsupported calls emulated by an overlay sub node.
* Add a perliminary overlay filesystem that emulates file attributes using files
on a filesystem where attributes aren't supported. It does currently only
support reading attributes/attribute directories though. All other calls are
just passed through to the super filesystem.
* Adjust places where a HAS_FS_CALL() is taken as a guarantee that the operation
is supported. For the overlay filesystem we may later return a B_UNSUPPORTED,
so make sure that in that case proper fallback options are taken.
* Make the iso9660 filesystem request overlay sub nodes. This can be fine tuned
later to only trigger where there are features on a CD that need emulation
at all.

If you happened to know the attribute file format and location you could build
an iso with read-only attribute support now. Note that this won't be enough to
get a bootable iso-only image as the query and index support is yet missing.


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


# b2ec044c 30-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Added stat::st_blocks field as required by POSIX. This also closes ticket
#2261.
* Made at least BFS report it more or less correctly (the attributes are
ignored, though).


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


# 35a16d8f 18-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved the inode_types into Utilities.h.
* Added a S_EXTENDED_TYPES constant to simplify some checks.
* Simplified the fAllowDuplicates computation in BPlusTree::SetTo().


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


# 57b9debf 13-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Some index updating functions did not take into account that not all nodes
are put into all indices. For example, symlinks aren't part of the size
index. This fixes bug #2704.
* Also, Inode::NeedsTrimming() now ignores symlinks that have no data stream,
it's const now, too.
* Added helper methods Inode::In{Name|Size|LastModified}Index(), and use it
where appropriate.
* Clarified Inode::Create() description with regards to name vs. parent.


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


# 2accd07b 01-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced Chain with the new SinglyLinkedList.
* Renamed openModeToAccess() to open_mode_to_access().
* Cleanup.


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


# 2e3477e3 31-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Changed the inode write locking to be held as long as the transaction is
running - this fixes several cases where someone could see outdated data
when a transaction had to be reverted (the time between unlocking the inode
and actually reverting the blocks). For that, Inodes can now be put into a
singly linked list.
* Added a TODO in Inode::WriteAt() which explains why it cannot use the above
method: seems that our VFS/VM locking model isn't really that good.
* Fixed a possible deadlock in Attribute::_Truncate() where the inode write
lock was held before starting the transaction.
* Added an InodeReadLocker convenience class, that should be used instead
of ReadLocker - Inode::Lock() only still exists because of the needs of
bfs_io().
* Moved the bfs_io() callback hooks out of the exported module API region,
and removed their bfs_ prefix.
* Added a Volume::IsInitializing() method that should be used rather than
checking if Volume::ID() is >= 0.
* Removed the MultiInodeLocker again, as it's pretty much superfluous now.
* Moved openModeToAccess() to the Utility.h header.
* Minor cleanup.


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


# 1bde8b03 08-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced BFS's ReadWriteLock implementation with the kernel's rw_lock.
* The BlockAllocator now uses the new mutex_transfer_lock() function instead
of clobbering the mutex directly.
* Removed Lock.h - it's no longer needed.
* Minor white space cleanup.


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


# 03fa417b 07-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed the home-brewn locking classes in BFS besides the read/write lock
(for now).
* Inode::fSmallDataLock is now a recursive_lock, Journal::fLock is now
a recursive_lock, too, Journal::fEntriesLock is now a mutex, as is
BPlusTree::fIteratorLock.


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


# 42fe8ffb 25-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* This fixes the stupid compiler warning reported by Vasilis.


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


# 45a237d7 23-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Changed Vnode to be more flexible to use, and reduced its memory footprint
a bit.
* This also fixes a bug Salvatore pointed me to: Vnode would also call
put_vnode() on destruction if get_vnode() failed earlier.


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


# 977d7846 25-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Unbroke Inode::IsDirectory() again, according to Axel's suggestion.
* Simplified Inode::IsContainer().


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


# d11e733f 24-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Allow passing sub vnode ops and publish flags to Inode::Create().
* Implemented create_special_node() hook.
* Fixed Inode::IsContainer()/IsDirectory().


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


# 7ffafac8 05-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
Those that operate on mounted volumes to fs_volume_ops, those
operating on a vnode to fs_vnode_ops.
- Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
again.
- Instead of a void* volume and node cookie hooks are passed a
fs_volume and fs_vnode structure pointer, which contain the cookie
and an ops pointer (fs_volume a few more things).
- The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
instead of the volume ID. So does vfs_get_fs_node_from_path().
- Added type and flags arguments to publish_vnode() and the
get_vnode() hook and removed the type argument from lookup() hook.
Added vnode::type using formerly unused bits to store the node type.
Simplified a few things in the VFS due to the now always available
node type.
- Added fs_volume_ops::{create,delete}_sub_vnode() and
fs_vnode_ops::get_super_vnode() hooks. They are used to support file
system layers, e.g. allowing to extend an FS not supporting BeOS
attribute with attribute support. Needs some more work in the VFS.
- Added fs_vnode_ops::create_special_node() hook for creating special
nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
changes. Removed all other FSs from the image for the time being.
We'll see whether further API changes are necessary before porting
them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
- Added syscall _kern_create_fifo() (used by mkfifo()), which creates
a special node (type S_IFIFO) in the respective file system.
- When a special node is published the VFS creates a respective sub
node. Currently only FIFOs are supported.
- Added a little support for FIFO subnodes by using functionality from
the pipefs.
- Added mkfifo to the image. It can create FIFOs in the rootfs, but
the FIFOs aren't really usable ATM, since they still work like
pipes, i.e. readers and writers need to have them open at the same
time.
* Some smaller changes in the VFS:
- Made the *_CALL macros nicer to use (vargs).
- Refactored FS entry lookup into new function lookup_dir_entry().
- create_vnode() no longer just calls the FS create() hook. First it
looks up the entry and uses open_vnode(), if it already exists. This
is necessary for two reasons: 1) The FS might not support create()
while still allowing to open() entries. 2) When the FS has other
layers on to of it (or the respective node) it might not be
responsible for opening the node.


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


# 3d268eda 10-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Extracted file_map API out of the file cache - it's now an optional service
that can be used by file systems.
* Changed the way the file cache works: instead of reading/writing to the
underlying device directly, it can now be used for any data source, ie.
also network file systems.
* As a result, the former pages_io() moved to the VFS layer, and can now be
called by a file system via {read|write}_file_io_vec_pages() (naming
suggestions are always welcomed :-)). It now gets an FD, and uses that to
communicate with the device (via its fs_{read|write}_pages() hooks).
* The file_cache_{read|write}() functions must now be called without holding
an I/O relevant file system lock. That allows the file cache to prepare the
pages without colliding with the page writer, IOW the "mayBlock" flag can
go into the attic again (yay!).
* This also results in a much better performance when the system does I/O and
is low on memory, as the page writer can now finally write back some pages,
and that even without maxing out the CPU :)
* The API changes put slightly more burden on the fs_{read|write}_pages()
hooks, but in combination with the file_map it's still pretty straight
forward. It just will have to dispatch the call to the underlying device
directly, usually it will just call its fs_{read|write}_pages() hooks
via the above mentioned calls.
* Ported BFS and FAT to the new API, the latter has not been tested, though.
* Also ported the API changes to the fs_shell. I also completely removed its
file cache level page handling - the downside is that device access is no
longer cached (ie. depends on the host OS now), the upside is that the code
is greatly simplified.


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


# 245aecda 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# 065e3184 22-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Inode::Create() now has a "_created" parameter that will be set to true in case a
node has been created - this is now used in bfs_create() to suppress the new entry
notification in case the file already existed.
* Implemented parameter parsing in bfs_initialize() - does not work in the new bfs_shell
though, as it currently misses driver_settings functionality.
* Attribute::Create() and Attribute::Open() will now honour O_TRUNC correctly.
* Note: Inode::WriteAttribute() still follows R5 semantics for small_data attributes
in this regard and must be fixed (I've opened ticket #1242 for this).
* Some cleanup.


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


# c391f84b 26-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Prepared the BFS sources to be used with the new FS shell:
- Moved all inclusions of system headers into a new
system_dependencies.h header, which conditionally either includes
these or the FS shell headers.
- Fixed compiler warnings related to printf-like functions (int32 is
int, not long on non-BeOS platforms).
* Build a new bfs_shell. Compiles and links, but does nothing ATM.


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


# e04bcee9 28-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Made sources UserlandFS friendly. Can't be used with the fs_shell ATM,
anyway.


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


# 4ecd0171 07-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a bug that would not remove an existing attribute from the small data section
when the new attribute data was too large to fit into the small data section at all.
This fixes the Trash icon update with a block size of 1024 bytes.
* This also fixes a bug where AddSmallData() required you to write back the inode even
if it failed with B_DEVICE_FULL, but no one did it.
* _RemoveSmallData() no longer requires you to write the inode back on success.
* Made most small data methods private.
* WriteAttribute() now tries to put the data into the small data section even if it
existed as a separate file before (the file is then removed).


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


# fc317af2 23-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Writing to attributes was deadlock prone; the BFS volume lock was acquired with
the BFS Journal lock held.
Since our get_vnode() is no longer unsafe (unlike Be's version of it), we can
get rid of the UNSAFE_GET_VNODE stuff, which also solves this bug.


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


# b61fdf78 28-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* The inode block wasn't written back when it was opened with O_TRUNC/B_ERASE_FILE
which could cause inconsistency of on-disk structures.
* Fixed copy&paste bug introduced by Ingo when he did the GCC 4 work-around: when
shrinking the direct range, the new size was written to the indirect range.
* Some cleanup, renamed private Inode methods to have a leading '_' symbol.


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


# 69aaf3f3 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some stupid problems with the stat::st_mode field; the type of
a node was not always correctly determined (or set) - the recent change
of the attribute (directory) modes made these bugs a bit more obtrusive.
This also fixes a drop to the kernel debugger when doing a
"zip -r config.zip config/" in the home directory, as reported by Korli.


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


# f7eefd82 02-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warnings: possibly uninitialized variable, missing friend classifier (struct/class).


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


# a4480535 19-Jan-2005 Axel Dörfler <axeld@pinc-software.de>

No longer tries to update indices from deleted files. Added new method
Inode::IsDeleted().


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


# 299e5215 12-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Added buffer size parameter to Inode::GetName().


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


# e15a7ad3 03-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed a big allocation leak: preallocation was done for all streams, but
only regular files were stripped back when bfs_close() was called.
Now, we don't preallocate any blocks for attributes, attribute directories,
and symbolic links (which do have a stream when longer than 144 bytes).
Also, bfs_release_vnode() now trims back all streams that need to be
trimmed - this catches standard directories, which could also slip through
before.
Removed the remaining blocks of INODE_NO_CACHE support as this is not
needed for Haiku.
Added method Inode::NeedsTrimming() that determines if its data stream
can be trimmed (indices are never trimmed to reduce fragmentation).


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


# fb02804a 19-Nov-2004 Axel Dörfler <axeld@pinc-software.de>

Big update while moving over completely to the Haiku kernel:
- Ported over BFS to the new cache API
- Inode no longer inherits from CachedBlock, and therefore, no longer
keeps the whole inode block in memory. It now has a copy of the bfs_inode
structure in memory instead. This has a number of advantages but also some
disadvantages, so it might be reverted later, even if it's unlikely.
- Added a NodeGetter class that can be used whenever the real block needs
to be accessed (ie. for attributes)
- Changed *transaction to &transaction where possible
- Removed support for KEEP_WRONG_DIRENT_RECLEN
- Removed support for uncached file access since that's no longer needed
- Fixed some endian issues in bfs_write_stat()
- Removed the install BFS rules, since they don't make any sense anymore
(unless you are running Haiku ;-))

Note, logged streams are not supported anymore right now. Also, the
transaction code is pretty simple and slow - it will be improved later
on. Attribute code is pretty much untested in the new environment.


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


# a4e05e61 06-Sep-2004 Axel Dörfler <axeld@pinc-software.de>

Added a "cookie" parameter to the fs_read|write|has_page[s]().
Implemented bfs_get_file_map().
Now uses the brand new file cache for the file data streams.


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


# 1c1b60af 08-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

lock.h and cache.h are C++ safe now.


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


# dca5d901 07-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added missing include.


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


# 36660c5e 29-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Switched from direct get_vnode() usage to the Vnode class.
Now acquires the volume lock always before get_vnode() is called as long
as UNSAFE_GET_VNODE is defined (which now is by default).
May cause some unwanted side-effects; it still has to be thorougly tested.


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


# b53b9c0c 25-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Cleaned the debug mess mmu_man created (thanks anyway).
Switched to kernel_cpp.h/cpp.


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


# 32e3f999 25-Jan-2004 François Revol <revol@free.fr>

Debug Inode ctor/dctor; fix printf args warnigns


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


# 91e6897c 24-Jan-2004 François Revol <revol@free.fr>

Added obfsinode kernel debugger command.


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


# 1a49a098 07-Nov-2003 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Bunches of changes to make mwcc like the code. I also coded an _atomic_set() and _atomic_test_and_set() for PowerPC. Of course, there's already one in the kernel tree, but mine's better. :P Now builds (and works, after a fashion) on R5 PowerPC.


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


# cb94280c 16-Sep-2003 Axel Dörfler <axeld@pinc-software.de>

The file system is now almost endian-aware.
Used lazy unreadable conversion: ==, !=, == 0, != 0 are endian-safe
and don't need byte swapping.
If the platform endian differs from the one selected at compile time,
it will mount all volumes read-only for now.
Uncomment BFS_BIG_ENDIAN_ONLY in the Jamfile to build the big endian
version under x86.
No matter on what platform, the compilation defaults to build BFS as
little endian file system (see bfs_endian.h for details).


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


# 8ea8d0c2 31-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed queries a bit more (maybe even completely...). In several situations,
the old attribute value wasn't evaluated at all.
Also, Index::Update() got a type code of zero, instead of the real value
in situations where this didn't make any sense.
Minor cleanup in kernel_interface.cpp.
New method Volume::CheckForLiveQuery() that checks if there is a live query
depending on the specified attribute - not yet implemented, but already used;
always returns "true" right now, which doesn't cause any harm but reducing
the speed lightly.


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


# 20c74d7d 27-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed reordering of initializer warning - should compile the fs_shell with
-Wall enabled...


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


# ae587160 27-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed another bad bug caused by calling get_vnode() on a node currently
being constructed: bfs_read_node() created an Inode object independent from
the one set in new_vnode().
As a work-around (the new VFS layer will introduce some better methods here)
we are now using the bfs_inode.etc field as a pointer to our object - just
like BFS has thought to use this field. If bfs_read_vnode() has to wait for
the inode (because it is being constructed), it will use the "etc" pointer
and don't create it's own Inode object.
Almost all changes made change the API to take this case into account:
- new Inode constructor to be able to be created from a CachedBlock
- CachedBlock now has a Keep() method which suppresses the release_block()
call when the object is destructed.
- a CachedBlock can now be constructed from the contents of another one (by
calling the source's Keep() method).
- Inode::InitCheck() no longer checks the integrity of the bfs_inode - this
is now done by bfs_inode::InitCheck() which is optionally called by the
former (default).
- moved the inline CachedBlock methods out of the class definition (was
too crowded to be readable).
- new Inode::Initialize() which is called by all Inode constructors
- an Inode object now sets a better name for its read/write lock.


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


# 09ed3db8 25-May-2003 Axel Dörfler <axeld@pinc-software.de>

Some minor style changes/clean ups.


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


# 0606e6e1 25-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added a new method Inode::GetName() which safely copies the inode's name
to the provided buffer.
Inode::Name() no longer locks the small_data region anymore.
Added ASSERTs that the small_data region is locked for the methods requiring
that.


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


# 9fec50f9 21-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added new Inode::Free() method which frees all space associated with an
inode.
Some style cleanups.


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


# 67fa10dc 19-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added some more type identification methods and constants.
Renamed Inode::IsDirectory() to Inode::IsContainer() (since it is also true
for index/attribute directories).
Introduced a new Inode::IsDirectory() that only checks for real and standard
directories. Let's hope I've fixed more bugs with that than introduced new
ones...


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


# 8ea2f57d 17-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added some more type identifying methods and constants (i.e. Inode::IsAttribute()).


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


# 2b5451f1 16-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Added private non-implemented copy constructor and assignment operators
for many classes for the sake of completeness.
Added a Transaction::IsStarted() method to not let it look like as if the
transaction is started more than once.
Changes made after suggestions from Mike Nordell, again :-)


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


# d801dfdd 16-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Added CachedBlock::BlockSize(), and CachedBlock::BlockShift() methods as
suggested by Mike Nordell.
Some code cleanups, added a comment in Inode::SetFileSize() to point out
that Stream<Cache>::WriteAt() denies growing the file size its own.


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


# b98d9a33 06-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Fixed two bugs in the block allocator:
- the maximum number of blocks a block_run can cover is 65535 not 65536
- allocations over a block boundary in the block bitmap always failed due
to a incorrectly handled status

Both bugs could prevent BFS to create the VM swap file which led BeOS to
stop booting under certain circumstances.


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


# 2d38e3f6 21-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

The beginning of letting a stream grow into the double indirect range.
Not yet finished, nor tested, but almost complete :)


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


# ae38c6e9 12-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug that could lead to the wrong last_modified time in an inode;
bfs_close() updated the last_modified time & index, but it didn't write
the inode back to disk.
Furthermore, bfs_write() should have already updated the last_modified
time, not bfs_close.


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


# c42ee134 07-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

Initial revision


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


# fd91cf4d189f91ecca91e6704796beeeee692cb5 16-Feb-2010 Axel Dörfler <axeld@pinc-software.de>

* Replaced the specialized inode in transaction mechanism with a generic one.
That costs 12 more bytes per inode on 32 bit platforms, though.


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


# c709a396cfd5dd02902f6968c648681f3f4ec0da 24-Jan-2010 Axel Dörfler <axeld@pinc-software.de>

* Added a method NeedsFileCache() that determines whether or not a file cache
should be allocated.
* Inode::InitCheck() now fails if a file cache couldn't be allocated.


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


# 27bb89cae1363273bfcf3495edf8e84017b59ea9 18-Jan-2010 Rene Gollent <anevilyak@gmail.com>

BFS needs to also allocate a file cache when dealing with a long symlink inode. Fixes ticket #5282.

Axel and/or Ingo, please review.



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


# 3818aa7dac4af166b107553c90bca6acf650739f 25-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

On 64 bit machines the bfs_inode::pad field is too small for a
DoublyLinkedListLink. That actually seems to get the bfs_shell working
properly.


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


# 1b944eec20dd1b26dd3b7878acc90b3acda1151d 29-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Improved the status_change time check to actually filter out invalid times,
before, st_ctim was never updated; since you cannot change st_ctim via an API,
'0' cannot ever be set, either.
* Inode::WriteAttribute(), and Attribute::Write() now return whether they
created an attribute or not, and thus B_ATTR_CREATED is now correctly set.
* Moved status_change update from bfs_write_attr() into Inode::WriteAttribute()
where it can be handled more efficiently.
* Likewise, Inode::RemoveAttribute() now updates the status_change time as well,
I simply forgot this before.
* Minor cleanup.


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


# 3637e0e0576cd8a4e918b6ab0e367dc4ebc3c42c 19-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Fixed double indirect ranges again: I've messed them up when I tried to make
them more BeOS compatible while still keeping them somewhat flexible.
* _GrowStream() did actually not check if the double indirect region was already
filled up - this caused it to overwrite innocent memory. This fixes the bug
Rudolf showed me on this laptop that happened while copying a large file.
* Loosened file size restriction on a heavy fragmented disk: the indirect block
does not require a minimum array size anymore; before, you just couldn't let
a stream grow into the indirect range if it couldn't allocate NUM_ARRAY_BLOCKS
(4) blocks in a row. This considerably reduced the maximum file size in this
case.
* Removed no longer valid TODO.


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


# 16a821d9685a8f25b8eb1f628474987ee6848fa6 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Inode::FindBlockRun() now checks the block run size of double indirect runs,
and stops processing if it finds something wrong.
* The default indirect/double array size differs from BeOS' BFS. I've changed
the size for double indirect arrays only, since the other size should work
either way (not tested yet, this change has a negative effect on the maximum
file size, but improves BeOS compatibility).
* The read/write path of BFS is now double indirect block size agnostic, and
should work with what it finds.
* Merged all double indirect size computation into some utility inline
functions.


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


# 1a60fd72cf588ed0d25028da354261b4d8409c08 06-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Replaced the Inode::GetTree() method with a simple getter - the tree is
always created for directories since quite some time now.


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


# 134e1b04d4256ec2958a6e2454318c46aea0acd3 06-Aug-2009 Axel Dörfler <axeld@pinc-software.de>

* Somehow I forgot to update the parent directory's time stamps on file
creation, removal, and name changes...


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


# 0bad8397020c9c2e5b7b4be04497a7b8b34d87f9 28-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* When aborting a transaction, we also need to revert any changes made to the
cached bfs_inode of all changes inodes.


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


# e66295e5e578267d488a98387f2f29f38d7242e9 26-Jul-2009 Axel Dörfler <axeld@pinc-software.de>

* The inode may actually not be known when calling _RemoveInvalidNode(), this
could cause a KDL.
* Added a "force" argument to Inode::Remove() which should make it remove inodes
more reliably for checkfs.


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


# b49a46a7ffa912d6ea2bc75065a2b5aec6c59895 29-Jun-2009 Axel Dörfler <axeld@pinc-software.de>

* Inode::_AddSmallData() now supports writing at an arbitrary position.
However, Inode::WriteAttribute() still has a number of problems when this is
actually used; contents could get lost when an attribute is moved from the
small data section to an attribute file, and the index might not be updated
correctly when you write within the first 256 bytes, but not at position 0.
Since these problems aren't exposed with how we're using BFS right now, it's
not that bad, though (Inode::WriteAttribute() supports everything correctly
that it had to under BeOS).
* Added test application for certain fs_attr functions.


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


# 24b822d843be9b891e7e9ebba99741b65e89647d 17-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* No longer hold the write lock when calling Inode::FillGapWithZeros(), as this
potentially deadlocks as described in bug #3768. The system is still
completely unresponsive, but gets back to a working state after some time now.
* Since the rw_lock is public, Transaction and InodeReadLocker no longer need to
be friends with Inode.


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


# 992fba36eef8b17808a06d483f2fdad90173b01d 16-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* There is now a list of removed vnodes in Volume - while asking the VFS for
this seemed to be a good idea, there is one race condition that cannot be
solved otherwise (the vnode must be added/removed to that list while holding
the transaction lock, and we cannot guarantee that in the VFS).
* We are using an unused area of the in-memory bfs_inode to store the list
links (bfs_inode::pad - this will also work on 64 bit platforms).
* Inode no longer adds a singly linked list link - the transaction list now
shares the doubly linked list with the removed vnodes list.
* Added an in-memory flag INODE_IN_TRANSACTION to avoid searching an inode
to be added in the list.
* Removing an attribute directory did not hold its write lock.
* If removing an attribute failed for some reason, the INODE_DELETED flag
was not removed (the transaction would not have failed because of that).


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


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

Remove the additional fs_vnode_ops arugment from get_vnode() again as it's not
needed at all when used as intended. Thanks Ingo for the explanation on how this
is intended to work. Adjusted the overlay fs accordingly and updated/reverted
the changes to the other filesystems.


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


# 00405f2286fd370a0bd264d0bbac0cfa120e7646 09-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

* Add an additional argument to get_vnode() that gets the fs_vnode_ops of the
node. That is needed for a layered filesystem to be able to construct a full
fs_vnode out of a volume/inode pair.
* Adapt places where get_vnode is used. Sadly this is a C API and we can't just
use a default NULL for that argument.
* Introduce a flag B_VNODE_WANTS_OVERLAY_SUB_NODE that can be returned in the
flags field of a fs get_vnode call. A filesystem can use this flag to indicate
that it doesn't support the full set of fs features (attributes, write support)
and it'd like to have unsupported calls emulated by an overlay sub node.
* Add a perliminary overlay filesystem that emulates file attributes using files
on a filesystem where attributes aren't supported. It does currently only
support reading attributes/attribute directories though. All other calls are
just passed through to the super filesystem.
* Adjust places where a HAS_FS_CALL() is taken as a guarantee that the operation
is supported. For the overlay filesystem we may later return a B_UNSUPPORTED,
so make sure that in that case proper fallback options are taken.
* Make the iso9660 filesystem request overlay sub nodes. This can be fine tuned
later to only trigger where there are features on a CD that need emulation
at all.

If you happened to know the attribute file format and location you could build
an iso with read-only attribute support now. Note that this won't be enough to
get a bootable iso-only image as the query and index support is yet missing.


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


# b2ec044cb8a930fe55b3a3d899f2e854d955f1d5 30-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Added stat::st_blocks field as required by POSIX. This also closes ticket
#2261.
* Made at least BFS report it more or less correctly (the attributes are
ignored, though).


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


# 35a16d8f5e035b37cf8dc6a242cadf54b23eb142 18-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Moved the inode_types into Utilities.h.
* Added a S_EXTENDED_TYPES constant to simplify some checks.
* Simplified the fAllowDuplicates computation in BPlusTree::SetTo().


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


# 57b9debf766c370dff725412c27ab09701f1d05f 13-Sep-2008 Axel Dörfler <axeld@pinc-software.de>

* Some index updating functions did not take into account that not all nodes
are put into all indices. For example, symlinks aren't part of the size
index. This fixes bug #2704.
* Also, Inode::NeedsTrimming() now ignores symlinks that have no data stream,
it's const now, too.
* Added helper methods Inode::In{Name|Size|LastModified}Index(), and use it
where appropriate.
* Clarified Inode::Create() description with regards to name vs. parent.


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


# 2accd07be4d2731332674ebf8d801260b5388130 01-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced Chain with the new SinglyLinkedList.
* Renamed openModeToAccess() to open_mode_to_access().
* Cleanup.


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


# 2e3477e3d851cc46fa682712c3f73dbb82d64fd9 31-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Changed the inode write locking to be held as long as the transaction is
running - this fixes several cases where someone could see outdated data
when a transaction had to be reverted (the time between unlocking the inode
and actually reverting the blocks). For that, Inodes can now be put into a
singly linked list.
* Added a TODO in Inode::WriteAt() which explains why it cannot use the above
method: seems that our VFS/VM locking model isn't really that good.
* Fixed a possible deadlock in Attribute::_Truncate() where the inode write
lock was held before starting the transaction.
* Added an InodeReadLocker convenience class, that should be used instead
of ReadLocker - Inode::Lock() only still exists because of the needs of
bfs_io().
* Moved the bfs_io() callback hooks out of the exported module API region,
and removed their bfs_ prefix.
* Added a Volume::IsInitializing() method that should be used rather than
checking if Volume::ID() is >= 0.
* Removed the MultiInodeLocker again, as it's pretty much superfluous now.
* Moved openModeToAccess() to the Utility.h header.
* Minor cleanup.


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


# 1bde8b03e7789d10cdc063a8a4b23ce3cba6f2e1 08-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Replaced BFS's ReadWriteLock implementation with the kernel's rw_lock.
* The BlockAllocator now uses the new mutex_transfer_lock() function instead
of clobbering the mutex directly.
* Removed Lock.h - it's no longer needed.
* Minor white space cleanup.


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


# 03fa417b706f63305263982a61eb1002e6ff9d96 07-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Removed the home-brewn locking classes in BFS besides the read/write lock
(for now).
* Inode::fSmallDataLock is now a recursive_lock, Journal::fLock is now
a recursive_lock, too, Journal::fEntriesLock is now a mutex, as is
BPlusTree::fIteratorLock.


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


# 42fe8ffbd27655613576dcb774c18f5e07b240f6 25-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* This fixes the stupid compiler warning reported by Vasilis.


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


# 45a237d7f48c11397afe27cdd839da3e0153722a 23-Jun-2008 Axel Dörfler <axeld@pinc-software.de>

* Changed Vnode to be more flexible to use, and reduced its memory footprint
a bit.
* This also fixes a bug Salvatore pointed me to: Vnode would also call
put_vnode() on destruction if get_vnode() failed earlier.


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


# 977d7846f5236b59c6301b10925f7f8bd0edbcb9 25-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Unbroke Inode::IsDirectory() again, according to Axel's suggestion.
* Simplified Inode::IsContainer().


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


# d11e733fee81b682160c03a5d1cacb77b3a2faff 24-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Allow passing sub vnode ops and publish flags to Inode::Create().
* Implemented create_special_node() hook.
* Fixed Inode::IsContainer()/IsDirectory().


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


# 7ffafac8d76aa50ea68667e61038022220a90256 05-Apr-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
Those that operate on mounted volumes to fs_volume_ops, those
operating on a vnode to fs_vnode_ops.
- Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
again.
- Instead of a void* volume and node cookie hooks are passed a
fs_volume and fs_vnode structure pointer, which contain the cookie
and an ops pointer (fs_volume a few more things).
- The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
instead of the volume ID. So does vfs_get_fs_node_from_path().
- Added type and flags arguments to publish_vnode() and the
get_vnode() hook and removed the type argument from lookup() hook.
Added vnode::type using formerly unused bits to store the node type.
Simplified a few things in the VFS due to the now always available
node type.
- Added fs_volume_ops::{create,delete}_sub_vnode() and
fs_vnode_ops::get_super_vnode() hooks. They are used to support file
system layers, e.g. allowing to extend an FS not supporting BeOS
attribute with attribute support. Needs some more work in the VFS.
- Added fs_vnode_ops::create_special_node() hook for creating special
nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
changes. Removed all other FSs from the image for the time being.
We'll see whether further API changes are necessary before porting
them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
- Added syscall _kern_create_fifo() (used by mkfifo()), which creates
a special node (type S_IFIFO) in the respective file system.
- When a special node is published the VFS creates a respective sub
node. Currently only FIFOs are supported.
- Added a little support for FIFO subnodes by using functionality from
the pipefs.
- Added mkfifo to the image. It can create FIFOs in the rootfs, but
the FIFOs aren't really usable ATM, since they still work like
pipes, i.e. readers and writers need to have them open at the same
time.
* Some smaller changes in the VFS:
- Made the *_CALL macros nicer to use (vargs).
- Refactored FS entry lookup into new function lookup_dir_entry().
- create_vnode() no longer just calls the FS create() hook. First it
looks up the entry and uses open_vnode(), if it already exists. This
is necessary for two reasons: 1) The FS might not support create()
while still allowing to open() entries. 2) When the FS has other
layers on to of it (or the respective node) it might not be
responsible for opening the node.


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


# 3d268eda3d0ca504c865533347decf27b54025b6 10-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Extracted file_map API out of the file cache - it's now an optional service
that can be used by file systems.
* Changed the way the file cache works: instead of reading/writing to the
underlying device directly, it can now be used for any data source, ie.
also network file systems.
* As a result, the former pages_io() moved to the VFS layer, and can now be
called by a file system via {read|write}_file_io_vec_pages() (naming
suggestions are always welcomed :-)). It now gets an FD, and uses that to
communicate with the device (via its fs_{read|write}_pages() hooks).
* The file_cache_{read|write}() functions must now be called without holding
an I/O relevant file system lock. That allows the file cache to prepare the
pages without colliding with the page writer, IOW the "mayBlock" flag can
go into the attic again (yay!).
* This also results in a much better performance when the system does I/O and
is low on memory, as the page writer can now finally write back some pages,
and that even without maxing out the CPU :)
* The API changes put slightly more burden on the fs_{read|write}_pages()
hooks, but in combination with the file_map it's still pretty straight
forward. It just will have to dispatch the call to the underlying device
directly, usually it will just call its fs_{read|write}_pages() hooks
via the above mentioned calls.
* Ported BFS and FAT to the new API, the latter has not been tested, though.
* Also ported the API changes to the fs_shell. I also completely removed its
file cache level page handling - the downside is that device access is no
longer cached (ie. depends on the host OS now), the upside is that the code
is greatly simplified.


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


# 245aecda8ac43fc2c0c0bac6a7e4016efa9b71e1 21-Jun-2007 Axel Dörfler <axeld@pinc-software.de>

Got rid of vnode_id and mount_id, replaced with ino_t and dev_t.


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


# 065e31842971a008888c578c2c1f1a35c75de40e 22-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Inode::Create() now has a "_created" parameter that will be set to true in case a
node has been created - this is now used in bfs_create() to suppress the new entry
notification in case the file already existed.
* Implemented parameter parsing in bfs_initialize() - does not work in the new bfs_shell
though, as it currently misses driver_settings functionality.
* Attribute::Create() and Attribute::Open() will now honour O_TRUNC correctly.
* Note: Inode::WriteAttribute() still follows R5 semantics for small_data attributes
in this regard and must be fixed (I've opened ticket #1242 for this).
* Some cleanup.


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


# c391f84b2c732398288276bc8354ac4060dc5a4d 26-Apr-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Prepared the BFS sources to be used with the new FS shell:
- Moved all inclusions of system headers into a new
system_dependencies.h header, which conditionally either includes
these or the FS shell headers.
- Fixed compiler warnings related to printf-like functions (int32 is
int, not long on non-BeOS platforms).
* Build a new bfs_shell. Compiles and links, but does nothing ATM.


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


# e04bcee997abc8906297d5d3c42bf38a9cca77aa 28-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Made sources UserlandFS friendly. Can't be used with the fs_shell ATM,
anyway.


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


# 4ecd017140fa76d096f4856df9535312e5fd3411 07-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a bug that would not remove an existing attribute from the small data section
when the new attribute data was too large to fit into the small data section at all.
This fixes the Trash icon update with a block size of 1024 bytes.
* This also fixes a bug where AddSmallData() required you to write back the inode even
if it failed with B_DEVICE_FULL, but no one did it.
* _RemoveSmallData() no longer requires you to write the inode back on success.
* Made most small data methods private.
* WriteAttribute() now tries to put the data into the small data section even if it
existed as a separate file before (the file is then removed).


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


# fc317af25e51b2c96c416b3d1fc01e3f0b168595 23-Jan-2007 Axel Dörfler <axeld@pinc-software.de>

Writing to attributes was deadlock prone; the BFS volume lock was acquired with
the BFS Journal lock held.
Since our get_vnode() is no longer unsafe (unlike Be's version of it), we can
get rid of the UNSAFE_GET_VNODE stuff, which also solves this bug.


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


# b61fdf78c6e0da8638a91542ef457ee9ca8e6ca8 28-Feb-2006 Axel Dörfler <axeld@pinc-software.de>

* The inode block wasn't written back when it was opened with O_TRUNC/B_ERASE_FILE
which could cause inconsistency of on-disk structures.
* Fixed copy&paste bug introduced by Ingo when he did the GCC 4 work-around: when
shrinking the direct range, the new size was written to the indirect range.
* Some cleanup, renamed private Inode methods to have a leading '_' symbol.


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


# 69aaf3f39bdf94b3135fcddcfe867e3f7219622a 26-May-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed some stupid problems with the stat::st_mode field; the type of
a node was not always correctly determined (or set) - the recent change
of the attribute (directory) modes made these bugs a bit more obtrusive.
This also fixes a drop to the kernel debugger when doing a
"zip -r config.zip config/" in the home directory, as reported by Korli.


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


# f7eefd8207342f7216f4822773fe9d4a5c0a0eef 02-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed warnings: possibly uninitialized variable, missing friend classifier (struct/class).


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


# a4480535ade318237fb8382cb0545bb2c2d6323f 19-Jan-2005 Axel Dörfler <axeld@pinc-software.de>

No longer tries to update indices from deleted files. Added new method
Inode::IsDeleted().


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


# 299e521546f70bc079b1e77a8e65a883544b7ed6 12-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Added buffer size parameter to Inode::GetName().


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


# e15a7ad3a398f37a44b9fa7207ed7e1922dc9840 03-Dec-2004 Axel Dörfler <axeld@pinc-software.de>

Fixed a big allocation leak: preallocation was done for all streams, but
only regular files were stripped back when bfs_close() was called.
Now, we don't preallocate any blocks for attributes, attribute directories,
and symbolic links (which do have a stream when longer than 144 bytes).
Also, bfs_release_vnode() now trims back all streams that need to be
trimmed - this catches standard directories, which could also slip through
before.
Removed the remaining blocks of INODE_NO_CACHE support as this is not
needed for Haiku.
Added method Inode::NeedsTrimming() that determines if its data stream
can be trimmed (indices are never trimmed to reduce fragmentation).


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


# fb02804a89b1100c0f20c3e3c28be28215103c44 19-Nov-2004 Axel Dörfler <axeld@pinc-software.de>

Big update while moving over completely to the Haiku kernel:
- Ported over BFS to the new cache API
- Inode no longer inherits from CachedBlock, and therefore, no longer
keeps the whole inode block in memory. It now has a copy of the bfs_inode
structure in memory instead. This has a number of advantages but also some
disadvantages, so it might be reverted later, even if it's unlikely.
- Added a NodeGetter class that can be used whenever the real block needs
to be accessed (ie. for attributes)
- Changed *transaction to &transaction where possible
- Removed support for KEEP_WRONG_DIRENT_RECLEN
- Removed support for uncached file access since that's no longer needed
- Fixed some endian issues in bfs_write_stat()
- Removed the install BFS rules, since they don't make any sense anymore
(unless you are running Haiku ;-))

Note, logged streams are not supported anymore right now. Also, the
transaction code is pretty simple and slow - it will be improved later
on. Attribute code is pretty much untested in the new environment.


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


# a4e05e618a467d1af0433cde51683a33580ce6cc 06-Sep-2004 Axel Dörfler <axeld@pinc-software.de>

Added a "cookie" parameter to the fs_read|write|has_page[s]().
Implemented bfs_get_file_map().
Now uses the brand new file cache for the file data streams.


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


# 1c1b60af69224711bdfcad79d7eb674cf607f500 08-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

lock.h and cache.h are C++ safe now.


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


# dca5d901c7bc64af9a5ad354374fc894605d1965 07-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added missing include.


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


# 36660c5e9996909146d3872baa555115357f9267 29-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Switched from direct get_vnode() usage to the Vnode class.
Now acquires the volume lock always before get_vnode() is called as long
as UNSAFE_GET_VNODE is defined (which now is by default).
May cause some unwanted side-effects; it still has to be thorougly tested.


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


# b53b9c0cd91a8ebf7cbd5cbcc32e02449603a095 25-Jan-2004 Axel Dörfler <axeld@pinc-software.de>

Cleaned the debug mess mmu_man created (thanks anyway).
Switched to kernel_cpp.h/cpp.


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


# 32e3f999727923b03369626590ad799718708619 25-Jan-2004 François Revol <revol@free.fr>

Debug Inode ctor/dctor; fix printf args warnigns


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


# 91e6897c6321262a91daed30b1b5be7420c53679 24-Jan-2004 François Revol <revol@free.fr>

Added obfsinode kernel debugger command.


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


# 1a49a0986bd50ef30d406b4f5001a0784d344015 07-Nov-2003 Nathan Whitehorn <nwhitehorn@nowhere.fake>

Bunches of changes to make mwcc like the code. I also coded an _atomic_set() and _atomic_test_and_set() for PowerPC. Of course, there's already one in the kernel tree, but mine's better. :P Now builds (and works, after a fashion) on R5 PowerPC.


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


# cb94280c6b8450b48764df889cdf0a8fd19af64b 16-Sep-2003 Axel Dörfler <axeld@pinc-software.de>

The file system is now almost endian-aware.
Used lazy unreadable conversion: ==, !=, == 0, != 0 are endian-safe
and don't need byte swapping.
If the platform endian differs from the one selected at compile time,
it will mount all volumes read-only for now.
Uncomment BFS_BIG_ENDIAN_ONLY in the Jamfile to build the big endian
version under x86.
No matter on what platform, the compilation defaults to build BFS as
little endian file system (see bfs_endian.h for details).


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


# 8ea8d0c2bb1270149813f29b7cda0fba06f2210a 31-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed queries a bit more (maybe even completely...). In several situations,
the old attribute value wasn't evaluated at all.
Also, Index::Update() got a type code of zero, instead of the real value
in situations where this didn't make any sense.
Minor cleanup in kernel_interface.cpp.
New method Volume::CheckForLiveQuery() that checks if there is a live query
depending on the specified attribute - not yet implemented, but already used;
always returns "true" right now, which doesn't cause any harm but reducing
the speed lightly.


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


# 20c74d7d25407db63ddc29a0f0b06eca95ee49a9 27-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed reordering of initializer warning - should compile the fs_shell with
-Wall enabled...


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


# ae587160243f792a18663e03b0c77c93058fb24f 27-May-2003 Axel Dörfler <axeld@pinc-software.de>

Fixed another bad bug caused by calling get_vnode() on a node currently
being constructed: bfs_read_node() created an Inode object independent from
the one set in new_vnode().
As a work-around (the new VFS layer will introduce some better methods here)
we are now using the bfs_inode.etc field as a pointer to our object - just
like BFS has thought to use this field. If bfs_read_vnode() has to wait for
the inode (because it is being constructed), it will use the "etc" pointer
and don't create it's own Inode object.
Almost all changes made change the API to take this case into account:
- new Inode constructor to be able to be created from a CachedBlock
- CachedBlock now has a Keep() method which suppresses the release_block()
call when the object is destructed.
- a CachedBlock can now be constructed from the contents of another one (by
calling the source's Keep() method).
- Inode::InitCheck() no longer checks the integrity of the bfs_inode - this
is now done by bfs_inode::InitCheck() which is optionally called by the
former (default).
- moved the inline CachedBlock methods out of the class definition (was
too crowded to be readable).
- new Inode::Initialize() which is called by all Inode constructors
- an Inode object now sets a better name for its read/write lock.


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


# 09ed3db89a7892a5fd9f4d168c17d8efb2105c5b 25-May-2003 Axel Dörfler <axeld@pinc-software.de>

Some minor style changes/clean ups.


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


# 0606e6e197959adbbdedd297aa13db64c2e6b826 25-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added a new method Inode::GetName() which safely copies the inode's name
to the provided buffer.
Inode::Name() no longer locks the small_data region anymore.
Added ASSERTs that the small_data region is locked for the methods requiring
that.


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


# 9fec50f9dbf8993e91e486f26ee3bcc70fe574a0 21-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added new Inode::Free() method which frees all space associated with an
inode.
Some style cleanups.


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


# 67fa10dcde17cc390a52337808ca8355959bf3a4 19-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added some more type identification methods and constants.
Renamed Inode::IsDirectory() to Inode::IsContainer() (since it is also true
for index/attribute directories).
Introduced a new Inode::IsDirectory() that only checks for real and standard
directories. Let's hope I've fixed more bugs with that than introduced new
ones...


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


# 8ea2f57ddd869f40433f3479c73ed9e1b6eed510 17-Nov-2002 Axel Dörfler <axeld@pinc-software.de>

Added some more type identifying methods and constants (i.e. Inode::IsAttribute()).


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


# 2b5451f1642e72a8bd34ccabac5c0b670f09f664 16-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Added private non-implemented copy constructor and assignment operators
for many classes for the sake of completeness.
Added a Transaction::IsStarted() method to not let it look like as if the
transaction is started more than once.
Changes made after suggestions from Mike Nordell, again :-)


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


# d801dfdd1c4390a342dc2900c19baee9e36f3283 16-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Added CachedBlock::BlockSize(), and CachedBlock::BlockShift() methods as
suggested by Mike Nordell.
Some code cleanups, added a comment in Inode::SetFileSize() to point out
that Stream<Cache>::WriteAt() denies growing the file size its own.


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


# b98d9a335ae4abd0200a4c03a5d07c8004ba07e7 06-Sep-2002 Axel Dörfler <axeld@pinc-software.de>

Fixed two bugs in the block allocator:
- the maximum number of blocks a block_run can cover is 65535 not 65536
- allocations over a block boundary in the block bitmap always failed due
to a incorrectly handled status

Both bugs could prevent BFS to create the VM swap file which led BeOS to
stop booting under certain circumstances.


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


# 2d38e3f603b1db6061c6adc67a0ebd57686b3bbf 21-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

The beginning of letting a stream grow into the double indirect range.
Not yet finished, nor tested, but almost complete :)


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


# ae38c6e93d625dc75f719411c39ab57557ce81b7 12-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug that could lead to the wrong last_modified time in an inode;
bfs_close() updated the last_modified time & index, but it didn't write
the inode back to disk.
Furthermore, bfs_write() should have already updated the last_modified
time, not bfs_close.


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


# c42ee13401be80c431846910959d587949a1ad10 07-Aug-2002 Axel Dörfler <axeld@pinc-software.de>

Initial revision


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