[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] Re: haiku: hrev53429 - in src/add-ons/kernel/file_systems: ext2 bfs
From:       waddlesplash <waddlesplash () gmail ! com>
Date:       2019-08-30 19:28:23
Message-ID: CAEesM75CZfh=dimnFB5HLTnY5c3xrZnk7hCDR=BD5dfxkerLYw () mail ! gmail ! com
[Download RAW message or body]

On Fri, Aug 30, 2019 at 3:26 PM Stephan Aßmus <superstippi@gmx.de> wrote:
> 
> Hi,
> 
> Am 30.08.2019 um 21:18 schrieb waddlesplash:
> > diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp \
> > b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index ca3241fd24..2b06068c3f \
> >                 100644
> > --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp
> > +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp
> > @@ -828,8 +828,12 @@ Volume::_EraseUnusedBootBlock()
> > {
> > const int32 blockSize = 512;
> > const char emptySector[blockSize] = { 0 };
> > +     // Erase boot block if any
> > if (write_pos(fDevice, 0, emptySector, blockSize) != blockSize)
> > return B_IO_ERROR;
> > +     // Erase ext2 superblock if any
> > +     if (write_pos(fDevice, 1024, emptySector, blockSize) != blockSize)
> > +             return B_IO_ERROR;
> 
> Is it OK to just write at an offset without checking the partition size?
> What if the partition is smaller than that? (I know it doesn't make much
> sense for it to be smaller, but still.)

I think BFS does not allow partitions smaller than a few KB? Which is
an erroneous limit anyway (if you try to make a partition that size it
KDLs because there isn't enough space for the journal.)

-waddlesplash


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic