This is an atemp to abstract store IO interface to adopt sheepdog to more kv-stores. changes v3: - use io control structure to pass internal information between interfaces. This aims to make interface more generic and flexible. - move fallocate() and ftruncate() into default store's open. This aims to remove higher level code's awareness of store's internal iocb. - rename store_write_obj_fd into do_write_obj. - split simple store out of store.c changes v2: - use void pointer for private data transfer. - open: return the return value, and the private data in the argument. - open: use create flag for creating new file instead of posix flags. As is sugguested by Christoph Hellwig. Thanks! - read/write: use xpread/xpwrite for short rw and other conditions, but not return SD_RES_EIO, just retrn -1 in error case as system call read/write. Thanks, Yuan |