xfs: coding style fixed, no functional changes

Change-Id: I56a1220abc330ef853cee4bdb9fa9c1b712784a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3143
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Rene Gollent <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
CruxBox
2021-06-15 16:52:35 +00:00
committed by Jérôme Duval
parent 3f816b034d
commit a2603a88fd
2 changed files with 19 additions and 15 deletions
@@ -98,8 +98,8 @@ size_t
TreeDirectory::GetPtrOffsetIntoRoot(int pos)
{
size_t maxRecords = MaxRecordsPossibleRoot();
return (sizeof(BlockInDataFork)
+ maxRecords * KeySize() + (pos - 1) * PtrSize());
return sizeof(BlockInDataFork) + maxRecords * KeySize()
+ (pos - 1) * PtrSize();
}
@@ -814,8 +814,8 @@ TreeDirectory::Lookup(const char* name, size_t length, xfs_ino_t* ino)
FillBuffer(fSingleDirBlock,
nextLeaf - targetMap->br_startoff, targetMap);
fOffsetOfSingleDirBlock = nextLeaf;
continue;
} else {
break;
+11 -7
View File
@@ -54,7 +54,8 @@ NodeDirectory::IsNodeType()
FillMapEntry(fInode->DataExtentsCount() - 3, fLeafMap);
fCurLeafMapNumber = 1;
}
return fLeafMap->br_startoff == LEAF_STARTOFFSET(fInode->GetVolume()->BlockLog());
return fLeafMap->br_startoff
== LEAF_STARTOFFSET(fInode->GetVolume()->BlockLog());
}
@@ -101,8 +102,8 @@ NodeDirectory::FillBuffer(int type, char* blockBuffer, int howManyBlocksFurthur)
return B_NO_MEMORY;
}
xfs_daddr_t readPos =
fInode->FileSystemBlockToAddr(map->br_startblock + howManyBlocksFurthur);
xfs_daddr_t readPos = fInode->FileSystemBlockToAddr(map->br_startblock
+ howManyBlocksFurthur);
if (read_pos(fInode->GetVolume()->Device(), readPos, blockBuffer, len)
!= len) {
@@ -165,7 +166,7 @@ NodeDirectory::EntrySize(int len) const
if (fInode->HasFileTypeField())
entrySize += sizeof(uint8);
return (entrySize + 7) & -8;
return ROUNDUP(entrySize, 8);
// rounding off to closest multiple of 8
}
@@ -202,9 +203,11 @@ NodeDirectory::GetNext(char* name, size_t* length, xfs_ino_t* ino)
// This could be an unused entry so we should check
uint32 blockNoFromAddress = BLOCKNO_FROM_ADDRESS(fOffset, volume);
if (fOffset != 0 && blockNoFromAddress == fCurBlockNumber)
entry = (void*)(fDataBuffer + BLOCKOFFSET_FROM_ADDRESS(fOffset, fInode));
if (fOffset != 0 && blockNoFromAddress == fCurBlockNumber) {
entry = (void*)(fDataBuffer
+ BLOCKOFFSET_FROM_ADDRESS(fOffset, fInode));
// This gets us a little faster to the next entry
}
uint32 curDirectorySize = fInode->Size();
@@ -306,7 +309,8 @@ NodeDirectory::Lookup(const char* name, size_t length, xfs_ino_t* ino)
FillMapEntry(fInode->DataExtentsCount() - 2, fLeafMap);
fCurLeafMapNumber = 2;
status = FillBuffer(LEAF, fLeafBuffer, rightMapOffset - fLeafMap->br_startoff);
status = FillBuffer(LEAF, fLeafBuffer,
rightMapOffset - fLeafMap->br_startoff);
if (status != B_OK)
return status;
fCurLeafBufferNumber = 2;