Lines Matching defs:inode

21 	Create(Inode* inode, Inode* parent, const char* name, int32 mode,
24 fInode(inode),
25 fID(inode->ID()),
60 Remove(Inode* inode, const char* name)
62 fInode(inode),
63 fID(inode->ID())
82 Action(const char* action, Inode* inode)
84 fInode(inode),
85 fID(inode->ID())
104 Resize(Inode* inode, off_t oldSize, off_t newSize, bool trim)
106 fInode(inode),
107 fID(inode->ID()),
138 of an inode creation in progress.
270 FATAL(("writing new inode %" B_PRIdINO " failed!\n", fInode->ID()));
298 Inode* inode = (Inode*)_inode;
301 panic("transaction %d aborted, inode %p still around!\n", (int)id, inode);
314 // matches inode size?
352 rw_lock_init(&fLock, "bfs inode");
353 recursive_lock_init(&fSmallDataLock, "bfs inode small data");
386 rw_lock_init(&fLock, "bfs inode");
387 recursive_lock_init(&fSmallDataLock, "bfs inode small data");
392 FATAL(("Could not read inode block %" B_PRId64 ": %s!\n", BlockNumber(),
400 // here, because it will be done so already when the inode could be
435 // test inode magic and flags
442 FATAL(("inode at block %" B_PRIdOFF " corrupt!\n", BlockNumber()));
454 FATAL(("inode tree at block %" B_PRIdOFF " corrupt!\n",
467 /*! Adds this inode to the specified transaction. This means that the inode will
469 To ensure that the inode will stay valid until that point, an extra reference
480 // the inode from that list here (and add it back when we no longer need it)
707 Note that you need to write back the inode yourself after having called that
709 you to write back the inode all by yourself, but it's just more efficient
866 /*! Iterates through the small_data section of an inode.
870 while (inode->GetNextSmallData(&data) { ... }
963 /*! Changes or set the name of a file: in the inode small_data section only, it
965 Note that you need to write back the inode yourself after having called
1022 // update the inode, so that no one will ever doubt it's deleted :-)
1120 // No attribute inode exists yet
1261 /*! Removes the specified attribute from the inode.
1304 /*! Returns the attribute inode with the specified \a name, in case it exists.
1311 // does this inode even have attributes?
1333 Inode* inode;
1335 if (vnode.Get(&inode) != B_OK || !inode->IsAttribute())
1338 *_attribute = inode;
1373 // Inode::Create() locks the inode for us
1421 /*! Computes the number of bytes this inode occupies in the file system.
1426 could be cached in the inode structure or Inode object, though).
1457 // 2 blocks, one for the attributes inode, one for its B+tree
1465 the inode.
1588 // back to the inode, and the index when the file is closed
1633 // we need to write back the inode here because it has to
1768 // that big, and should stay close to the inode - preallocating could be
2311 /*! Checks whether or not this inode's data stream needs to be trimmed
2320 // Also, if an inode is already in deleted state, we don't bother trimming
2355 // just frees the data_stream, but doesn't change the inode (since it is
2366 // destructor is not called after the inode is deleted
2385 //! Synchronizes (writes back to disk) the file stream of the inode.
2538 Inode* inode;
2539 status_t status = vnode.Get(&inode);
2545 T(Remove(inode, name));
2546 inode->WriteLockInTransaction(transaction);
2552 if (!inode->IsIndex() && !force) {
2554 if (inode->IsContainer() != isDirectory)
2558 if (isDirectory && !inode->IsEmpty())
2562 // remove_vnode() allows the inode to be accessed until the last put_vnode()
2580 // update the inode, so that no one will ever doubt it's deleted :-)
2581 inode->Node().flags |= HOST_ENDIAN_TO_BFS_INT32(INODE_DELETED);
2582 inode->Node().flags &= ~HOST_ENDIAN_TO_BFS_INT32(INODE_IN_USE);
2588 if (inode->InNameIndex()) {
2589 index.RemoveName(transaction, name, inode);
2595 if (inode->InSizeIndex())
2596 index.RemoveSize(transaction, inode);
2597 if (inode->InLastModifiedIndex())
2598 index.RemoveLastModified(transaction, inode);
2600 return inode->WriteBack(transaction);
2604 /*! Creates the inode with the specified \a parent directory, and automatically
2605 adds the created inode to that parent directory. If an attribute directory
2606 is created, it will also automatically be added to the \a parent inode as
2609 It will also create the initial B+tree for the inode if it's a directory
2613 inode's ID, the inode stays locked - you have to call put_vnode() if you
2636 // the parent directory is locked during the whole inode creation
2659 Inode* inode;
2660 status_t status = vnode.Get(&inode);
2666 if (inode->IsDirectory() && (openMode & O_RWMASK) != O_RDONLY)
2668 if ((openMode & O_DIRECTORY) != 0 && !inode->IsDirectory())
2672 if (inode->CheckPermissions(open_mode_to_access(openMode)
2678 inode->WriteLockInTransaction(transaction);
2680 status_t status = inode->SetFileSize(transaction, 0);
2682 status = inode->WriteBack(transaction);
2691 *_id = inode->ID();
2693 *_inode = inode;
2715 // allocate space for the new inode
2718 Inode* inode;
2720 &inode);
2724 T(Create(inode, parent, name, mode, openMode, type));
2729 bfs_inode* node = &inode->Node();
2745 inode->WriteBack(transaction);
2750 if (tree && inode->IsRegularNode()
2751 && inode->SetName(transaction, name) != B_OK)
2756 if (inode->IsContainer()) {
2762 // Add a link to the inode from the parent, depending on its type
2763 // (the vnode is not published yet, so it is safe to make the inode
2766 status = tree->Insert(transaction, name, inode->ID());
2772 // Note, we only care if the inode could be made accessable for the
2783 if (inode->InNameIndex() && name != NULL) {
2786 status = index.InsertName(transaction, name, inode);
2792 tree->Remove(transaction, name, inode->ID());
2803 inode->UpdateOldLastModified();
2806 // If adding to these indices fails, the inode creation will not be
2808 if (inode->InSizeIndex())
2809 index.InsertSize(transaction, inode);
2810 if (inode->InLastModifiedIndex())
2811 index.InsertLastModified(transaction, inode);
2813 if (inode->NeedsFileCache()) {
2814 inode->SetFileCache(file_cache_create(volume->ID(), inode->ID(),
2815 inode->Size()));
2816 inode->SetMap(file_map_create(volume->ID(), inode->ID(),
2817 inode->Size()));
2819 if (inode->FileCache() == NULL || inode->Map() == NULL)
2824 // initialized inode, and we want to keep it
2830 *_id = inode->ID();
2832 *_inode = inode;
2834 // if either _id or _inode is passed, we will keep the inode locked
2836 put_vnode(volume->FSVolume(), inode->ID());
2845 AttributeIterator::AttributeIterator(Inode* inode)
2848 fInode(inode),
2853 inode->_AddIterator(this);