cmatthew / Lind-misc

Misc files for the Lind project
3 stars 3 forks source link

_blank_fs_init() should persist... #64

Closed JustinCappos closed 11 years ago

JustinCappos commented 11 years ago

It should persist metadata. It's confusing if you call this, have the FS data wiped out, but the old metadata is still there...

JustinCappos commented 11 years ago

Fixed in Seattle commit r6246. (let's sync these.)

cmatthew commented 11 years ago

This function is not called in that case. The file subsystem starts with:

if metadata exists: load metadata else: blank_fs

It just introduces and extra unneeded metadata flush to add the persistence there.

JustinCappos commented 11 years ago

This isn't the only code that uses this as module. It's more general.

On Wed, Mar 13, 2013 at 4:54 PM, Chris Matthews notifications@github.comwrote:

This function is not called in that case. The file subsystem starts with:

if metadata exists: load metadata else: blank_fs

It just introduces and extra unneeded metadata flush to add the persistence there.

— Reply to this email directly or view it on GitHubhttps://github.com/cmatthew/Lind-misc/issues/64#issuecomment-14867820 .

cmatthew commented 11 years ago

I tried to make _blank_fs_init() module private. The problem I encountered was that many developers were writing their own fs loading code in the unit tests or in the FS access apps. This did not work well, each had a different idea of how to do it. So I intended load_fs to be the only external function for starting the FS, then it can correctly deal with starting things up.

Hopefully _blank_fs_init is only every called in that one place.

JustinCappos commented 11 years ago

It doesn't need to call it. What is the right way to wipe out an existing file system and start a new one? I don't see a public function for this.

Also, if you don't want it called, it's worth adding a comment. Without an obvious reason not to call it and a lack of other public functions, it's not clear what to do.

On Wed, Mar 13, 2013 at 5:47 PM, Chris Matthews notifications@github.comwrote:

I tried to make _blank_fs_init() module private. The problem I encountered was that many developers were writing their own fs loading code in the unit tests or in the FS access apps. This did not work well, each had a different idea of how to do it. So I intended load_fs to be the only external function for starting the FS, then it can correctly deal with starting things up.

Hopefully _blank_fs_init is only every called in that one place.

— Reply to this email directly or view it on GitHubhttps://github.com/cmatthew/Lind-misc/issues/64#issuecomment-14870702 .