23 #include <linux/version.h> 36 #include <linux/version.h> 70 #define NUM_STRECORDS 10 90 static struct m0t1fs_sb
csb;
99 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 128 struct m0_fop *request_fop;
197 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) 207 ispti_tlist_init(&
m0inode.ci_pending_tx);
317 struct m0t1fs_inode *input_m0inode,
320 int expect_ut_wait_for_reply_count,
321 int expect_ut_fop_fini_count,
322 uint64_t expect_txid,
323 size_t expect_locality)
502 int input_flag,
int expect_return,
503 int expect_ut_post_rpc_count,
504 int expect_ut_wait_for_reply_count,
505 int expect_ut_fop_fini_count)
560 stx[
i].stx_tri.tri_txid = 3;
574 stx[
i].stx_tri.tri_txid = 3;
603 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 605 int input_datamode,
int expect_return,
606 int expect_ut_kernel_fsync_count,
607 int expect_ut_post_rpc_count,
608 int expect_ut_fop_fini_count)
611 int input_datamode,
int expect_return,
612 int expect_ut_kernel_fsync_count,
613 int expect_ut_post_rpc_count,
614 int expect_ut_fop_fini_count)
619 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 622 rv =
m0t1fs_fsync(input_file, input_dentry, input_datamode);
632 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 665 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 676 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
static struct m0_reqh_service_txid stx[NUM_STRECORDS]
struct m0t1fs_fsync_interactions fi
void(* fop_put)(struct m0_fop *fop)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static int ut_post_rpc(struct m0_rpc_item *item)
struct m0_mutex sc_max_pending_tx_lock
M0_INTERNAL void m0_fop_init(struct m0_fop *fop, struct m0_fop_type *fopt, void *data, void(*fop_release)(struct m0_ref *))
int(* post_rpc)(struct m0_rpc_item *item)
static int ut_fop_fini_count
static struct m0t1fs_fsync_interactions copy
static int ut_kernel_fsync(struct file *file, loff_t start, loff_t end, int datasync)
static struct m0t1fs_sb csb
static int ut_wait_for_reply(struct m0_rpc_item *item, m0_time_t timeout)
void * m0_fop_data(const struct m0_fop *fop)
M0_INTERNAL void m0_xcode_free_obj(struct m0_xcode_obj *obj)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
void test_m0t1fs_fsync_record_update(void)
static int ut_post_rpc_delay
struct m0_fop_type m0_fop_fsync_mds_fopt
static struct m0_rpc_item * item
static int ut_post_rpc_early_return
static void ut_fop_fini(struct m0_fop *fop)
static void test_m0t1fs_fsync_request_create(void)
static struct m0t1fs_inode m0inode
struct m0_rpc_machine * c_rpc_machine
static int ut_wait_for_reply_remote_return
struct m0_be_tx_remid stx_tri
struct m0_be_tx_remid ffr_be_remid
static struct m0_fop reply_fop
int m0t1fs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct m0_reqh_service_ctx * stx_service_ctx
enum m0_conf_service_type sc_type
struct m0_rpc_item * ri_reply
static struct m0_fop_fsync_rep reply_data
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
void call_m0t1fs_fsync_reply_process(struct m0t1fs_sb *input_csb, struct m0t1fs_inode *input_m0inode, struct m0t1fs_fsync_fop_wrapper *input_ffw, int expect_return, int expect_ut_wait_for_reply_count, int expect_ut_fop_fini_count, uint64_t expect_txid, size_t expect_locality)
static struct super_block super_block
M0_INTERNAL int m0_fop_data_alloc(struct m0_fop *fop)
M0_INTERNAL void m0_fop_fini(struct m0_fop *fop)
M0_INTERNAL void m0_tlink_init(const struct m0_tl_descr *d, void *obj)
static struct m0_reqh_service_ctx service
static struct dentry dentry
static int ut_post_rpc_return
static int ut_kernel_fsync_return
struct m0_fop_data f_data
static int ut_wait_for_reply_return
void call_m0t1fs_fsync_core(struct m0t1fs_inode *input_m0inode, int input_flag, int expect_return, int expect_ut_post_rpc_count, int expect_ut_wait_for_reply_count, int expect_ut_fop_fini_count)
static int ut_post_rpc_count
void(* fop_fini)(struct m0_fop *fop)
void test_m0t1fs_fsync_reply_process_init(struct m0t1fs_fsync_fop_wrapper *ffw, struct m0_reqh_service_txid *stx)
static int ut_wait_for_reply_count
void call_m0t1fs_fsync(struct file *input_file, loff_t start, loff_t end, int input_datamode, int expect_return, int expect_ut_kernel_fsync_count, int expect_ut_post_rpc_count, int expect_ut_fop_fini_count)
int m0t1fs_fsync_request_create(struct m0_reqh_service_txid *stx, struct m0t1fs_fsync_fop_wrapper **ffw_out, enum m0_fsync_mode mode)
M0_INTERNAL void m0_fop_release(struct m0_ref *ref)
struct m0_be_tx_remid ff_be_remid
static void test_m0t1fs_fsync_core(void)
struct m0_rpc_session * ri_session
static void fake_fs_setup(void)
int(* kernel_fsync)(struct file *file, loff_t start, loff_t end, int datasync)
static int start(struct m0_fom *fom)
static struct m0_fop * fop
void test_m0t1fs_fsync_reply_process(void)
struct m0_fop * m0_rpc_item_to_fop(const struct m0_rpc_item *item)
struct m0_reqh_service_txid * ffw_stx
struct m0_rpc_session rlk_sess
static void ut_reset_stub_counters(void)
struct m0_rpc_link sc_rlink
#define M0_FOP_XCODE_OBJ(f)
static int ut_kernel_fsync_count
struct m0_rpc_item f_item
struct m0_rpc_conn * s_conn
struct m0_reqh_service_txid sc_max_pending_tx
void m0t1fs_fsync_record_update(struct m0_reqh_service_ctx *service, struct m0t1fs_sb *csb, struct m0t1fs_inode *inode, struct m0_be_tx_remid *btr)
int m0t1fs_fsync_reply_process(struct m0t1fs_sb *csb, struct m0t1fs_inode *inode, struct m0t1fs_fsync_fop_wrapper *ffw)
int(* wait_for_reply)(struct m0_rpc_item *item, m0_time_t timeout)
int m0t1fs_fsync_core(struct m0t1fs_inode *inode, enum m0_fsync_mode mode)