1 #ifndef _OFD_ACCESS_BATCH_H_
2 #define _OFD_ACCESS_BATCH_H_
5 #include <linux/types.h>
6 #include <libcfs/util/list.h>
11 struct alr_batch *alr_batch_create(unsigned int shift);
12 void alr_batch_destroy(struct alr_batch *alrb);
13 int alr_batch_add(struct alr_batch *alrb, const char *obd_name,
14 const struct lu_fid *pfid, time_t time, __u64 begin, __u64 end,
15 __u32 size, __u32 segment_count, __u32 flags);
16 int alr_batch_print(struct alr_batch *alrb, FILE *file,
17 pthread_mutex_t *file_mutex, int fraction);
20 * The code is inspired by the kernel list implementation. Hence, this has
21 * a weird param order to be consistent with the kernel list_replace_init().
23 static inline void list_replace_init(struct list_head *old_node,
24 struct list_head *new_node)
26 list_add(new_node, old_node);
27 list_del_init(old_node);
30 #endif /* _OFD_ACCESS_BATCH_H_ */