Shuffle fields of storage nodes
PATCH 1/8 Shuffle fields of storage nodes
This helps copy-paste safer later, mostly.
Signed-off-by Pete Zaitcev <[email protected]>
--- server/object.c | 2 - server/storage.c | 79 ++++++++++++++++++++++++++------------------- server/tabled.h | 12 +++--- 3 files changed, 53 insertions(+), 40 deletions(-)
commit 2d0645834468ea056223bee52d679c983945ce65
Author: Pete Zaitcev <[email protected]> Date: Thu Nov 11 11:24:00 2010 -0700
Field rearrangements. Layering violation improvement.
server/object.c +1 -1
@@ -1008,7 +1008,7 @@ static bool object_get_poke(struct client *cli)ssize_t bytes;/* The checks for in_len in caller should protect us, but let's see. */ -if (!cli->in_ce.stc) { +if (!cli->in_ce.key) {applog (LOG_ERR ,"read on closed chunk, in_len %ld" , (long ) cli->in_len);return false;
server/storage.c +46 -33
180 lines not on this page · raw message
server/tabled.h +6 -6
@@ -114,18 +114,18 @@ struct open_chunk {void *cli;/* usually struct client * */ struct event_base *evbase; -uint64_t wtogo; -uint64_t wkey; -void (*wcb)(struct open_chunk *); +uint64_t key; +void (*ocb)(struct open_chunk *); +uint64_t size; +uint64_t done; + +/* chunk */ int wfd;bool w_armed;struct event wevt;void *wbuf;size_t wcnt;/* in current buffer */ -uint64_t roff; -uint64_t rsize; -void (*rcb)(struct open_chunk *);int rfd;bool r_armed;struct event revt;
Quoted 9 lines · Pete Zaitcev
This helps copy-paste safer later, mostly.
Signed-off-by Pete Zaitcev<[email protected]>--- server/object.c | 2 - server/storage.c | 79 ++++++++++++++++++++++++++------------------- server/tabled.h | 12 +++--- 3 files changed, 53 insertions(+), 40 deletions(-)
applied 1-5
Gonna give the file backend a cursory test, and swift backend a slightly-more-than-cursory test, then merge those.
Well done! Pluggable storage backends make tabled more interesting.