X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky.h;h=e30f5b0c95329da1ff5ea6923a680ac23f2d91ee;hb=349ac2f2bcc67551a5bb946c73c650501228f056;hp=421d07df01830a688b158ea38237fe4fd150c836;hpb=8ff2f84811f4d4b7c684e04b4cc8d1aced2a1d4a;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index 421d07d..e30f5b0 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -29,6 +29,10 @@ typedef struct { * created in a pending state, and not unlocked until the data is actually * available.) */ int sync_inode_fetches; + + /* Should frontends handle requests serially or allow operations to proceed + * in parallel? */ + int sync_frontends; } BlueSkyOptions; extern BlueSkyOptions bluesky_options; @@ -134,6 +138,9 @@ bluesky_time_hires bluesky_now_hires(); * acquire locks on parents in the filesystem tree before children. * (TODO: What about rename when we acquire locks in unrelated parts of the * filesystem?) + * - An inode should not be locked while the filesystem lock is already held, + * since some code may do an inode lookup (which acquires the filesystem + * lock) while a different inode is locked. * */ typedef struct { GMutex *lock; @@ -162,6 +169,9 @@ typedef struct { * set to the current time. If the inode is clean, it is set to zero. */ int64_t change_time; + /* Last access time to this inode, for controlling cache evictions. */ + int64_t access_time; + /* Additional state for tracking cache writeback status. */ uint64_t change_pending; /* change_count version currently being committed to storage */ @@ -237,8 +247,6 @@ gboolean bluesky_directory_insert(BlueSkyInode *dir, const gchar *name, uint64_t inum); void bluesky_directory_dump(BlueSkyInode *dir); -void bluesky_block_touch(BlueSkyInode *inode, uint64_t i); -void bluesky_block_fetch(BlueSkyFS *fs, BlueSkyBlock *block); void bluesky_file_truncate(BlueSkyInode *inode, uint64_t size); void bluesky_file_write(BlueSkyInode *inode, uint64_t offset, const char *data, gint len);