Lines Matching refs:pos

714 	const char* name, uint32 type, off_t pos, const uint8* data, size_t length,
724 uint32 spaceNeeded = sizeof(small_data) + nameLength + 3 + pos + length + 1;
751 if (item->data_size > pos + length
753 || ((uint8*)last + pos + length - item->DataSize())
757 if (force && ((uint8*)last + pos + length - item->DataSize())
761 uint32 needed = pos + length - item->DataSize() -
786 if (pos + length != item->DataSize()) {
803 item->data_size = HOST_ENDIAN_TO_BFS_INT16(pos + length);
808 if ((uint64)oldDataSize < (uint64)pos) {
810 memset(item->Data() + oldDataSize, 0, pos - oldDataSize);
812 if (user_memcpy(item->Data() + pos, data, length) < B_OK)
814 item->Data()[pos + length] = '\0';
847 if (user_memcpy(item->Data() + pos, data, length) < B_OK)
1044 Inode::ReadAttribute(const char* name, int32 type, off_t pos, uint8* buffer,
1047 if (pos < 0)
1048 pos = 0;
1062 if (pos >= smallData->data_size) {
1066 if (length + pos > smallData->DataSize())
1067 length = smallData->DataSize() - pos;
1069 status_t error = user_memcpy(buffer, smallData->Data() + pos,
1080 status = attribute->ReadAt(pos, (uint8*)buffer, _length);
1095 off_t pos, const uint8* buffer, size_t* _length, bool* _created)
1097 if (pos < 0)
1146 status = _AddSmallData(transaction, node, name, type, pos, buffer,
1201 status = _AddSmallData(transaction, node, name, type, pos, buffer,
1216 status = attribute->WriteAt(transaction, pos, buffer,
1233 // TODO: find a better way than this "pos" thing (the begin of the old key
1235 if (status == B_OK && pos == 0) {
1248 if (pos < length || (uint64)pos < (uint64)oldLength) {
1464 /*! Finds the block_run where "pos" is located in the data_stream of
1467 of the block_run returned; so "pos - offset" is for the block_run
1468 what "pos" is for the whole stream.
1469 The caller has to make sure that "pos" is inside the stream.
1472 Inode::FindBlockRun(off_t pos, block_run& run, off_t& offset)
1478 if (data->MaxIndirectRange() > 0 && pos >= data->MaxDirectRange()) {
1480 && pos >= data->MaxIndirectRange()) {
1493 off_t start = pos - data->MaxIndirectRange();
1538 if (runBlockEnd > pos) {
1560 if (runBlockEnd > pos) {
1575 Inode::ReadAt(off_t pos, uint8* buffer, size_t* _length)
1577 return file_cache_read(FileCache(), NULL, pos, buffer, _length);
1582 Inode::WriteAt(Transaction& transaction, off_t pos, const uint8* buffer,
1596 bool changeSize = (uint64)pos + (uint64)length > (uint64)Size();
1598 // set/check boundaries for pos/length
1599 if (pos < 0)
1613 && (uint64)pos + (uint64)length > (uint64)Size()) {
1621 if ((uint64)pos + (uint64)length > (uint64)oldSize) {
1623 status_t status = SetFileSize(transaction, pos + length);
1645 if (oldSize < pos)
1646 FillGapWithZeros(oldSize, pos);
1653 status_t status = file_cache_write(FileCache(), NULL, pos, buffer, _length);
1669 Inode::FillGapWithZeros(off_t pos, off_t newSize)
1671 while (pos < newSize) {
1673 if (newSize > pos + 1024 * 1024 * 1024)
1676 size = newSize - pos;
1678 status_t status = file_cache_write(FileCache(), NULL, pos, NULL, &size);
1682 pos += size;