23 #include <linux/version.h> 25 #include <linux/mount.h> 27 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_M0T1FS 56 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 62 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) 65 .kernel_fsync = generic_file_fsync,
68 .kernel_fsync = &simple_fsync,
207 struct m0t1fs_inode *
inode,
248 "than that requested.");
254 &
inode->ci_pending_tx_lock);
285 struct m0_tl pending_fops;
322 fpf_tlink_init_at(ffw, &pending_fops);
335 saved_error = saved_error ? :
rc;
353 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 360 struct m0t1fs_inode *
inode;
374 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 398 struct m0t1fs_sb *
csb,
399 struct m0t1fs_inode *
inode,
421 &
inode->ci_pending_tx,
436 ispti_tlink_init_at(
stx, &
inode->ci_pending_tx);
466 struct m0_tl pending_fops;
470 struct m0t1fs_sb *
csb;
490 m0_tl_for(pools_common_svc_ctx, &
csb->csb_pools_common.pc_svc_ctxs,
505 (M0_CST_MDS, M0_CST_IOS))) {
519 fpf_tlink_init_at(ffw, &pending_fops);
534 saved_error = saved_error ? :
rc;
M0_INTERNAL int m0_rpc_post(struct m0_rpc_item *item)
static struct m0_mutex lock
static struct m0_reqh_service_txid stx[NUM_STRECORDS]
m0_time_t ri_resend_interval
static struct m0_semaphore wait
struct m0t1fs_fsync_interactions fi
void(* fop_put)(struct m0_fop *fop)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
enum m0_rpc_item_priority ri_prio
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 *))
#define M0_LOG(level,...)
int(* post_rpc)(struct m0_rpc_item *item)
struct m0_fop_type m0_fop_fsync_ios_fopt
M0_INTERNAL void m0_tlist_init(const struct m0_tl_descr *d, struct m0_tl *list)
void * m0_fop_data(const struct m0_fop *fop)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_fop_type m0_fop_fsync_mds_fopt
static struct m0_rpc_item * item
int m0_rpc_item_wait_for_reply(struct m0_rpc_item *item, m0_time_t timeout)
M0_TL_DESCR_DEFINE(fpf, "m0t1fs_fsync_fop_wrappers pending fsync-fops", static, struct m0t1fs_fsync_fop_wrapper, ffw_tlink, ffw_tlink_magic, M0_T1FS_FFW_TLIST_MAGIC1, M0_T1FS_FFW_TLIST_MAGIC2)
#define M0_ERR_INFO(rc, fmt,...)
return M0_ERR(-EOPNOTSUPP)
#define m0_tl_teardown(name, head, obj)
static int struct dentry * dentry
struct m0_be_tx_remid stx_tri
M0_INTERNAL struct m0t1fs_inode * m0t1fs_file_to_m0inode(const struct file *file)
struct m0_be_tx_remid ffr_be_remid
int m0t1fs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
static void m0t1fs_fsync_fop_cleanup(struct m0_ref *ref)
struct m0_reqh_service_ctx * stx_service_ctx
enum m0_conf_service_type sc_type
struct m0_rpc_item * ri_reply
static int struct dentry int mode
int m0t1fs_sync_fs(struct super_block *sb, int wait)
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)
struct m0_be_tx_remid ff_be_remid
static struct m0_reqh_service_ctx service
M0_INTERNAL int m0_rpc_session_validate(struct m0_rpc_session *session)
static struct super_block sb
void(* fop_fini)(struct m0_fop *fop)
int m0t1fs_fsync_request_create(struct m0_reqh_service_txid *stx, struct m0t1fs_fsync_fop_wrapper **ffw_out, enum m0_fsync_mode mode)
struct m0_be_tx_remid ff_be_remid
#define M0_ALLOC_PTR(ptr)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
struct m0_rpc_session * ri_session
int(* kernel_fsync)(struct file *file, loff_t start, loff_t end, int datasync)
static void fsync_stx_update(struct m0_reqh_service_txid *stx, uint64_t txid, struct m0_mutex *lock)
static int start(struct m0_fom *fom)
void m0_fop_put_lock(struct m0_fop *fop)
static struct m0_fop * fop
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
struct m0_rpc_link sc_rlink
#define m0_tl_find(name, var, head,...)
#define m0_tl_for(name, head, obj)
struct m0_rpc_item f_item
M0_INTERNAL struct m0t1fs_sb * m0inode_to_sb(const struct m0t1fs_inode *m0inode)
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)
#define M0_IMPOSSIBLE(fmt,...)
M0_TL_DEFINE(fpf, static, struct m0t1fs_fsync_fop_wrapper)