[sheepdog] [PATCH v2 7/9] object cache: reclaim cached objects when cache reaches the max size

Liu Yuan namei.unix at gmail.com
Thu Jul 26 05:37:48 CEST 2012


On 07/25/2012 08:15 PM, levin li wrote:
>  struct object_cache {
>  	uint32_t vid;
> +	int flushing;

Better named as in_flush;

>  	struct hlist_node hash;
>  
>  	struct list_head dirty_list;
> @@ -85,6 +100,39 @@ static pthread_mutex_t hashtable_lock[HASH_SIZE] = {
>  
>  static struct hlist_head cache_hashtable[HASH_SIZE];
>  
> +static int push_cache_object(uint32_t vid, uint32_t idx, uint64_t bmap,
> +			     int create);

We should try our best to reorder the code instead of forwarding
declaration.

Thanks,
Yuan



More information about the sheepdog mailing list