X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky-private.h;h=852b04e621bc7b9e126beeb3c95ea00991e0c111;hb=e560d8b120a5f2ed5057506f91bc8d9e818229a7;hp=b77f819a391c3dcbeebc1d8f0c470ce9cfd45680;hpb=ea04d8bdad2da0b59fed45d8ea0128bdba2eb792;p=bluesky.git diff --git a/bluesky/bluesky-private.h b/bluesky/bluesky-private.h index b77f819..852b04e 100644 --- a/bluesky/bluesky-private.h +++ b/bluesky/bluesky-private.h @@ -47,7 +47,8 @@ typedef enum { } BlueSkyAsyncStatus; struct BlueSkyNotifierList; -typedef struct { +typedef struct _BlueSkyStoreAsync BlueSkyStoreAsync; +struct _BlueSkyStoreAsync { BlueSkyStore *store; GMutex *lock; @@ -63,11 +64,17 @@ typedef struct { int result; /* Result code; 0 for success. */ struct BlueSkyNotifierList *notifiers; + gint notifier_count; + + /* The barrier waiting on this operation. Support for more than one + * barrier for a single async is not well-supported and should be avoided + * if possible. */ + BlueSkyStoreAsync *barrier; bluesky_time_hires start_time; /* Time operation was submitted. */ gpointer store_private; /* For use by the storage implementation */ -} BlueSkyStoreAsync; +}; /* Support for notification lists. These are lists of one-shot functions which * can be called when certain events--primarily, competed storage @@ -115,6 +122,9 @@ void bluesky_store_add_barrier(BlueSkyStoreAsync *barrier, void bluesky_inode_start_sync(BlueSkyInode *inode, BlueSkyStoreAsync *barrier); +void bluesky_block_touch(BlueSkyInode *inode, uint64_t i); +void bluesky_block_fetch(BlueSkyFS *fs, BlueSkyBlock *block, + BlueSkyStoreAsync *barrier); void bluesky_block_flush(BlueSkyFS *fs, BlueSkyBlock *block, BlueSkyStoreAsync *barrier); void bluesky_file_flush(BlueSkyInode *inode, BlueSkyStoreAsync *barrier);