Opened 15 years ago

Closed 15 years ago

#4045 closed bug (fixed)

mkfs ignores noindex option first time when no argument is supplied

Reported by: idefix Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When you don't supply an argument to the noindex option, mkfs will ignore it the first time. The second time however, it won't ignore it.

Steps to reproduce:

  • Initialise a volume with an index:
    ~> mkfs -t bfs -v /dev/disk/ata/1/master/0 test0mkfs
    Preparing for modifications...
    
    Parameters Validation...
    
    
    About to initialize /dev/disk/ata/1/master/0 with Be File System
    Are you sure you want to do this now?
    
    ALL YOUR DATA in /dev/disk/ata/1/master/0 will be lost forever.
    Continue (yes|[no])? yes
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate15UninitializeJob
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate13InitializeJob
    Volume "test0mkfs" has been initialized successfully!
    
    ~> lsindex /test0mkfs/
    BEOS:APP_SIG
    last_modified
    name
    size
    
  • Initialise the same volume again, but with the noindex option:
    ~> mkfs -t bfs -o noindex -v /dev/disk/ata/1/master/0 test0mkfs
    Preparing for modifications...
    
    Parameters Validation...
    
    
    About to initialize /dev/disk/ata/1/master/0 with Be File System
    Are you sure you want to do this now?
    
    ALL YOUR DATA in /dev/disk/ata/1/master/0 will be lost forever.
    Continue (yes|[no])? yes
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate15UninitializeJob
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate13InitializeJob
    Volume "test0mkfs" has been initialized successfully!
    
    ~> lsindex /test0mkfs/
    BEOS:APP_SIG
    last_modified
    name
    size
    
  • Initialise the same volume again, using the previous command:
    ~> mkfs -t bfs -o noindex -v /dev/disk/ata/1/master/0 test0mkfs
    Preparing for modifications...
    
    Parameters Validation...
    
    
    About to initialize /dev/disk/ata/1/master/0 with Be File System
    Are you sure you want to do this now?
    
    ALL YOUR DATA in /dev/disk/ata/1/master/0 will be lost forever.
    Continue (yes|[no])?yes
    Continue (yes|[no])? yes
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate15UninitializeJob
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate13InitializeJob
    Volume "test0mkfs" has been initialized successfully!
    
    ~> lsindex /test0mkfs/
    lsindex: can't open index dir of device 25
    

When you do however supply an argument to the noindex option, mkfs won't ignore it the first time:

  • Initialise a volume with an index:
    ~> mkfs -t bfs -v /dev/disk/ata/1/master/0 test0mkfs
    Preparing for modifications...
    
    Parameters Validation...
    
    
    About to initialize /dev/disk/ata/1/master/0 with Be File System
    Are you sure you want to do this now?
    
    ALL YOUR DATA in /dev/disk/ata/1/master/0 will be lost forever.
    Continue (yes|[no])? yes
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate15UninitializeJob
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate13InitializeJob
    Volume "test0mkfs" has been initialized successfully!
    
    ~> lsindex /test0mkfs/
    BEOS:APP_SIG
    last_modified
    name
    size
    
  • Initialise the same volume again, but with argument '1' supplied to the noindex option:
    ~> mkfs -t bfs -o noindex=1 -v /dev/disk/ata/1/master/0 test0mkfs
    Preparing for modifications...
    
    Parameters Validation...
    
    
    About to initialize /dev/disk/ata/1/master/0 with Be File System
    Are you sure you want to do this now?
    
    ALL YOUR DATA in /dev/disk/ata/1/master/0 will be lost forever.
    Continue (yes|[no])? yes
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate15UninitializeJob
    DiskDeviceJobQueue::Execute(): executing job: Q28BPrivate13InitializeJob
    Volume "test0mkfs" has been initialized successfully!
    
    ~> lsindex /test0mkfs/
    lsindex: can't open index dir of device 27
    

Change History (2)

comment:1 by axeld, 15 years ago

Component: Applications/Command Line ToolsFile Systems/BFS

This should be a parameter parsing problem (or uninitialized value) in BFS. Since "noindex" is a boolean setting, I would think it should always get a value.

comment:2 by axeld, 15 years ago

Component: File Systems/BFSSystem/Kernel
Resolution: fixed
Status: newclosed

Fixed in hrev31779.

Note: See TracTickets for help on using tickets.