#include "lafs.h"
-static inline void *dmap_dblock(struct datablock *b)
-{
- void *a = kmap_atomic(b->page, KM_USER0);
- a += dblock_offset(b);
- //BUG_ON(((unsigned char *)a)[16] == 0xff);
- return a;
-}
-
-static inline void dunmap_dblock(struct datablock *b, void *buf)
-{
- //BUG_ON(((unsigned char *)buf)[16] == 0xff);
- kunmap_atomic(buf - dblock_offset(b), KM_USER0);
-}
-
-#define map_dblock dmap_dblock
-#define unmap_dblock dunmap_dblock
-/* Every block in a directory gets an extra structure
- * to help track the tree structure of the directory
- * It particularly hold a pointer to the parent,
- * but also tracks orphans and btree nodes that
- * have been split but not incorporated.
- */
-
#define S_SHIFT 12
static unsigned char file_type[1 + (S_IFMT >> S_SHIFT)] = {
/*****************************************************************************
* Directory lookup
* Most of the work is done in dir_lookup_blk which returns the block
- * that should hold the entry, and optionally the parent index block.
+ * that should hold the entry.
* dir_lookup takes that result and finds an inode number if possible.
*/
static struct datablock *
/*---------------------------------------------------------------
* Delete directory entry.
- * deleting is *so* much easier than insert. This is because
- * we never need to allocate new block, and so can be completely
- * lazy about updating the tree structure.
* Deleting involves invalidating the entry in the dirent block,
* and then removing entry deleted entries that are not in a chain.
* If we cannot be sure, we schedule orphan processing to do
* - to schedule next block for orphan handling if that might be appropriate.
*
*
- * All pending merges need to be linked to the inode.
- *
* Specifically:
* Lock the directory.
* If last possible entry (addr-1) is deleted,