From: NeilBrown Date: Sat, 2 Oct 2010 01:52:16 +0000 (+1000) Subject: README update and comment fix. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=012c928a2e86eb56392388ebda7824ad474fc69e;p=LaFS.git README update and comment fix. Indeed, there is nothing we can do about errors during truncate, except ignore them. Signed-off-by: NeilBrown --- diff --git a/README b/README index 95ac591..89bc8a8 100644 --- a/README +++ b/README @@ -5076,24 +5076,24 @@ DONE 15ai/ When allocating a new segment during checkpoint, delay the DONE 15aj/ When roll-forward finds a new segment, make sure youth number is updated. -15ak/ Load orphan file during roll-forward and make every block an +DONE 15ak/ Load orphan file during roll-forward and make every block an orphan. -15al/ set filesystem update_time somewhere. +DONE 15al/ set filesystem update_time somewhere. -15am/ filesystem 'name' needs to be handled uniformly. +DONE 15am/ filesystem 'name' needs to be handled uniformly. DONE 15an/ can we be sure 'b' will be non-null in delete_inode? -15ao/ determine what locking is needed to walk the children list - in lafs_inode_handle_orphans. Probably the address_space private lock. +DONE 15ao/ determine what locking is needed to walk the children list + in lafs_inode_handle_orphan. Probably the address_space private lock. 15ap/ Make sure write_inode has been cleaned up. See if this applies to rollforward of a symlink (see FIXME) -15aq/ change inode map to be little-endian, not host-endian +DONE 15aq/ change inode map to be little-endian, not host-endian -15ar/ understand what to do about errors in lafs_truncate +DONE 15ar/ understand what to do about errors in lafs_truncate 15as/ handle errors from lafs_write_super ??? @@ -5211,6 +5211,13 @@ DONE 15bi/ Set EmergencyClean a bit later - need at least one checkpoint first. 15ch/ Review values of youth and checkpoint_youth and think about off-by-one issues. +15da/ Replace directory updates!!!!! + +15db/ Decide how version string will be used. + +15dc/ resolve table_size - it should be stored in the segusage file and validated + based on device geometry. + 16/ Update locking.doc 17/ cluster_flush calls lafs_cluster_allocate calls lafs_add_block_address @@ -5294,7 +5301,7 @@ DONE 15bi/ Set EmergencyClean a bit later - need at least one checkpoint first. 44/ Examine created filesystem and make sure everything looks good. -45/ mkfs.lafs +DONE 45/ mkfs.lafs 46/ fsck.lafs @@ -6794,3 +6801,32 @@ WritePhase - what is that all about? So as we find a new segment we want to do much like was lafs_free_get does youth_update. But the data block - isn't that youthblk? When it that set? segsum_find sets if it ssnum == 0 + +19sep2010 + 15ak - run the orphan file at mount time. + After roll-forward when we have a working filesystem, we need to read the orphan file, load each block + mentioned, and register each as an orphan. + This involves: + - setting the orphan_slot + - setting B_Orphan + - lafs_add_orphan + Just like at the start of orphan_commit + We also need to initialise nextfree and possibly 'reserved'. + But: can orphans be created during roll-forward? They certainly can. We currently hide that in a re-use of + the orphan list.. But directory updates are possible too, and not handled. + + I guess we should examine the file as soon as root is loaded as before roll-forward as roll-forward cannot + change the orphan file. Then after roll-forward, we read the original part of the file and set up + any orphans that aren't yet. + So we want to read once to get the size. Then read again to process content up to that size. + + 15am - filesystem name. + This is only used for identifying snapshots + +01oct2010 + - mkfs is done to an initial version of lafs-utils. !!! + + So: 15am - filesystem name - used to identify snapshots + So the name is pointless in subordinate filesets. So I could just shrink + the metadata. The primary metadata needs to be big enough to get a name + easily though. diff --git a/inode.c b/inode.c index 1a11743..e2fcac2 100644 --- a/inode.c +++ b/inode.c @@ -1735,7 +1735,11 @@ void lafs_truncate(struct inode *ino) } finish_wait(&fs->async_complete, &wq); - /* FIXME there is nothing I can do with an error here */ + /* There is nothing we can do about errors here. The + * most likely are ENOMEM which itself is very unlikely. + * If this doesn't get registered as an orphan .... maybe + * it will have to wait until something else truncates it. + */ lafs_make_orphan(fs, db, NULL); if (!test_and_set_bit(I_Trunc, &LAFSI(ino)->iflags))