⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io_prep_fsync.3

📁 xen 3.2.2 源码
💻 3
字号:
./" static inline void io_prep_fsync(struct iocb *iocb, int fd)./" {./" 	memset(iocb, 0, sizeof(*iocb));./" 	iocb->aio_fildes = fd;./" 	iocb->aio_lio_opcode = IO_CMD_FSYNC;./" 	iocb->aio_reqprio = 0;./" }.TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO".SH NAMEio_prep_fsync \- Synchronize a file's complete in-core state with that on disk.SH SYNOPSYS.nf.B #include <errno.h>.br.sp.B #include <libaio.h>.br.sp.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)".spstruct iocb {	void		*data;	unsigned	key;	short		aio_lio_opcode;	short		aio_reqprio;	int		aio_fildes;};.sp.fi.SH DESCRIPTIONThis is an inline convenience function for setting up an iocbv for a FSYNC request..brThe file for which.TP .IR "iocb->aio_fildes = fd" is a descriptor is set up withthe command.TP .IR "iocb->aio_lio_opcode = IO_CMD_FSYNC:..PPThe io_prep_fsync() function shall set up an IO_CMD_FSYNC operationto asynchronously force all I/Ooperations associated with the file indicated by the filedescriptor aio_fildes member of the iocb structure referenced bythe iocb argument and queued at the time of the call toio_submit() to the synchronized I/O completion state. The functioncall shall return when the synchronization request has beeninitiated or queued to the file or device (even when the datacannot be synchronized immediately).All currently queued I/O operations shall be completed as if by a callto fsync(); that is, as defined for synchronized I/O fileintegrity completion. If theoperation queued by io_prep_fsync() fails, then, as for fsync(),outstanding I/O operations are not guaranteed to havebeen completed.If io_prep_fsync() succeeds, then it is only the I/O that was queuedat the time of the call to io_submit() that is guaranteed to beforced to the relevant completion state. The completion ofsubsequent I/O on the file descriptor is not guaranteed to becompleted in a synchronized fashion..PPThis function returns immediately . To schedule the operation, thefunction.IR io_submitmust be called..PPSimultaneous asynchronous operations using the same iocb produceundefined results..SH "RETURN VALUES"None.SH ERRORSNone.SH "SEE ALSO".BR io(3),.BR io_cancel(3),.BR io_fsync(3),.BR io_getevents(3),.BR io_prep_pread(3),.BR io_prep_pwrite(3),.BR io_queue_init(3),.BR io_queue_release(3),.BR io_queue_run(3),.BR io_queue_wait(3),.BR io_set_callback(3),.BR io_submit(3),.BR errno(3)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -