libjio.h   libjio.h 
skipping to change at line 33 skipping to change at line 33
int jfd; /* journal's lock file descriptor */ int jfd; /* journal's lock file descriptor */
int flags; /* journal mode options used in jopen() */ int flags; /* journal mode options used in jopen() */
pthread_mutex_t lock; /* a soft lock used in some operations */ pthread_mutex_t lock; /* a soft lock used in some operations */
}; };
struct jtrans { struct jtrans {
struct jfs *fs; /* journal file structure to operate on */ struct jfs *fs; /* journal file structure to operate on */
char *name; /* name of the transaction file */ char *name; /* name of the transaction file */
int id; /* transaction id */ int id; /* transaction id */
int flags; /* misc flags */ int flags; /* misc flags */
void *buf; /* buffer */ const void *buf; /* buffer */
size_t len; /* buffer lenght */ size_t len; /* buffer lenght */
off_t offset; /* file offset to operate on */ off_t offset; /* file offset to operate on */
void *udata; /* user-supplied data */ void *udata; /* user-supplied data */
size_t ulen; /* udata lenght */ size_t ulen; /* udata lenght */
void *pdata; /* previous data, for rollback */ void *pdata; /* previous data, for rollback */
size_t plen; /* pdata lenght */ size_t plen; /* pdata lenght */
}; };
struct jfsck_result { struct jfsck_result {
int total; /* total transactions files we looked at */ int total; /* total transactions files we looked at */
skipping to change at line 74 skipping to change at line 74
/* payload (variable lenght) */ /* payload (variable lenght) */
char *udata; /* user-supplied data */ char *udata; /* user-supplied data */
char *prevdata; /* previous data for rollback */ char *prevdata; /* previous data for rollback */
}; };
/* basic operations */ /* basic operations */
int jopen(struct jfs *fs, const char *name, int flags, int mode, int jflags ); int jopen(struct jfs *fs, const char *name, int flags, int mode, int jflags );
ssize_t jread(struct jfs *fs, void *buf, size_t count); ssize_t jread(struct jfs *fs, void *buf, size_t count);
ssize_t jpread(struct jfs *fs, void *buf, size_t count, off_t offset); ssize_t jpread(struct jfs *fs, void *buf, size_t count, off_t offset);
ssize_t jreadv(struct jfs *fs, struct iovec *vector, int count); ssize_t jreadv(struct jfs *fs, struct iovec *vector, int count);
ssize_t jwrite(struct jfs *fs, void *buf, size_t count); ssize_t jwrite(struct jfs *fs, const void *buf, size_t count);
ssize_t jpwrite(struct jfs *fs, void *buf, size_t count, off_t offset); ssize_t jpwrite(struct jfs *fs, const void *buf, size_t count, off_t offset
ssize_t jwritev(struct jfs *fs, struct iovec *vector, int count); );
ssize_t jwritev(struct jfs *fs, const struct iovec *vector, int count);
int jtruncate(struct jfs *fs, off_t lenght); int jtruncate(struct jfs *fs, off_t lenght);
int jclose(struct jfs *fs); int jclose(struct jfs *fs);
/* transaction operations */ /* transaction operations */
void jtrans_init(struct jfs *fs, struct jtrans *ts); void jtrans_init(struct jfs *fs, struct jtrans *ts);
int jtrans_commit(struct jtrans *ts); int jtrans_commit(struct jtrans *ts);
int jtrans_rollback(struct jtrans *ts); int jtrans_rollback(struct jtrans *ts);
void jtrans_free(struct jtrans *ts); void jtrans_free(struct jtrans *ts);
/* journal checker */ /* journal checker */
int jfsck(char *name, struct jfsck_result *res); int jfsck(const char *name, struct jfsck_result *res);
int jfsck_cleanup(const char *name);
/* jfs constants */ /* jfs constants */
#define J_NOLOCK 1 /* don't lock the file before operating on i t */ #define J_NOLOCK 1 /* don't lock the file before operating on i t */
/* jtrans constants */ /* jtrans constants */
#define J_COMMITED 1 /* mark a transaction as commited */ #define J_COMMITED 1 /* mark a transaction as commited */
#define J_ROLLBACKED 2 /* mark a transaction as rollbacked */ #define J_ROLLBACKED 2 /* mark a transaction as rollbacked */
/* disk_trans constants */ /* disk_trans constants */
#define J_DISKTFIXSIZE 28 /* lenght of disk_trans' header */ #define J_DISKTFIXSIZE 28 /* lenght of disk_trans' header */
 End of changes. 3 change blocks. 
5 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/