Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changes done within pvfs_on_osd repository
  • Loading branch information
cengizk committed Jun 20, 2014
1 parent 749e802 commit 6235eac
Show file tree
Hide file tree
Showing 10 changed files with 1,777 additions and 76 deletions.
4 changes: 2 additions & 2 deletions Makedefs
Expand Up @@ -3,8 +3,8 @@
# debugging and optimization for everything.
#
# OPT := -g
OPT := -O3 -DNDEBUG
# OPT := -O3
# OPT := -O3 -DNDEBUG
OPT := -O3

# Backend configuration flags
# PANASAS_OSD=1
Expand Down
7 changes: 5 additions & 2 deletions osd-initiator/drivelist.c
Expand Up @@ -158,7 +158,11 @@ int osd_get_drive_list(struct osd_drive_description **drives, int *num_drives)
char *string[200];
char *line;
FILE *file;
file = fopen("/usr/src/fs.conf", "r");
char conf_path[200] = {'\0'};
char *home_path = getenv("HOME");
strcat(conf_path, home_path);
strcat(conf_path, "/pvfs_on_osd/fs.conf");
file = fopen(conf_path, "r");
line = (char *) malloc(120);

while(condition != EOF)
Expand All @@ -170,7 +174,6 @@ int osd_get_drive_list(struct osd_drive_description **drives, int *num_drives)
strcpy(string[i], line);
if(!strncmp(string[i], "osd://", 5))
{

for(j = 0; j < count; j++) {
if(!strcmp(&(line[6]), ret[j].targetname))
ret[j].hostname = strdup(string[i-1]);
Expand Down
11 changes: 5 additions & 6 deletions osd-initiator/python/pvfs-init.py
Expand Up @@ -135,19 +135,18 @@ run(OSDCommand().set_format_osd(1<<30))
# allocate and free so many that it would wrap.
run(OSDCommand().set_create_partition(PVFS_OSD_DATA_PID))
if osddirtype == "pvfs":
cid = COLLECTION_OID_LB
run(OSDCommand().set_create_collection(PVFS_OSD_DATA_PID, cid))
run(OSDCommand().set_create_collection(PVFS_OSD_DATA_PID, COLLECTION_OID_LB))
run(OSDCommand().set_create_partition(PVFS_OSD_META_PID))
if metalb != root_handle:
run(OSDCommand().set_create(PVFS_OSD_META_PID, metalb))

# create root handle, the top level directory
if root_handle:
if coll_object == "yes":
command = OSDCommand().set_create_collection(PVFS_OSD_META_PID, root_handle)
#if coll_object == "yes":
#command = OSDCommand().set_create_collection(PVFS_OSD_META_PID, root_handle)

else:
command = OSDCommand().set_create(PVFS_OSD_META_PID, root_handle)
#else:
command = OSDCommand().set_create(PVFS_OSD_META_PID, root_handle)
command.attr_build([ \
OSDAttr(ATTR_SET, ANY_PG + PVFS_USEROBJECT_ATTR_PG, 0, 0), \
OSDAttr(ATTR_SET, ANY_PG + PVFS_USEROBJECT_ATTR_PG, 1, 0), \
Expand Down
6 changes: 3 additions & 3 deletions osd-target/db.c
Expand Up @@ -218,9 +218,9 @@ int db_finalize(struct db_context *dbc)
return OSD_ERROR;
}

static const char db_delete_sql[] = "DELETE * FROM obj;\n"
"DELETE * FROM attr;\n"
"DELETE * FROM coll;\n";
static const char db_delete_sql[] = "DELETE FROM obj;\n"
"DELETE FROM attr;\n"
"DELETE FROM coll;\n";
int db_delete_data(struct db_context *dbc)
{
char *err = NULL;
Expand Down
1 change: 0 additions & 1 deletion osd-target/tests/command.c

This file was deleted.

0 comments on commit 6235eac

Please sign in to comment.