extent max length is 0x8000, not 0xffff (we only support initialized extents).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40146 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -187,7 +187,7 @@ ExtentStream::Enlarge(Transaction& transaction, off_t& numBlocks)
|
|||||||
TRACE("Enlarge() last %lld allocatedPos %lld\n",
|
TRACE("Enlarge() last %lld allocatedPos %lld\n",
|
||||||
last.PhysicalBlock() + last.Length(), fAllocatedPos);
|
last.PhysicalBlock() + last.Length(), fAllocatedPos);
|
||||||
if (last.PhysicalBlock() + last.Length() == fAllocatedPos
|
if (last.PhysicalBlock() + last.Length() == fAllocatedPos
|
||||||
&& (last.Length() + allocated) <= 0xffff) {
|
&& (last.Length() + allocated) <= EXT2_EXTENT_MAX_LENGTH) {
|
||||||
if (stream != fStream) {
|
if (stream != fStream) {
|
||||||
stream = (ext2_extent_stream *)cached.SetToWritable(
|
stream = (ext2_extent_stream *)cached.SetToWritable(
|
||||||
transaction, cached.BlockNumber());
|
transaction, cached.BlockNumber());
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ struct ext2_data_stream {
|
|||||||
} _PACKED;
|
} _PACKED;
|
||||||
|
|
||||||
#define EXT2_EXTENT_MAGIC 0xf30a
|
#define EXT2_EXTENT_MAGIC 0xf30a
|
||||||
|
#define EXT2_EXTENT_MAX_LENGTH 0x8000
|
||||||
|
|
||||||
struct ext2_extent_header {
|
struct ext2_extent_header {
|
||||||
uint16 magic;
|
uint16 magic;
|
||||||
|
|||||||
Reference in New Issue
Block a user