Rounding up a value can be soooo hard...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-12-07 00:57:45 +00:00
parent 5bac5044b7
commit 069694a22a
@@ -1843,7 +1843,7 @@ Inode::NeedsTrimming()
if (IsIndex()) if (IsIndex())
return false; return false;
off_t roundedSize = (Size() + fVolume->BlockSize() - 1) >> fVolume->BlockShift(); off_t roundedSize = (Size() + fVolume->BlockSize() - 1) & ~(fVolume->BlockSize() - 1);
return Node().data.MaxDirectRange() > roundedSize return Node().data.MaxDirectRange() > roundedSize
|| Node().data.MaxIndirectRange() > roundedSize || Node().data.MaxIndirectRange() > roundedSize