From: Marko O. <d0...@us...> - 2010-03-17 17:52:45
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "kdfs". The branch, make_kdfs_compile has been updated via 1c0d160b9b5bb9590b972ad1e3677f5a0f9f198c (commit) from 58e1c712a0b4ba0ba4fde785cf79209fd7f40e09 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1c0d160b9b5bb9590b972ad1e3677f5a0f9f198c Author: Marko Obrovac <mar...@in...> Date: Wed Mar 17 19:48:40 2010 +0100 Start striping development diff --git a/fs/kdfs/address_space.c b/fs/kdfs/address_space.c index 56d14eb..1d6254e 100644 --- a/fs/kdfs/address_space.c +++ b/fs/kdfs/address_space.c @@ -841,13 +841,15 @@ int content_instantiate(kddm_set_t *kddm_set, void *private_data, int master) content_data = (struct content_iolinker_data *) kddm_set->private_data; DEBUG(DBG_INFO, "Instantiate kddm %ld with ino : %ld\n", kddm_set->id, content_data->ino); - if (kddm_set->def_owner == kerrighed_node_id) { + if (kddm_set->def_owner == kerrighed_node_id || kddm_set->def_owner == KDDM_CUSTOM_DEF_OWNER) { content_data->phys_dirname = kmalloc(PATH_MAX, GFP_KERNEL); ASSERT(content_data->phys_dirname != NULL); /* Retrieve local path corresponding to kfds inode number*/ kdfs_getphysicalpath(k_sb, content_data->ino, content_data->phys_dirname); - + if (check_create_phys_dir(content_data->phys_dirname, 0777, 0, 0) != 0) + BUG(); + /* Try to open the physical associated file */ phys_dirname = content_data->phys_dirname + strlen(content_data->phys_dirname); snprintf(content_data->phys_dirname, PATH_MAX, "%s/.meta.index", content_data->phys_dirname); @@ -881,6 +883,7 @@ int content_instantiate(kddm_set_t *kddm_set, void *private_data, int master) /* TODO PRIORITY 2, Adrien, we could have some issue if the kernel tries to remove the inode during this code */ /* Retrieve the local ref to the k_mapping object */ + inode = ilookup(k_sb->sb, content_data->ino); if (inode) { DEBUG(DBG_INFO, "K_mapping from the cache\n"); diff --git a/fs/kdfs/address_space.h b/fs/kdfs/address_space.h index 894a5fc..46f6679 100644 --- a/fs/kdfs/address_space.h +++ b/fs/kdfs/address_space.h @@ -29,7 +29,7 @@ #define K_PG_used 2 /* If defined, kDFS provides local striping policy */ -#define KDFS_FILE_STRIPING 0 +#define KDFS_FILE_STRIPING 1 /*--------------------------------------------------------------------------* * * @@ -86,7 +86,7 @@ struct kdfs_page { kddm_set_id_t set_id; /* kddm set id */ objid_t obj_id; /* obj_id within kddm set */ #if KDFS_FILE_STRIPING - kdfs_node_t linked_node; /* Node physically storing the object*/ + kerrighed_node_t linked_node; /* Node physically storing the object*/ #endif /* k_page flags*/ diff --git a/fs/kdfs/file.c b/fs/kdfs/file.c index a1707bc..048de65 100644 --- a/fs/kdfs/file.c +++ b/fs/kdfs/file.c @@ -218,7 +218,8 @@ kddm_set_t *create_file_kddm_set(struct kdfs_inode *k_inode) ASSERT(k_inode->inode != NULL); #if KDFS_FILE_STRIPING - kddm_set = __create_content_kddm_set(0, KDDM_SET_CUSTOM_LINKED, k_inode, FILE_LINKER); + //kddm_set = __create_content_kddm_set(0, inode_linked_node(k_inode->inode->i_ino), k_inode, FILE_LINKER); + kddm_set = __create_content_kddm_set(0, KDDM_CUSTOM_DEF_OWNER, k_inode, FILE_LINKER); #else kddm_set = __create_content_kddm_set(0, inode_linked_node(k_inode->inode->i_ino), k_inode, FILE_LINKER); #endif @@ -256,7 +257,18 @@ kerrighed_node_t kdfs_iol_file_default_owner (kddm_set_t *kddm_set, objid_t obji * TODO NOW, Adrien * Implement */ - return KERRIGHED_NODE_ID_NONE; + kerrighed_node_t ret_val; + struct content_iolinker_data *my_data = (struct content_iolinker_data *)kddm_set->private_data; + + struct kdfs_inode *k_inode = kdfs_ilocalfind(my_data->ino); + + // check who's the default owner of the object !!! + ret_val = inode_linked_node(k_inode->inode->i_ino); + kdfs_iput(k_inode->inode->i_ino); + + DEBUG(DBG_INFO, "inode_linked_node ::: %lu\n", ret_val); + return ret_val; + //return 2; } /* diff --git a/fs/kdfs/inode.h b/fs/kdfs/inode.h index 24e4bde..fdee579 100644 --- a/fs/kdfs/inode.h +++ b/fs/kdfs/inode.h @@ -31,7 +31,7 @@ /* cf <ctnr/object-server.h> */ #ifndef KDDM_CREATE_ON_FT #define KDDM_CREATE_ON_FT 0x00000100 -#endif +#YYendif /*--------------------------------------------------------------------------* * * ----------------------------------------------------------------------- Summary of changes: fs/kdfs/address_space.c | 7 +++++-- fs/kdfs/address_space.h | 4 ++-- fs/kdfs/file.c | 16 ++++++++++++++-- fs/kdfs/inode.h | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) hooks/post-receive -- kdfs |