Skip to content

Commit

Permalink
osd-target: added placeholders in cdb.c for new osd2r04 commands
Browse files Browse the repository at this point in the history
- Unimplemented for now
- Also fixed some #defines in osd-defs.h

Signed-off-by: John A. Chandy <john.chandy@uconn.edu>
  • Loading branch information
joc02012 authored and Boaz Harrosh committed Mar 15, 2010
1 parent f3f10f6 commit 2479f67
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
35 changes: 35 additions & 0 deletions osd-target/cdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,11 @@ static int parse_cdb_continuation_segment(struct command *cmd,
break;
}

case USER_OBJECT: {
/* not supported yet */
goto out_cdb_err;
}

case COPY_USER_OBJECT_SOURCE: {
desc->desc_specific_hdr = (const uint8_t *)(desc_hdr+1);
goto out_cdb_err;
Expand Down Expand Up @@ -1592,6 +1597,11 @@ static void exec_service_action(struct command *cmd)
sense, ddt);
break;
}
case OSD_CREATE_CLONE: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}
case OSD_CREATE_COLLECTION: {
ret = cdb_create_collection(cmd, cdb_cont_len);
break;
Expand All @@ -1600,6 +1610,11 @@ static void exec_service_action(struct command *cmd)
ret = cdb_create_partition(cmd, cdb_cont_len);
break;
}
case OSD_CREATE_SNAPSHOT: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}
case OSD_CREATE_USER_TRACKING_COLLECTION: {
uint64_t pid = get_ntohll(&cdb[16]);
uint64_t requested_cid = get_ntohll(&cdb[24]);
Expand All @@ -1609,6 +1624,11 @@ static void exec_service_action(struct command *cmd)
cdb_cont_len, source_cid, sense);
break;
}
case OSD_DETACH_CLONE: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}
case OSD_FLUSH: {
uint64_t pid = get_ntohll(&cdb[16]);
uint64_t oid = get_ntohll(&cdb[24]);
Expand Down Expand Up @@ -1726,11 +1746,21 @@ static void exec_service_action(struct command *cmd)
ret = cdb_read_map(cmd, cdb_cont_len);
break;
}
case OSD_READ_MAPS_AND_COMPARE: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}

case OSD_READ: {
ret = cdb_read(cmd, cdb_cont_len);
break;
}
case OSD_REFRESH_SNAPSHOT_OR_CLONE: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}
case OSD_REMOVE: {
ret = cdb_remove(cmd, cdb_cont_len);
break;
Expand All @@ -1752,6 +1782,11 @@ static void exec_service_action(struct command *cmd)
ret = cdb_remove_partition(cmd, cdb_cont_len);
break;
}
case OSD_RESTORE_PARTITION_FROM_SNAPSHOT: {
/* new command added in osd2r04 */
ret = osd_error_unimplemented(cmd->action, sense);
break;
}
case OSD_SET_ATTRIBUTES: {
uint64_t pid = get_ntohll(&cdb[16]);
uint64_t oid = get_ntohll(&cdb[24]);
Expand Down
6 changes: 3 additions & 3 deletions osd-util/osd-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
#define OSD_REMOVE_COLLECTION 0x8896
#define OSD_REMOVE_MEMBER_OBJECTS 0x88a1
#define OSD_REMOVE_PARTITION 0x888c
#define OSD_RESTORE_PARTITION_FROM_SNAPSHOT ox88ac
#define OSD_RESTORE_PARTITION_FROM_SNAPSHOT 0x88ac
#define OSD_SET_ATTRIBUTES 0x888f
#define OSD_SET_KEY 0x8898
#define OSD_SET_MASTER_KEY 0x8899
#define OSD_SET_MEMBER_ATTRIBUTES 0x88a3
#define OSD_WRITE 0x8886

/* custom definitions */
#define OSD_CAS 0x8880
#define OSD_CAS 0x888d
#define OSD_FA 0x8890
#define OSD_COND_SETATTR 0x8891
#define OSD_GEN_CAS 0x88a5
Expand Down Expand Up @@ -119,7 +119,7 @@
#define NO_MORE_DESCRIPTORS 0x0000
#define SCATTER_GATHER_LIST 0x0001
#define QUERY_LIST 0x0002
#define USER_OBJECT 0x0001
#define USER_OBJECT 0x0100
#define COPY_USER_OBJECT_SOURCE 0x0101
#define EXTENSION_CAPABILITIES 0xFFEE

Expand Down

0 comments on commit 2479f67

Please sign in to comment.