|
Motr
M0
|

Go to the source code of this file.
Data Structures | |
| struct | m0t1fs_fsync_fop_wrapper |
| struct | m0t1fs_fsync_interactions |
Macros | |
| #define | __MOTR_M0T1FS_FSYNC_H__ |
Functions | |
| int | m0t1fs_fsync (struct file *file, loff_t start, loff_t end, int datasync) |
| 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) |
| M0_INTERNAL int | m0t1fs_fsync_request_create (struct m0_reqh_service_txid *stx, struct m0t1fs_fsync_fop_wrapper **ffw, enum m0_fsync_mode mode) |
| M0_INTERNAL int | m0t1fs_fsync_reply_process (struct m0t1fs_sb *csb, struct m0t1fs_inode *inode, struct m0t1fs_fsync_fop_wrapper *ffw) |
| int | m0t1fs_sync_fs (struct super_block *sb, int wait) |
| M0_INTERNAL int | m0t1fs_fsync_core (struct m0t1fs_inode *inode, enum m0_fsync_mode mode) |
| int m0t1fs_fsync | ( | struct file * | file, |
| loff_t | start, | ||
| loff_t | end, | ||
| int | datasync | ||
| ) |
m0t1fs fsync entry point
Entry point for fsync, calls m0t1fs_fsync_core with mode=active
parameter dentry is unused as we don't need it - it is removed in later kernel versions
parameter datasync is unused, as we only ever sync data. To sync metadata would require a sync against the super-block, as all metadata currently lives in container-zero.
Failure
Definition at line 354 of file fsync.c.


| M0_INTERNAL int m0t1fs_fsync_core | ( | struct m0t1fs_inode * | inode, |
| enum m0_fsync_mode | mode | ||
| ) |
m0t1fs fsync core sends an fsync-fop to a list of services, then blocks, waiting for replies. This is implemented as two loops. The 'fop sending loop', generates and posts fops, adding them to a list of pending fops. This is all done while holding the m0t1fs_indode::ci_pending_txid_lock. The 'reply receiving loop' works over the list of pending fops, waiting for a reply for each one. It acquires the m0t1fs_indode::ci_pending_txid_lock only when necessary.
m0t1fs fsync core sends an fsync-fop to a list of services, then blocks, waiting for replies. This is implemented as two loops. The 'fop sending loop', generates and posts fops, adding them to a list of pending fops. This is all done while holding the m0t1fs_indode::ci_service_pending_txid_map_lock. The 'reply receiving loop' works over the list of pending fops, waiting for a reply for each one. It acquires the m0t1fs_indode::ci_service_pending_txid_map_lock only when necessary.
Definition at line 281 of file fsync.c.


| 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 | ||
| ) |
Updates fsync records in fop callbacks. Service must be specified, one or both of csb/inode should be specified. new_txid may be null.
Update a m0_reqh_service_txid with the specified be_tx_remid if the struct m0_be_tx_remid::tri_txid > the stored value inode may be NULL if the update has no associated inode. csb may be NULL, iff inode is specified.
Definition at line 397 of file fsync.c.


| M0_INTERNAL int m0t1fs_fsync_reply_process | ( | struct m0t1fs_sb * | csb, |
| struct m0t1fs_inode * | inode, | ||
| struct m0t1fs_fsync_fop_wrapper * | ffw | ||
| ) |
Wait for a reply to an fsync fop and process it. Cleans-up the fop allocated in m0t1fs_fsync_request_create.
inode may be NULL if the reply is only likely to touch the super block. csb may be NULL, iff inode is specified.
Waits for a reply to an fsync fop and process it. Cleans-up the fop allocated in m0t1fs_fsync_request_create.
inode may be NULL if the reply is only likely to touch the super block. csb may be NULL, iff inode is specified.
Definition at line 206 of file fsync.c.


| M0_INTERNAL int m0t1fs_fsync_request_create | ( | struct m0_reqh_service_txid * | stx, |
| struct m0t1fs_fsync_fop_wrapper ** | ffw_out, | ||
| enum m0_fsync_mode | mode | ||
| ) |
Create and send an fsync fop from the provided m0_reqh_service_txid.
Creates and sends an fsync fop from the provided m0_reqh_service_txid. Allocates and returns the fop wrapper at on success, which is freed on the last m0_fop_put().
Definition at line 105 of file fsync.c.


| int m0t1fs_sync_fs | ( | struct super_block * | sb, |
| int | wait | ||
| ) |
m0t1fs sync_fs entry point
Entry point for sync_fs, sends fsync-fops for each pending transaction the super block is aware off. Unlike m0t1fs_fsync_core this function acquires the sc_max_pending_tx_lock for each service, as there is not a larger-granularity lock.
Definition at line 462 of file fsync.c.
