From: NeilBrown Date: Mon, 28 Jun 2010 01:40:25 +0000 (+1000) Subject: New bugon for unlink loop. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=0001d74c985e3de71cc37e9b6b3b82480d58d7f5;p=LaFS.git New bugon for unlink loop. Signed-off-by: NeilBrown --- diff --git a/README b/README index 2a41a35..96bcf9d 100644 --- a/README +++ b/README @@ -4810,6 +4810,9 @@ DONE 5d/ At unmount, 16/1 is still pinned. [] dir_delete_commit+0xdb/0x187 [lafs] [] lafs_unlink+0x144/0x1f4 [lafs] [] vfs_unlink+0x4e/0x92 + + Don't know. Looks like cleanup up a chain in dir_delete_commit. + Added a BUG_ON. Would we be spinning on -EAGAIN ?? 4 empty segment are present. @@ -4924,6 +4927,8 @@ DONE 15d/ What does I_Dirty mean - and implement it. 15f/ include timestamp in cluster_head to set mtime/ctime properly on roll-forward? ## Items from 6 jul 2007. +15g/ test directories with non-random sequential hash. + 16/ Update locking.doc 17/ cluster_flush calls lafs_cluster_allocate calls lafs_add_block_address diff --git a/dir-avl.c b/dir-avl.c index 4495227..258f34b 100644 --- a/dir-avl.c +++ b/dir-avl.c @@ -409,7 +409,7 @@ replace_deleted: int lafs_dir_del_ent(char *block, int psz, u32 seed, u32 hash) { /* Delete this entry from the directory block. - * This involves either it from the avl tree. + * This involves removing it from the avl tree. * If it was the last entry, we reduce 'lastpiece' * so the space can be used immediately. */ diff --git a/dir.c b/dir.c index 1bb8576..da2b4f5 100644 --- a/dir.c +++ b/dir.c @@ -442,6 +442,7 @@ dir_delete_commit(struct dirop_handle *doh, if (piece == firstpiece) break; lafs_dir_del_ent(buf, bits, seed, hash); + BUG_ON(hash == 0 || doh->hash - hash > 256); hash--; } while (lafs_dir_find(buf, bits, seed, hash, &piece) && lafs_dir_extract(buf, bits, &de, piece,