Lines Matching defs:attribute

590 		// Move the attribute to a real attribute file
593 Inode* attribute;
595 item->Type(), &attribute);
600 status = attribute->WriteAt(transaction, 0, item->Data(), &length);
602 ReleaseAttribute(attribute);
609 FATAL(("Could not remove newly created attribute!\n"));
621 /*! Private function which removes the given attribute from the small_data
632 // find the last attribute
662 //! Removes the given attribute from the small_data section.
701 /*! Try to place the given attribute in the small_data section - if the
702 new attribute is too big to fit in that section, it returns B_DEVICE_FULL.
703 In that case, the attribute should be written to a real attribute file;
742 // is the attribute already in the small_data section?
745 // find last attribute
755 // Make room for the new attribute if needed (and we are forced
784 // Normally, we can just overwrite the attribute data as the size
822 // try to add the new attribute!
829 // make room for the new attribute
903 /*! Finds the attribute "name" in the small data section, and
991 // remove the attribute file if it exists
1000 Inode* attribute;
1002 && GetAttribute(name, &attribute) == B_OK) {
1005 if (attribute->ReadAt(0, data, &length) == B_OK) {
1006 index->Update(transaction, name, attribute->Type(), data,
1010 ReleaseAttribute(attribute);
1020 // remove attribute directory (don't fail if that can't be done)
1039 /*! Reads data from the specified attribute.
1040 This is a high-level attribute function that understands attributes
1041 in the small_data section as well as real attribute files.
1076 // search in the attribute directory
1077 Inode* attribute;
1078 status_t status = GetAttribute(name, &attribute);
1080 status = attribute->ReadAt(pos, (uint8*)buffer, _length);
1082 ReleaseAttribute(attribute);
1089 /*! Writes data to the specified attribute.
1090 This is a high-level attribute function that understands attributes
1091 in the small_data section as well as real attribute files.
1109 // TODO: for attribute files, we need to log the first
1116 Inode* attribute = NULL;
1119 if (GetAttribute(name, &attribute) != B_OK) {
1120 // No attribute inode exists yet
1122 // save the old attribute data
1143 // if the attribute doesn't exist yet (as a file), try to put it in the
1145 // create a real attribute file
1150 // remove the old attribute from the small data section - there
1157 status = CreateAttribute(transaction, name, type, &attribute);
1163 // Update status time on attribute write
1171 if (attribute != NULL) {
1172 WriteLocker writeLocker(attribute->fLock);
1175 // Save the old attribute data (if this fails, oldLength will
1177 while (attribute->Size() > 0) {
1178 bigtime_t oldModified = attribute->LastModified();
1182 if (attribute->ReadAt(0, oldBuffer, &oldLength) == B_OK)
1188 if (oldModified == attribute->LastModified())
1209 // The attribute type might have been changed - we need to
1211 attribute->Node().type = HOST_ENDIAN_TO_BFS_INT32(type);
1212 status = attribute->WriteBack(transaction);
1216 status = attribute->WriteAt(transaction, pos, buffer,
1222 // Update status time on attribute write
1229 attribute->WriteLockInTransaction(transaction);
1230 ReleaseAttribute(attribute);
1261 /*! Removes the specified attribute from the inode.
1262 This is a high-level attribute function that understands attributes
1263 in the small_data section as well as real attribute files.
1291 // remove the attribute file if it exists
1304 /*! Returns the attribute inode with the specified \a name, in case it exists.
1305 This method can only return real attribute files; the attributes in the
1334 // Check if the attribute is really an attribute
1348 Inode::ReleaseAttribute(Inode* attribute)
1350 if (attribute == NULL)
1353 put_vnode(fVolume->FSVolume(), attribute->ID());
1359 Inode** attribute)
1361 // do we need to create the attribute directory first?
1375 S_ATTR | S_FILE | 0666, 0, type, NULL, NULL, attribute);
1396 // Unlike index and attribute directories, directories
1767 // Attributes, attribute directories, and long symlinks usually won't get
2392 // We may also want to flush the attribute's data stream to
2549 // bit is set for indices in BFS, not for attribute directories) - but you
2605 adds the created inode to that parent directory. If an attribute directory
2920 // read attributes out of the attribute directory
2953 Inode* attribute;
2954 if ((status = vnode.Get(&attribute)) == B_OK) {
2955 *_type = attribute->Type();