*参照元 [#n4513171] #backlinks *説明 [#z51a5f69] -パス: [[linux-4.4.1/fs/sync.c]] -FIXME: これは何? --説明 **引数 [#q515f7d0] -struct file *file -- --[[linux-4.4.1/file]] -loff_t start -- -loff_t end -- -int datasync -- **返り値 [#cb7a947c] -int -- **参考 [#y9b9e507] *実装 [#x5b50ee8] /** * vfs_fsync_range - helper to sync a range of data & metadata to disk * @file: file to sync * @start: offset in bytes of the beginning of data range to sync * @end: offset in bytes of the end of data range (inclusive) * @datasync: perform only datasync * * Write back data in range @start..@end and metadata for @file to disk. If * @datasync is set only metadata needed to access modified file data is * written. */ int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) { struct inode *inode = file->f_mapping->host; - --[[linux-4.4.1/]] -file->f_mapping は address_space 型 --[[linux-4.4.1/address_space]] --[[linux-4.4.1/inode]] if (!file->f_op->fsync) return -EINVAL; -file->f_op は file_operations 型 --[[linux-4.4.1/file_operations]] if (!datasync && (inode->i_state & I_DIRTY_TIME)) { spin_lock(&inode->i_lock); inode->i_state &= ~I_DIRTY_TIME; spin_unlock(&inode->i_lock); mark_inode_dirty_sync(inode); - --[[linux-4.4.1/spin_lock()]] --[[linux-4.4.1/spin_unlock()]] --[[linux-4.4.1/mark_inode_dirty_sync()]] } return file->f_op->fsync(file, start, end, datasync); } EXPORT_SYMBOL(vfs_fsync_range); -ライセンスに関係なくシンボルを公開する。 --[[linux-4.4.1/EXPORT_SYMBOL()]] *コメント [#e10c4243]